Изменение полей страницы в {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

Связанный контент