File: FAQ-papersize.html

package info (click to toggle)
tetex-base 3.0.dfsg.3-5
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 239,540 kB
  • ctags: 10,610
  • sloc: xml: 103,461; perl: 9,398; ruby: 2,850; python: 1,551; php: 1,067; sh: 981; lisp: 494; makefile: 371; awk: 88
file content (57 lines) | stat: -rw-r--r-- 3,659 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<head>
<title>UK TeX FAQ -- question label papersize</title>
</head><body>
<h3>Printer paper sizes</h3>
<p>Paper sizes can be a pain: they're a forgotten backwater, because
there's no DVI command to specify the paper size of the
document.  One usually finds American "letter" paper size being
used, by default, in macro packages (such as <i>plain</i> and
LaTeX); but distributions provide configuration files for
DVI drivers (and since most distributions originate in Europe,
the drivers usually default to ISO "A4" paper size).
<p>This is (of course) pretty unsatisfactory.  Users may change the paper
size their document is designed for, pretty easily (and once off), but
they have to ensure that every run of <i>xdvi</i>,
<i>dvips</i>, or whatever, is given the correct override for using
anything non-'standard'.
<p>Of course, the default paper size for DVI drivers may be
changed by a distribution management command, but this still doesn't
provide for people using the "wrong" sort of paper for some reason.
<p>An interestingly different issue arises for users of PDFTeX - the
PDF format <em>does</em> have the means of expressing paper size,
but much of the core software predates PDFTeX, so not even
PDFLaTeX sets the correct values into <code>\</code><code>pdfpagewidth</code> and
<code>\</code><code>pdfpageheight</code>.
<p>The DVI drivers <i>dvips</i> and <i>dvipdfm</i> define
<code>\</code><code>special</code> commands for the document to specify its own paper size;
so in those cases, as in the case of PDFTeX and VTeX, the paper
size can be programmed by the document.  Users who wish to, may of
course consult the manuals of the various programs to write the
necessary code.
<p>The <i>geometry</i> package (whose main business is defining
typeset page areas), also takes notice of the paper size the document
is going to print to, and can issue the commands necessary to ensure
the correct size is used.  If <i>geometry</i> is used when a
document is being processed by either PDFLaTeX or VTeX, it will
set the necessary dimensions as a matter of course.  If the document
is being processed by LaTeX on a TeX or e-TeX engine, there
are two package options (<code>dvipdfm</code> and <code>dvips</code>)
which instruct <i>geometry</i> which <code>\</code><code>special</code> commands to use.
(Note that the options are ignored if you are using either PDFLaTeX
or VTeX.)
<p>So, the resolution of the problem is to add
<pre>
  \usepackage[dvixxx,...]{geometry}
</pre>
(where <code>dvixxx</code> is your current favourite DVI
driver), and the document will run correctly with any of
LaTeX (whether or not run on VTeX) or PDFLaTeX.
<p>Give the <i>typearea</i> package the <code>pagesize</code> and it
will do the same job, for PDFLaTeX output and PostScript output from
LaTeX via <i>dvips</i>.
<dl>
<dt><tt><i>geometry.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/geometry.tar.gz">macros/latex/contrib/geometry</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/geometry.zip">zip</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/geometry/">browse</a>)
<dt><tt><i>typearea.sty</i></tt><dd>Distributed as part of <a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/koma-script.tar.gz">macros/latex/contrib/koma-script</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/koma-script.zip">zip</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/koma-script/">browse</a>)
</dl>
<p><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=papersize">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=papersize</a>
</body>