Daniel Lohmann wrote:
Hi,
I have a paper that uses the ACM class "sig-alternate" and needed to
produce a PDF that uses "letterpaper" as page size. This turned out to
be surprisingly complicated. I eventually found a solution, however,
would like to discuss some of the issues.
It took me quite a while to figure out that all these "letterpaper" or
"a4paper" options one can pass to a LaTeX class have nothing to do with
the actual printer page size of the output media -- they just influence
the type area calculations. The printer page size is not controlled by
LaTeX, but the backend-driver (dvips, dvipdfm, pdftex, ...). On most
LaTeX installations it defaults to A4 paper. Depending on the
backend-driver, the printer page size can be influenced by either
command line options (not really suitable if using LyX) or by
driver-dependent /special-commands.
As I was using pdflatex, I added
\pdfpagewidth=8.5in
\pdfpageheight=11in
to my preamble and that did it. However, I would prefer an
backend-driver--independent solution.
I found two packages that offer functionality to specify the printer
page size independently from the backend-driver: geometry and typearea.
However, I was not able to figure out how to use one of these packages
to set the printer page size *without* having it to recalculate the type
area according to more or less nifty algorithms at the same time.
(With the ACM classes, the type area is anyway fixed and optimized for
letter format.)
More precisely:
\usepackage[letterpaper]{geometry}
messed up the layout completely, whereas
\usepackage[letterpaper]{typearea}
resulted in a error message that "current" has not been defined.
Any ideas?
Daniel
How did \usepackage[letterpaper]{geometry} mess up the layout?
I assume from your location that you usually want to use A4 and just
need letter for certain special situations (such as the one you
described). Attempting to do the reverse of what you want (switch from
letter, my default, to A4), I discovered that if you just change the
paper size in the LyX document settings, it supplies the new size as an
option to the document class, and pdflatex seems to ignore that. If you
also switch from default margins to custom margins, though, LyX loads
geometry and supplies the paper size (along with the margins) as options
to geometry, and for me that seems to work. I'm using a different
class, though, so perhaps ACM is susceptible to format problems where
AMS is not.
/Paul