更改 {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

相关内容