"There's no line here to end" in custom command

I am working on creating a resume in LaTeX and have defined a command that allows me to input my work experience. The only problem is that whenever I try to use an itemized list, as seen below, I get "! LaTeX Error: There's no line here to end.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... To Be Added}". I also have to add in line breaks manually using \\ for some reason.

Code for my tex document:

\section{Related Experience}

\begin{entrylist}
\experience
{Jan 2014 – Present}
{IT Systems}
{Chocolate Covered Alien Co.; Mars, PA}
{\textbf{Responsibilities:}\\
\begin{itemize}
\item Cook aliens to a nice texture
\item Chocolate cover said aliens
\end{itemize}}
{\textbf{Key Achievements:}\\
\begin{itemize}
\item Ate chocolate covered aliens without the boss finding out
\end{itemize}}
\end{entrylist}


Code for my class document:

\newenvironment{entrylist}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}
}

\newcommand{\experience}[5]{%
\textbf{#1}&\parbox[t]{12cm}{%
\textbf{#2}\\%
\textit{#3}\\%
#4\\%
#5\vspace{\parsep}%
}\\}

• First, imho, there is an extra } before \end{entrylist}, or maybe it is by the improper formating. Please edit it. Sep 29, 2014 at 0:29
• Nice catch, it definitely was bad formatting, sadly no paren mismatch in my code... Sep 29, 2014 at 0:41
• you should almost never have \\  outside tabular, certainly the ones before lists are wrong. Hard to say more unless you edit the question to have an example that demonstrates the problem (ie a complete small document we can try) Sep 29, 2014 at 0:45
• In the definition of \experience you have }\\} at the end. Make it }}. If you want, you may use \par instead.
– user11232
Sep 29, 2014 at 0:45

The issue is that \begin{itemize} ... \end{itemize} is not a line of text, so you cannot put \\ after it. The environments stand alone, so they will always be placed after a paragraph and before another one.

It means, that the \\ you use after #4 is causing the error. Also you do not need \\ at the end of your macro, if you are using \vspace{\parsep}. Redefine your macro to:

\newcommand{\experience}[5]{%
\textbf{#1}&\parbox[t]{12cm}{%
\textbf{#2}\newline%
\textit{#3}\newline%
#4%
#5\vspace{\parsep}%
}}


EDIT: This may however cause another problem (warning). Right now, the second column of the table is 12 cm wide and the first column can stretch to whatever length it wants. So you will get a hbox overfull every time the text in the first column "pushes" the second column away. To get rid of the hbox overfull, you have to define a fix length for the first column as well. You have to do it in such a way that both columns together wont exceed the line width. You can do it like:

\newcommand{\experience}[5]{%
\parbox[t]{0.3\linewidth}{\textbf{#1}}&\parbox[t]{0.63\linewidth}{%
\textbf{#2}\newline%
\textit{#3}\newline%
#4%
#5\vspace{\parsep}%
}}


Where 0.3 + colsep + 0.63 is aproximately 1 line width.

• This was exactly the problem. I have gone through and corrected this everywhere that I had it and even helped clean up all but two hbox overfulls! Sep 29, 2014 at 2:16
• The overfull boxes are besause of \parbox[t]{12cm} it is too wide. See the edit above. Sep 29, 2014 at 6:23