更改 {pdf-,Xe-}TeX 中的頁邊距

更改 {pdf-,Xe-}TeX 中的頁邊距

在 TeX 中,變更\hsize和 會\vsize變更主文字大小和 dvi 輸出的頁面大小。當我使用 pdftex 或 xetex 編譯文件時,頁面大小仍為 A4。如何更改頁邊距?

最小的例子:

\hsize=5cm \vsize=4cm
\footline{\hfil The page ends here!\hfil\the\pageno}
This document leaves much white space when {\tt pdftex\/}ed or {\tt xetex\/}ed.

\bye

答案1

{Lua-,pdf-,Xe-}TeX 的解

\hsize=2in \vsize=3in
\pdfpagewidth=4in
\pdfpageheight=5in
\footline{\hfil The page ends here!\hfil\the\pageno}
This document is by far better! Notice that \TeX{} starts every page
one inch away from the upper and left margin.
This example doesn't compile with {\tt tex} anymore.

\bye

相關內容