如何在 XeTeX 中设置裁切框

如何在 XeTeX 中设置裁切框

请告诉我如何在 xelatex 中修复修剪、出血和艺术框。在这里我使用了以下代码,它仅在 pdflatex 中受支持,而不适用于 xelatex。如果有人能提供更好的解决方案,我将不胜感激。谢谢!

梅威瑟:

\documentclass{book}   

\makeatletter    
\pdfpageattr{
/MediaBox [0 0 612.00000 792.00000]
/BleedBox [81.0 63.0 531.0 729.0]
/CropBox [0 0 612.00000 792.00000]
/TrimBox [90.0 72.0 522.0 720.0]
}

\makeatother

\begin{document}
Between 200BC and 100BC, during the Han Dynasty, the Chinese used matrix-type methods with the text \textit{Nine chapters on the mathematical art}. There was further development, but it was not until 1683 when the idea of a determinant appeared in Japan when Seki wrote \textit{Method of solving the dissimulated problems}. This used matrix methods in tables in the same way as the earlier work of the Chinese. Ten years later the determinant first appeared in Europe in the work of Leibniz. The word determinant was first introduced by Gauss in 1801 while discussing quadratic forms, but Cauchy in 1812 used determinant in the modern sense.

Between 200BC and 100BC, during the Han Dynasty, the Chinese used matrix-type methods with the text \textit{Nine chapters on the mathematical art}. There was further development, but it was not until 1683 when the idea of a determinant appeared in Japan when Seki wrote \textit{Method of solving the dissimulated problems}. This used matrix methods in tables in the same way as the earlier work of the Chinese. Ten years later the determinant first appeared in Europe in the work of Leibniz. The word determinant was first introduced by Gauss in 1801 while discussing quadratic forms, but Cauchy in 1812 used determinant in the modern sense.
\end{document}

答案1

/ Xe dvipdfmx(La)TeX 等效于\pdfpageattr@thispage它允许使用特殊的命令将 PDF 代码添加到当前页面对象pdf:put

\special{pdf:put @thispage << ... >>}

使用 所做的设置\pdfpageattr将应用于其调用后的所有页面。但是,使用 XeTeX/dvipdfmx 时, 的效果@thispage仅限于当前页面。要将其扩展到多个或所有文档页面,必须重复插入上述特殊操作。

\documentclass{book}
\usepackage{atbegshi}

\AtBeginShipout{\AtBeginShipoutAddToBox{
  \special{pdf:put @thispage <<
    /MediaBox [0 0 612.00000 792.00000]
    /BleedBox [81.0 63.0 531.0 729.0]
    /CropBox [0 0 612.00000 792.00000]
    /TrimBox [90.0 72.0 522.0 720.0]
  >>}
}}

\begin{document}
Between 200BC and 100BC, during the Han Dynasty, the Chinese used matrix-type methods with the text \textit{Nine chapters on the mathematical art}. There was further development, but it was not until 1683 when the idea of a determinant appeared in Japan when Seki wrote \textit{Method of solving the dissimulated problems}. This used matrix methods in tables in the same way as the earlier work of the Chinese. Ten years later the determinant first appeared in Europe in the work of Leibniz. The word determinant was first introduced by Gauss in 1801 while discussing quadratic forms, but Cauchy in 1812 used determinant in the modern sense.

Between 200BC and 100BC, during the Han Dynasty, the Chinese used matrix-type methods with the text \textit{Nine chapters on the mathematical art}. There was further development, but it was not until 1683 when the idea of a determinant appeared in Japan when Seki wrote \textit{Method of solving the dissimulated problems}. This used matrix methods in tables in the same way as the earlier work of the Chinese. Ten years later the determinant first appeared in Europe in the work of Leibniz. The word determinant was first introduced by Gauss in 1801 while discussing quadratic forms, but Cauchy in 1812 used determinant in the modern sense.
\end{document}

相关内容