1

This is my first time asking a question on here, so please forgive me if I'm not explaining everything properly. To describe me as a beginner is a massive understatement. But here it goes.

I'm working on my CV, and I keep running into the same problem. The first two lines keep sticking together, and I can't separate them. Here is the code:

\documentclass[10pt]{article}

\usepackage[margin=2cm]{geometry}
\usepackage{titlesec}
\usepackage{array, xcolor}
\newcolumntype{L}{>{\raggedleft}p{0.08\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}

\titleformat{\section}
  {\normalfont\Large\bfseries}{\thesection}{1em}{}[{\titlerule[0.8pt]}]

\begin{document}

\section*{Publications}

\begin{tabular}{L!{\VRule}R}

2021&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}

2020&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}

2019&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}

2018&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}

2015&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}

\end{tabular}

\end{document}


Apologies again, but I don't know how to use this website, so I don't know how to typeset in the comment to show you what it looks like, but basically there is two problems:

(1) The first two lines (the one that starts with "2021" and the one that starts with "2020" have no spacing between them, and I want them to have spacing. I tried all sorts of things (e.g., \vspace{5mm}) and it doesn't help.

(2) The years that appear on the left-hand side are not aligned with the information on the right-hand side.

Any help would be greatly appreciated it! Thank you in advance.

1 Answer 1

0

You should not use \vspace inside a tabular.

If you want to increase the vertical space between rows, change the 5pt length with something else.

\documentclass[10pt]{article}

\usepackage[margin=2cm]{geometry}
\usepackage{titlesec}
\usepackage{array, xcolor}
\newcolumntype{L}{>{\raggedleft}p{0.08\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}

\titleformat{\section}
  {\normalfont\Large\bfseries}{\thesection}{1em}{}[{\titlerule[0.8pt]}]

\begin{document}

\section*{Publications}

\begin{tabular}{L!{\VRule}R}

2021&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]

2020&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]

2019&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]

2018&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]

2015&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.

\end{tabular}

\end{document}

enter image description here

With \\[12pt] instead of \\[5pt] you'd get

enter image description here

2
  • thank you for that very helpful answer. One more thing: I want spacing between each line. That's why I was using the "\vspace{5mm}." I don't want them to be single-spaced. What's the fix for that?
    – Itsme
    Aug 5 at 22:27
  • 1
    @Itsme Isn’t the second example more spaced?
    – egreg
    Aug 6 at 6:42

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.