[OS X TeX] pdftex paper size
Ross Moore
ross at ics.mq.edu.au
Fri May 19 02:57:35 EDT 2006
Hi Bruno,
On 19/05/2006, at 1:34 AM, Bruno Voisin wrote:
> and the file so found should contain, for A4 paper:
>
> \pdfpagewidth=210 true mm
> \pdfpageheight=297 true mm
The space shouldn't be there, use just truemm .
> These parameters are different from LaTeX's \paperwidth and
> \paperheight: they are specific to pdfTeX and relate to the
> "physical" sheet of paper (or screen) pdfTeX ships out to, whereas
> \paperwidth and \paperheight relate to the logical page size TeX
> considers when breaking text into lines and pages.
No. It is \textwidth and \textheight that govern breaking text for
paragraphing, etc.
\paperwidth and \paperheight are used by LaTeX to work out the exact
placement
of header/footers, etc. and columns (in 2-column mode). The defaults
for \textwidth
and \textheight are determined after allowing for the headers and
footers.
\pdfpageheight and \pdfpagewidth determine the size (when viewed at
100%)
of the picture of a page that is shown by a PDF browser.
This *should* be the same as the \paperwidth and \paperheight .
To check these values, try something like:
\documentclass[11pt,letter]{article}
\showthe\paperheight
\showthe\pdfpageheight
\showthe\paperwidth
\showthe\pdfpagewidth
\begin{document}
\showthe\pdfpageheight
\showthe\pdfpagewidth
and watch the console window (.log file).
For me using TeXShop, I get:
This is pdfeTeXk, Version 3.141592-1.11b-2.1 (Web2C 7.5.2)
\write18 enabled.
%&-line parsing enabled.
(/usr/local/teTeX/share/texmf/web2c/cp8bit.tcx)
(./tables.tex{/usr/local/teTeX/share/texmf-var/pdftex/config/pdftex.cfg}
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for english, dumylang,
nohyphenation, ge
rman, ngerman, spanish, french, ukenglish, dutch, loaded.
(/usr/local/teTeX/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/local/teTeX/share/texmf/tex/latex/base/size11.clo))
> 794.96999pt.
l.3 \showthe\paperheight
?
> 845.04694pt.
l.4 \showthe\pdfpageheight
?
> 614.295pt.
l.5 \showthe\paperwidth
?
> 597.50793pt.
l.6 \showthe\pdfpagewidth
?
... so that it looks like for letter-paper there is
a clear difference.
But after \begin{document} has been reached, the PDF length
values are altered...
loading : Context Support Macros / Missing
)
loading : Context Support Macros / PDF
)
> 794.96999pt.
l.29 \showthe\pdfpageheight
?
> 614.295pt.
l.31 \showthe\pdfpagewidth
?
... giving perfect agreement.
> For those knowledgeable in the PDF format, I think \pdfpagewidth
> etc. refer to something called the MediaBox.
The media refers to the size of the sheet of paper for which
the document is presumaed to be destined, at least when printed.
> If you look, for example, at the definition of \magnification in /
> usr/local/teTeX/share/texmf.tetex/tex/plain/base/plain.tex, you'll
> see that Knuth redefines \hsize and \vsize (to their US Letter
> paper defaults) after setting the \mag:
>
> \def\magnification{\afterassignment\m at g\count@}
> \def\m at g{\mag\count@
> \hsize6.5truein\vsize8.9truein\dimen\footins8truein}
\hsize and \vsize are *variables* --- especially in a LaTeX
job containing columns, item-lists, and tables.
These are reset many, many times according to just how much
space is available to contain the incoming material for
paragraphs and table-cells, etc.
Try the command (in a terminal):
grep hsize `kpsewhich latex.ltx`
to see some of these changes of value.
> So the same should go for A4 paper, and in pdfTeX one should add
> the redefinition of \pdfpagewidth and \pdfpageheight as well.
As for using \magnification with LaTeX, the Companion (2nd ed. page
210)
says:
The TeX program offers a magnification feature that magnifies
all specified dimensions and all used fonts by a specified factor.
Standard LaTeX has disabled this feature, but with [the geometry
package] it is again at the disposal of the user via the option mag .
In other words: user beware.
Check out what your packages are doing, and how they may interact
to give (or spoil) the effects that you want to achieve.
You are now going beyond what can be deduced from standard LaTeX
usage and documentation.
>
> Hope this helps,
and this.
>
> Bruno Voisin
Cheers,
Ross
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia 2109 fax: +61 +2 9850 8114
------------------------------------------------------------------------
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the MacOSX-TeX
mailing list