In particular, the \section macro used to be renewed as a \marginpar with some other ugly stuff. Putting the sections in the margins caused problems because people like to put spaces after the sections, which generates a \par that means the section content will not be aligned with the section heading in the margin note. So the old way I got around that problem was to force people not to use spaces between \section and the section content. If they needed visual space in their source code, they could use comments to do that.
Well, I've swapped out that ugly definition for a slightly less ugly one that uses \llap (with a \smashed \parbox) and some creative gobbling. In particular,
The \vspace and \par combination should ensure that an additional \par isn't added by LaTeX. So before you were restricted to things like...% The section headings % % Usage: \section{section name} \renewcommand{\section}[1]{\pagebreak[3]% \hyphenpenalty=10000% \vspace{1.3\baselineskip}% \phantomsection\addcontentsline{toc}{section}{#1}% \noindent\llap{\scshape\smash{% \parbox[t]{\marginparwidth}{\raggedright #1}}}% \vspace{-\baselineskip}\par}
and\section{Stuff} \begin{bibsection} %...
But now you don't have to be so careful about the whitespace. You are allowed:\section{Stuff} % Junk
and\section{Stuff} \begin{bibsection} %...
So that's cool. Much more readable.\section{Stuff} Junk
You can get my most recent LaTeX CV templates at their page on my website. You can find a detailed history of the source code changes within my Mercurial repositories of documents.
(updated: replaced \gobblepars with \par hack that still allows for arbitrary amount of space after each \section but also prevents lists from adding a \par when placed directly after a \section; consequently, adjusted all of the lone-lists to get rid of their leading negative vertical space (probably can get rid of them now, actually). I'm trying to shift toward using conventional lists (or perhaps conventional modifications of them from paralist or enumitem))
1 comment:
LaTeX allows markup to explain the framework of a papers, so that the person need not think about demonstration.
Cv Template
Post a Comment