旁注 `module` 影响 OpTeX 中的标题页

旁注 `module` 影响 OpTeX 中的标题页

我正在查看 Max Chernoff 的解决方案https://tex.stackexchange.com/a/689656/14423关于边注的垂直对齐,OpTeX它运行完美。现在,我一直在尝试使用命令\tit\author\maketoc\part我注意到,无论我把它们放在哪里,这样的解决方案都会影响它们,使相应的页面有边注的空间:

\report
\fontfam[EB Garamond]

\margins/2 a4 (1,3,2,2)in

\typosize[10/11.5]

\parindent=0pt
\parskip=1ex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%PART
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcount\partnum
\eoldef\part#1{\vfil\break
   \incr\partnum \_chapnum=0 \_chapx % reset counters
   \vglue100pt
   \incr\tocrefnum \dest[toc:\the\tocrefnum] % destination from TOC and outlines
   \centerline{\typosize[20/]\bf Part \the\partnum:\quad #1} % Title
   \_ewref\_Xtoc{{0}{part}{}{}#1} % TOC line, \part has level 0
   {\nopagenumbers \vfil\break}   % single page without pageno
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\tit My Title
\author By Me

\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Table of contents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\nonum\notoc\sec Contents
\maketoc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%sidenotes, requiere sidenote.lua y sidenote.opm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addto\_begoutput{%
    \ifodd\pageno%
        \sidenote_side\right%
    \else%
        \sidenote_side\left%
    \fi%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\load[sidenote]

\part First part

\chap My first chap
AAA

\lorem[1.]\sidenote{\lorem[1.]}

\lorem[2.]\sidenote{\lorem[2.]}

\def\_par{\let\_par=\par}
\lorem[3]\sidenote{\lorem[3.]}

\lorem[4.]\sidenote{\lorem[4.]}

\lorem[5.]\sidenote{\lorem[5.]}
\lorem[6.]\sidenote{\lorem[6.]}
\lorem[7.]\sidenote{\lorem[7.]}

\vfill\eject

\part Second part

\chap My second chapter

\sidenote_number=199
\def\sidenote_makemark{%
    \leavevmode%
    \raise 0.7ex%
    \hbox{\typosize[8/8]\romannumeral\sidenote_number}%
}

\def\sidenote_makeleft#1{%
    \hsize=2in\relax%
    \leftskip=0pt plus 1fill\relax%
    \rightskip=1in\relax%
    \it%
    \sidenote_makemark%
    #1%
    \vskip 1cm\relax%
}

\lorem[1.]\sidenote{\lorem[1.]}

\lorem[2.]\sidenote{\lorem[2.]}

\def\_par{\let\_par=\par}
\lorem[3]\sidenote{\lorem[3.]}

\lorem[4.]\sidenote{\lorem[4.]}

\lorem[5.]\sidenote{\lorem[5.]}
\lorem[6.]\sidenote{\lorem[6.]}
\lorem[7.]\sidenote{\lorem[7.]}

\bye

由此产生了如下结果:

标题

目录

FP

斯普

我怀疑这并不是什么小事,但需要做什么才能让这些页面没有空间留下边注呢?

附言:我开始认为,用于致谢、参考书目或索引的页面最好也没有空间用于边注。

答案1

这里的问题全部来自\margins命令,并不直接取决于旁注(尽管旁注通常需要不均匀的边距才能有足够的空间)。解决方案是在需要的地方将边距设置为相等:

\fontfam[EB Garamond]
\report

% Offset two-sided left/right margins by default
\margins/2 a4 (1,3,2,2)in

% Switch to equal single-sided margins
\def\evenmargins{%
    \margins/1 a4 (1,1,,)in
}

% Define a *really* basic "part" heading
\eoldef\part#1{
    \vfil\break
    {
        \evenmargins
        \centerline{\typosize[20/]\bf Part #1}

        {\noindent \it\lorem[1]}

        {\nopagenumbers \vfil\break}
    }
}

% Front matter
{
    \evenmargins
    \tit My Title
    \author By Me

    \vfill

    \nonum\notoc\sec Contents
    \maketoc

    \vfil\eject
}

% Document body
\part One

\chap One

\lorem[1-7]

\part Two

\chap Two

\lorem[1-7]

\bye

输出

这里,我们定义了一个\evenmargins命令,它将设置两边的边距相等。为了确保它只在本地应用,请在以分页符结尾的组内使用它。

相关内容