我刚意识到存在的另一个选项是在 ptxprint-mods.txt 中包含以下内容:
\def\llapChapter{\edef\printchapter{\llap{\printchapter}}}
\setbookhook{start}{SNG}{\let\PrepChapterNumber\llapChapter}
\setbookhook{end}{SNG}{\let\PrepChapterNumber\relax}这将使章节号完全突出到左边距,并通过钩子设置使其仅在 SNG 中发生。
我也一直在致力于让左边距、右边距和对齐方式对章节号产生效果……
(github)测试版本中的当前状态:
如果对齐方式设置为“右对齐”,则右边距(或者,由于右边距不能设置为负值,如果右边距保持为 0,则为左边距)指定章节号右边缘的位置。(相对于左边距)。一旦它进入发布版本,这将使上述代码变得不必要。
对于其他对齐设置,左边距会相对于页边距缩进/外缩章节号的左侧。
Another option which I've just realised exists is to include the following in ptxprint-mods.txt:
\def\llapChapter{\edef\printchapter{\llap{\printchapter}}}
\setbookhook{start}{SNG}{\let\PrepChapterNumber\llapChapter}
\setbookhook{end}{SNG}{\let\PrepChapterNumber\relax}This will set the chapter number to stick out into the left-margin (entirely), with the hooks setting that to only happen in SNG.
I've also been working on making left-margin, right-margin, and justification have an effect on chapter numbers...
Current state in (github) test-version:
If justification is set to 'right', then the right margin (or, since rightmargin can't be set negative, leftmargin if the rightmargin is left at 0) specifies where the right-hand edge of the chapter number sits. (relative to the left margin). This will make the above piece of code unnecessary, once it makes it to a released version.
For other justification settings, left margin indents / outdents the left side of the chapter number relative to the margin.
机器翻译自 English