我想我找到了一个能实现我想要的效果的方法。在 A5 纸张上,我使用了 45mm 的装订边距 (Binding Gutter),选择了外侧边距 (Outer Gutter),然后选择了标记和辅助线 (Marks & Guides),具体是网格(方格纸) (Grid (Graph Paper))。在用户界面中,我选择了颜色,并将细分线的线宽设为零。
然后,我从 "ptx-cropmarks.tex" 文件中复制了整个 "\doGraphPaper " 函数,并将其粘贴到 "ptxprint-mods.tex" 字段中。接着,我对其进行了修改以使其适用于我的情况。
我通过基本上撤销它们来关闭了垂直线 ,然后修改了水平线 以符合我的要求。我通过更改顶部偏移量 ,将顶部线条 与“水平线”(来自布局选项卡中边距设置里的 Horizontal Rule)对齐。因为我想使用外侧边距,所以我使用 "\ifodd\pageno...\else " 策略分别为一侧和另一侧设置线条。"\GraphPaperY " 属性可以定义以更改线条之间的间距。同样,我的数值是基于使用 A5 纸张的。
以下是我添加到 "ptxprint-mods.tex" 中的代码:
\def\doGraphPaper{% \bgroup\topskip=0pt\baselineskip=0pt\parindent=0pt\everypar{}\relax \def\GraphPaperYoffset{1.81cm } %vertical rules % \def\th@sgprule{Major}% \def\gp@type{GraphPaper}% \count255=\GraphPaperMajorDiv \dimen1=\GraphPaperX \dimen2=\pdfpagewidth \dimen3=\pdfpageheight \dimen0=\GraphPaperYoffset % \advance\dimen3 by -\dimen0 \advance\dimen3 by -50 \dimen0 \advance\dimen2 by -2 \dimen1 \advance\dimen2 by -\GraphPaperXoffset \setbox0=\hbox{\kern\GraphPaperXoffset\gp@vrule}% \gp@step \gp@vrules \vbox to 0pt{\hbox to 0pt{\unhbox 0\gp@vrule\hss}\vss}% % Horizontal rules % \def\th@sgprule{Major}% \count255=\GraphPaperMajorDiv \def\GraphPaperY{0.3535mm }% For less space between lines \dimen1=\GraphPaperY \dimen2=\pdfpageheight \advance\dimen2 by -\dimen1
\ifodd\pageno \dimen3=.5 \pdfpagewidth \def\GraphPaperXoffset{9.5 cm}% Beginning of line \dimen0=\GraphPaperXoffset \advance\dimen3 by -0.325 \dimen0 % leave 1cm between end of line and right margin
\else \dimen3=\pdfpagewidth \def\GraphPaperXoffset{1.0cm } \dimen0=\GraphPaperXoffset \advance\dimen3 by -10.5 \dimen0 % leave 1cm between end of line and inside margin \fi
\setbox0=\vbox{\kern\GraphPaperYoffset\gp@hrule}% \gp@step \gp@hrules \vbox to 0pt{\unvbox 0\vss}% \cp@p\global\let\l@stgprule\empty \egroup }
我相信这可以做得更优雅!我当时是在边学边做,并尽量利用已有的内容。但这是由此产生的布局:
I think I worked something out that gives me what I'm looking for. On A5 paper, I used a Binding Gutter of 45mm, selected Outer Gutter , and then selected the Marks & Guides , then specifically the Grid (Graph Paper) . In the UI, I selected the color, and I turned the minor divisions line thickness to zero.
I then copied the entire "\doGraphPaper " function from the "ptx-cropmarks.tex" file and pasted it into the "ptxprint-mods.tex" field. I then modified it to make it work for me.
I turned the vertical lines off by basically undoing them, and then I changed the horizontal lines into what I wanted them to be. I lined up the top line with the "Horizontal Rule" (from the UI's Margins on the Layout tab) by changing the top offset . Because I wanted to use the outer gutter, I used an "\ifodd\pageno...\else " strategy to set the lines for one side and the other separately. The "\GraphPaperY " property can be defined to change the space between the lines. Again, I based the numbers on using A5 paper.
Here's the code I added into "ptxprint-mods.tex":
\def\doGraphPaper{% \bgroup\topskip=0pt\baselineskip=0pt\parindent=0pt\everypar{}\relax \def\GraphPaperYoffset{1.81cm } %vertical rules % \def\th@sgprule{Major}% \def\gp@type{GraphPaper}% \count255=\GraphPaperMajorDiv \dimen1=\GraphPaperX \dimen2=\pdfpagewidth \dimen3=\pdfpageheight \dimen0=\GraphPaperYoffset % \advance\dimen3 by -\dimen0 \advance\dimen3 by -50 \dimen0 \advance\dimen2 by -2 \dimen1 \advance\dimen2 by -\GraphPaperXoffset \setbox0=\hbox{\kern\GraphPaperXoffset\gp@vrule}% \gp@step \gp@vrules \vbox to 0pt{\hbox to 0pt{\unhbox 0\gp@vrule\hss}\vss}% % Horizontal rules % \def\th@sgprule{Major}% \count255=\GraphPaperMajorDiv \def\GraphPaperY{0.3535mm }% For less space between lines \dimen1=\GraphPaperY \dimen2=\pdfpageheight \advance\dimen2 by -\dimen1
\ifodd\pageno \dimen3=.5 \pdfpagewidth \def\GraphPaperXoffset{9.5 cm}% Beginning of line \dimen0=\GraphPaperXoffset \advance\dimen3 by -0.325 \dimen0 % leave 1cm between end of line and right margin
\else \dimen3=\pdfpagewidth \def\GraphPaperXoffset{1.0cm } \dimen0=\GraphPaperXoffset \advance\dimen3 by -10.5 \dimen0 % leave 1cm between end of line and inside margin \fi
\setbox0=\vbox{\kern\GraphPaperYoffset\gp@hrule}% \gp@step \gp@hrules \vbox to 0pt{\unvbox 0\vss}% \cp@p\global\let\l@stgprule\empty \egroup }
I'm sure it could be done more elegantly! I was trying to learn on the fly and use what was already there. But this is the layout that came from it:
机器翻译自 English 显示原文