Wednesday, May 30, 2012

LaTeX: "Rerun to get crossreferences right" won't go away

Today I was trying to use the hyperref and varioref packages in the same document, and a large table (containing a bunch of references) was causing a perpetual "Rerun to get crossreferences right" error, as well as some page breaking problems. I inserted a \pagebreak where I wanted the break to be, and the "Rerun" warning went away. Even better, the layout engine was able to do the right thing.

Hej då!

Wednesday, February 15, 2012

LaTeX: left-justify, center, right-justify on same line

Here's a quick LaTeX hack to left-justify, center, and right-justify text all on the same line:

\newcommand{\lrc}[3]{%
  \noindent%
  \makebox[0pt][l]{#1}%
  \hfill%
  \makebox[0pt][c]{#2}%
  \hfill%
  \makebox[0pt][r]{#3}%
}

Hej då!