I'm trying to start using plain tex (in fact, the pdftex that comes with texlive2010) to write a document but I'm having some trouble with the page layout. My question is at which point is it decided what the dimensions of the page and the margins will be?
As far as I investigated the \plainoutput
routine in plain.tex only sets the height and width of the \box255
plus headers, footers, etc, but page dimensions (like A4, letter, portrait, landscape, etc) and margins are never defined. Moreover the TEXBOOK says that by default the page layout has 1in
of margin at each side (page 251) but I don't know when are these margins defined nor why in my final pdf output the document appears with A4 size, 1in
of left margin and approximatley 0.7in
of right margin. So the question again is when are these dimensions decided?
\hsize
in plain TeX is6.5in
and it centers content on page only when paper width is8.5in
, leaving1in
margin on both sides. US Letter paper has this page width. The default\hsize
gives slightly shorter right margin (~0.77in
) with default page size (A4 with width8.27in
). Setting\hsize=6.27in
corrects the margins for A4 paper. I figured this out while trying to make\centerline
actually center the line on page.