Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to make a half-sheet (letter-size paper) checklist with two columns using LaTeX. I set the page size to 8.5x5.5 inches, used fancyheader to put the title at the top of pages, defined a checklist environment, and set \twocolumn.

Then I put the checklist section itself in \foreach \n in {1,2} to print two half-sheets into the output file. Then I'll use my pdf viewer to print two pages/sheet.

This all works great, except for the fact that the line spacing is off on the second page. The first page is perfect, but on the second page (which I'd expect to be the same), the second column has slightly smaller line spacing than the first, which leads to it being significantly off by the bottom of the page. Why is this happening?

Here's a link to my output, if it'd be easier than compiling the document: http://thetechnicalgeekery.com/downloads/temp/checklist.pdf

\documentclass[12pt]{article}

% size
\usepackage{geometry}
\geometry{papersize={8.5in, 5.5in}}
\geometry{margin=1in}

% checkbox list
\usepackage{latexsym}
\newenvironment{checklist}{
  \begin{list}{}{}
  \let\olditem\item
  \renewcommand\item{\olditem[$\Box$] }
  }{
  \end{list}
}

% title
\newcommand{\doctitle}{Checklist}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO,RE]{\LARGE \doctitle \normalsize}

% other stuff
\usepackage{tikz}
\twocolumn

\begin{document}
\foreach \n in {1,2} { % print 2 copies for 2 to a page

\begin{checklist}
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\end{checklist}
} % foreach

\end{document}
share|improve this question
2  
fancyhdr tells you in the log that you have to set the head height to at least 18.7528pt; set headheight=19pt in the argument to \geometry –  egreg Dec 8 '12 at 21:36
    
@egreg: That does look a little bit better, but doesn't solve the issue. –  scorchgeek Dec 8 '12 at 23:09
    
Use the multicols environment instead of the \twocolumn declaration: \usepackage{multicol} in the preamble, \begin{multicols}{2} before the \foreach and \end{multicols} after it. –  egreg Dec 8 '12 at 23:18
    
Works perfectly now (the first time I'd tried multicols, it prevented all document contents from rendering, but now it's working fine and I'm not sure what I did wrong the first time). Thanks! –  scorchgeek Dec 8 '12 at 23:49
add comment

1 Answer

Using egreg's suggestion and adding \noindent and \newpage to every spin of the loop you can get identical pages. For that I've divided the list into two but it doesn't matter.

\documentclass[12pt]{article}

% size
\usepackage{geometry}
\geometry{papersize={8.5in, 5.5in},headheight=19pt}
\geometry{margin=1in}

% checkbox list
\usepackage{latexsym}

% title
\newcommand{\doctitle}{Checklist}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO,RE]{\LARGE \doctitle \normalsize}

% other stuff
\usepackage{pgffor,pgfmath}

\begin{document}\twocolumn
\foreach \n in {1,...,4} {
\noindent\begin{itemize}
\renewcommand\labelitemi{$\Box$}
\foreach \x[evaluate=\x as \y using {int(Mod(\x,2)+1)}] in {0,...,9}{
\item Item \y
}
\end{itemize}\newpage
}
\end{document}


EDIT : It turns out that the result of the multicol structure was sought.

\documentclass[12pt]{article}
% size
\usepackage{geometry}
\geometry{papersize={8.5in, 5.5in}}
\geometry{margin=1in}
% checkbox list
\usepackage{latexsym}
\newenvironment{checklist}{
  \begin{list}{}{}
  \let\olditem\item
  \renewcommand\item{\olditem[$\Box$] }
  }{
  \end{list}
}
% title
\newcommand{\doctitle}{Checklist}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\lhead
\chead
\rhead{\LARGE \doctitle \normalsize}
% other stuff
\usepackage{pgffor,pgfmath,multicol}
\begin{document}
\begin{multicols}{2}
\foreach \n in {1,2} { % print 2 copies for 2 to a page
\begin{checklist}
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\item Item 1
\item Item 2
\end{checklist}
} % foreach
\end{multicols}
\end{document}
share|improve this answer
    
Thanks. That's gotten all the pages the same, but the columns still aren't lined up. In your example they are, but I'm not sure how to apply using the loop to actual content without messing it up. –  scorchgeek Dec 8 '12 at 23:21
    
@scorchgeek Maybe you have simplified your MWE too much. Can you be more specific? –  percusse Dec 8 '12 at 23:46
    
Looks like multicol fixed it (see comments). Thanks! (I was looking to put information after the checks rather than 'item 1' and 'item 2.' I probably should have used better boilerplate and/or not copied and pasted such a small chunk.) –  scorchgeek Dec 8 '12 at 23:50
    
@percusse Would you change your answer by using multicols instead of \twocolumn? –  egreg Dec 8 '12 at 23:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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