5

I loaded lineno to number the lines on my resume for critique by a professor. Doing so changed the spacing after the headers. I would like to number the lines and retain the original formatting, if possible.

\documentclass{article}
\usepackage{fullpage}
\pagestyle{empty}
\raggedright

% Uncommenting lineno changes spacing below \header
%\usepackage{lineno}

\newcommand{\area}[2]{\vspace*{-9pt} \begin{verse}\textbf{#1}   #2 \end{verse}  }
\newcommand{\lineunder}{\vspace*{-8pt} \\ \hspace*{-18pt} \hrulefill \\}
\newcommand{\header}[1]{{\hspace*{-15pt}\vspace*{6pt} \textsc{#1}} \vspace*{-6pt} \lineunder}

\newcommand{\schoolwithcourses}[4]{
\textbf{#1} #2 $\bullet$ #3 $\bullet$ #4\\
Selected Coursework:\\
\vspace*{5pt}
}

\begin{document}

\header{Education}

\schoolwithcourses{Bachelor of Science}{$\bullet$ Georgia Gwinnett College}{May 2013 $\bullet$ Magna cum Laude}
{GPA: 3.874/4.000}
\area{Biology}{Microbiology $\cdot$ Immunology $\cdot$ Human Anatomy $\cdot$ Human Physiology $\cdot$ Biomechanics $\cdot$ Organic~Chemistry $\cdot$ Biotechnology $\cdot$ Biochemistry $\cdot$ Cell Biology }
\end{document}
David Carlisle
  • 757,742
John Johnson
  • 381
  • 2
  • 10

1 Answers1

8

The general answer is:

NEVER use any command related to typesetting text (\raggedright in your case) in the preamble.


The specific answer in your case is:

lineno.sty redefines the meaning of \\ (which you're using in your \newcommands) and issuing \raggedright before that redefinition causes the conflict.

These are the lines in lineno.sty which cause the conflict:

\DeclareRobustCommand\\{%
  \ifLineNumbers
    \expandafter \@LN@cr
  \else
    \expandafter \@normalcr
  \fi
}

LineNumbers is false in your case, so \\ gets defined as \@normalcr, which is the "fragile" version of \\.

karlkoeller
  • 124,410