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

1 Answer 1


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. 
  • Many thanks, that's indeed quite subtle :-) Nov 27, 2012 at 0:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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