TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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 want to adopt the philosophy "typeset once, produce any size". It means that from the beginning I specify the minimum paper size (e.g., A6) and configure the contents to best suit the paper dimension. Once the development phase has completed, I can compile the input file to produce PDF outputs with any larger size (e.g., A5 and A4) only by changing the paperwidth and paperheight.

Assume that I am satisfied with the font and graphics dimensions so re-scaling is no longer needed for printing in any larger paper size.

This is my response for Yiannis Lazarides' comment: I want to produce A6 for iPod, A5 for iPad and A4 for printout/on-screen.


Are settings that best suit contents for a smaller paper size guaranteed not to produce underfull/overfull warnings for a larger paper size?

share|improve this question
No, in general. With small line length you'll have to solve many overfull and underfull problems, that wouldn't appear with larger line length, which will pose new ones, instead. – egreg Jun 14 '11 at 18:10
.. puzzled, why would you want all these different paper sizes? Normally one would have a screen version and another for paper. – Yiannis Lazarides Jun 14 '11 at 18:52
up vote 2 down vote accepted

In general, it is not possible as egreg mentioned. You can expand the code below, though to cater for various sizes and have all the corrections in one place. Here I used \ifpdf, but you can define your own conditionals \ifafour, \ifathree etc., in a similar fashion. Strange, you want A4 for screen I normally go smaller.

\newfont{\HUGE}{cmr17 at 96pt}
  \pdfpageheight 7.5in 
  \pdfpagewidth 4.625in
\put(-0.625,0){\framebox(6.2,7.25){\HUGE \textcolor{purple}{A}}}
\put(5.875,5.625){\parbox[t]{15em}{\Huge \noindent LITTLE GIFT\linebreak
\raggedright FOR ALL\linebreak
\TeX nicians\linebreak
{\small \sc by}\\
{\footnotesize Author of ``Gala Day Luncheons''}\\
\vspace*{18.5 ex}
BEIJING\phantom{ZZZZZ,}\hfill\raisebox{0.5ex}{$\bullet$}\hfill THE PANDA\linebreak
CHINA~~~~\hfill\raisebox{0.5ex}{$\bullet$}\hfill PRESS
{\em Copyright, $\mit 2011$}\\[5pt]
{\sc By Xport \& Company}\\
{\em All rights reserved}\\
{\sc A little cook book}\\
%{\sc for a little girl}\\
Made in China
                           {\scriptsize FOR}\\
                {\large \bf Knuth, Lamport and Carlisle}\\
                   {\footnotesize AND THE REST\\
                     OF THE CROWD THAT LOVES\\


\chapter{My Recipes}
share|improve this answer
@xport Think about the future, me reading your work on a laptop at the beach! – Yiannis Lazarides Jun 14 '11 at 19:43
@Yiannis: A6 and A5 are for the future. – xport Jun 14 '11 at 19:51
@xport You can simplify quite a bit with the geometry package. I was just too lazy to look up the manual:) – Yiannis Lazarides Jun 14 '11 at 19:54

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.