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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I adapted the idea from here to place the page numbers in the outer margin. However, by doing so, the vertical ruler disappears. I first thought that adjusting the horizontal spacing parameters for the ruler might bring it back, but it doesn't seem so. How can this be fixed?



% comment this paragraph out and see that the ruler appears again
\rofoot{foo\ \ \textbullet\,\ bar\pageno{o}}% right odd
\lefoot{\pageno{e}Foo\ Bar}% left even
  \vbox to 0pt{
    \hbox to 0pt{%
      \if#1o\kern 2em\else\hss\fi\thepage

Foo Bar
Foo Bar
share|improve this question
up vote 3 down vote accepted

Quite subtle. :)

The vruler package distinguishes between LaTeX and Plain TeX by looking whether the \pageno macro is defined. So with that code it guesses wrongly that the document is a Plain TeX one.

Change \pageno into \xpageno or whatever.

Here's the relevant part from vruler.sty

141 \ifx\pageno\undefined % this is considered as LaTeX
142     % we assume all LaTeX versions have \@outputpage in the form of
143     % \@outputpage= ...\vbox{ ... \vbox{...}...}... , where 2nd \vbox
144     % contains the true content. 
share|improve this answer
Many thanks, that's indeed quite subtle :-) – Marius Hofert Nov 27 '12 at 0:59

Your Answer


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.