I've just switched from pdflatex to xelatex for my lectures to take advantage of the unicode-math
package so that I can change the colours of all my mathematics. When compiling the "handout" version last night, I found that it didn't work as I expected. I use the pgfpages
package to produce the handout as a 4-up document (with a nice box round each frame) to save paper. But the page size in the resulting document was that of one slide, not a full a4 piece of paper. A little googling led me to a quick fix on tug:
\newlength\hackpaperwidth \hackpaperwidth210mm
\newlength\hackpaperheight \hackpaperheight297mm
\RequirePackage{everyshi}
\EveryShipout{%
\special{papersize=\the\hackpaperwidth,\the\hackpaperheight}}
with the comment (from the author):
Probably not the cleanest way of doing things, so if someone has a better idea and/or can locate the bug exactly, comments welcome.
There were no follow-up comments, but it was dated November 2008. In June 2009, there's a similar-looking problem on the xetex mailing list with this response:
That's a reported (and probably not fixed yet) problem in pgfpages. Use this to tell pgfpages how to set page sizes in XeLaTeX:
\renewcommand\pgfsetupphysicalpagesizes{% \pdfpagewidth\pgfphysicalwidth\pdfpageheight\pgfphysicalheight% }
(These are (linked from) the top two hits on google for xelatex pgfpages
).
My real question is: is this going to get fixed? But that's not a good tex.SE question. So my attempt to make it into a good question is:
The second of the above seems the better of the two. Is that the best way to fix this problem?
PS The MWE from the first linked post is still a suitable one:
\documentclass{beamer}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper]
\begin{document}
\frame{\frametitle{A} foo}
\frame{\frametitle{B} bar}
\end{document}
:-P