[Tex/LaTex] Uneven spacing between parbox

boxesspacing

I have uneven vertical space between two parboxes and between a parbox and beginning of a new text paragraph. How to fix these? Here is a minimum working example.

\documentclass{article}

\usepackage{calc}

\begin{document}
Hello 0!!

\parbox[t]{\textwidth-2.5cm}{\noindent{\textsc{\bfseries{First Document Management System}:} This is a long description of Document Management System. Very long indeed to fill two lines.}}\parbox[t]{2.5cm}{\hfill{2005-2009}}

\parbox[t]{\textwidth-2.5cm}{\noindent{\textsc{\bfseries{Second Document Management System}:} This is a long description of Document Management System. Very long indeed to fill two lines.}}\parbox[t]{2.5cm}{\hfill{2009-Present}}

\parbox[t]{\textwidth-2.5cm}{\noindent{\textsc{\bfseries{Last Document Management System}:} This is a long description of Document Management System. Very long indeed to fill two lines.}}\parbox[t]{2.5cm}{\hfill{2009-Present}}

Hello 1!!

Hello 2!!

\end{document}

enter image description here

I want a similar gap such as the gap between Hello 1 and Hello 2. between two paraboxes and similar gap between last parbox and Hello 1.

Best Answer

You should write all your \parboxes using

\parbox[.]{<len>}{\strut ... \strut}

in order to obtain the appropriate line-height - \strut ensures this.

However, your input can be presented a little differently using the following tabularx approach and it's far easier to manage:

enter image description here

\documentclass{article}

\usepackage{tabularx,array}
\newcommand{\highlight}[1]{\textbf{#1}}
\begin{document}
Hello 0!!\strut

\noindent
\begin{tabularx}{\linewidth}{@{} X >{\raggedleft\arraybackslash}p{2.5cm}@{}}
  \highlight{First Document Management System}:
  This is a long description of Document Management System. Very long indeed to fill two lines. &
  2005--2009 \\
  \highlight{Second Document Management System}: This is a long description of Document Management System. 
  Very long indeed to fill two lines. &
  2009--Present \\
  \highlight{Last Document Management System}: This is a long description of Document Management System. 
  Very long indeed to fill two lines. &
  2009--Present
\end{tabularx}

Hello 1!!

Hello 2!!

\end{document}

Note that the tabularx is not breakable across the page boundary.