Я проверял это решение Макса Черноффа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
И это производит это:
Подозреваю, что это нетривиально, но что нужно сделать, чтобы на этих страницах не было места для заметок на полях?
PS: Я начинаю думать, что было бы желательно, чтобы на страницах, предназначенных для благодарностей, библиографии или указателя, также не было места для заметок на полях.
решение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
команду, которая установит поля равными с обеих сторон. Чтобы убедиться, что она применяется только локально, используйте ее внутри группы, которая заканчивается разрывом страницы.