5

I am writing a resume in TeX. I'm formatting my technical skills in a tabular environment. Currently it looks like:

Before \vspace

\begin{tabular}{ l | c c c }
\textbf{Programming Languages} & Java & C & Python \\   
\textbf{Web Development} & Javascript & jQuery & Ajax \\
\textbf{Mobile} & Android & iOS \\
\end{tabular}  



I want to add a little bit of vertical space between each line for readability. The only way I know how to do this is with \vspace.

When I add \vspace {1 mm} I get:

After \vspace

\begin{tabular}{ l | c c c }
\vspace {1 mm}
\textbf{Programming Languages} & Java & C & Python \\   
\vspace {1 mm}
\textbf{Web Development} & Javascript & jQuery & Ajax \\
\textbf{Mobile} & Android & iOS \\
\end{tabular}  



However, I want the vertical line to be consistent from the top to the bottom of the table, like this:

What I want


I would also like to be able to insert the vertical space between arbitrary lines (rather than every other line) like below. Notice that there is no extra space between the first and second line of the first section.

Arbitrary extra space


I assume that I need to use tabular-specific formatting but I'm not sure where to start.

6

Option-1: You can add the space after each \\ like \\[2mm] at every row end.

\documentclass{article}
\usepackage{array}   %% habitual addition
\begin{document}
  \begin{tabular}{ l | c c c }
    \textbf{Programming Languages} & Java & C & Python \\[2mm]  %%<-- note [2mm] here
    \textbf{Web Development} & Javascript & jQuery & Ajax \\[2mm]  %%<-- note [2mm] here
    \textbf{Mobile} & Android & iOS \\
\end{tabular}  
\end{document}

enter image description here

Option-2: Change \arraystretch for the entire table at once.

\documentclass{article}
\usepackage{array}   %% habitual addition
\renewcommand\arraystretch{1.5}   %% < like this. change 1.5 to whatever you need.
\begin{document}
  \begin{tabular}{ l | c c c }
    \textbf{Programming Languages} & Java & C & Python \\
    \textbf{Web Development} & Javascript & jQuery & Ajax \\
    \textbf{Mobile} & Android & iOS \\
\end{tabular}  
\end{document}
  • Option 1 does what I need and is easy to use. Thanks! It seems like Option 2 adds vertical space between each line and doesn't allow you to have any normally spaced lines. – user2121620 Aug 15 '14 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.