Take the 2-minute tour ×
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.

Scenario

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.

Question

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
1  
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

1 Answer 1

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.

\documentclass[11pt]{book}
\usepackage[svgnames]{xcolor}
\usepackage{ifpdf}
\usepackage{lipsum}
\newfont{\HUGE}{cmr17 at 96pt}
\setlength{\textwidth}{3.0in}
\setlength{\textheight}{5.125in}
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{-0.375in}
\setlength{\topmargin}{-0.375in}
\setlength{\headsep}{0.25in}
\setlength{\headheight}{0.125in}
\setlength{\footskip}{0.25in}
\setlength{\parindent}{0.5\parindent}
\ifpdf
  \pdfpageheight 7.5in 
  \pdfpagewidth 4.625in
\else
  \addtolength{\oddsidemargin}{1.9375in}
  \addtolength{\evensidemargin}{1.9375in}
  \addtolength{\topmargin}{1.75in}
\fi
\newcommand{\hstroke}{\rule[0.5ex]{5.0em}{0.2ex}}
\begin{document}
\newpage
\thispagestyle{empty}
\begin{center}
\setlength{\unitlength}{1.0em}%
\begin{picture}(45,16)(0,0)
\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
}}
\end{picture}
\hspace*{-0.6em}\rule{1.08\textwidth}{0.3ex}\\
{\small \sc by}\\
{\small YIANNIS LAZARIDES}\\
{\footnotesize Author of ``Gala Day Luncheons''}\\
\vspace*{18.5 ex}
\rule{\textwidth}{0.3ex}\\
{\small
BEIJING\phantom{ZZZZZ,}\hfill\raisebox{0.5ex}{$\bullet$}\hfill THE PANDA\linebreak
CHINA~~~~\hfill\raisebox{0.5ex}{$\bullet$}\hfill PRESS
}
\end{center}
\newpage
\thispagestyle{empty}
\vspace*{18ex}
\begin{center}
{\em Copyright, $\mit 2011$}\\[5pt]
{\sc By Xport \& Company}\\
\hstroke\\
{\em All rights reserved}\\
\vspace*{18ex}
{\sc A little cook book}\\
%{\sc for a little girl}\\
\vspace*{12ex}
Made in China
\end{center}
\newpage
\frontmatter
\thispagestyle{empty}
\vspace*{20ex}
\begin{center}
                           {\scriptsize FOR}\\
                {\large \bf Knuth, Lamport and Carlisle}\\
\smallskip
                   {\footnotesize AND THE REST\\
                     OF THE CROWD THAT LOVES\\
                   ``TYPOGRAPHY''}
\end{center}
\newpage
\thispagestyle{empty}

\newpage

\mainmatter
\chapter{My Recipes}
\lipsum
\end{document}
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

 
discard

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.