我正在使用eledmac
来排版一份包含两栏的回忆录文档。右栏顶部的第一个行号继续放置在栏的左侧,就像左栏一样,而不是放置在右侧的页边距中。从第二页开始的左栏也是如此(其第一个行号从前一页的右栏继续放置在栏的右侧)。
我考虑过使用multicol
包,但我需要使用eledmac
行号/关键设备。我也尝试了eledmac
命令\linenummargin
,但没有成功。当然,我肯定错过了一个简单的解决方法。附加 MWE:
\documentclass[letterpaper,12pt,twocolumn,landscape]{memoir}
\usepackage{polyglossia}
\usepackage[parapparatus]{eledmac}
\usepackage{lipsum}
\usepackage{verse}
\setlrmarginsandblock{.75in}{.75in}{1}
\setulmarginsandblock{.75in}{.75in}{1}
\checkandfixthelayout
\setcolsepandrule{28pt}{0pt}
\setcounter{firstlinenum}{1}
\setcounter{linenumincrement}{2}
\lineation{page}
\linenummargin{right}
\begin{document}
\chapter*{Hello World}
\beginnumbering
\pstart
\lipsum
\pend
\endnumbering
\end{document}
感谢 David Carlisle 的帮助回复,结果有了很大的改善(现在只是大多数页面上的顶部#被关闭了):
答案1
原版在最后,这个版本在位置信息中保存了页面和行号,可以应对重新设置行号的情况
\documentclass[letterpaper,12pt,twocolumn,landscape]{memoir}
\usepackage{polyglossia}
\usepackage[parapparatus]{eledmac}
\usepackage{lipsum}
\usepackage{verse}
\setcounter{firstlinenum}{1}
\setcounter{linenumincrement}{2}
\lineation{page}
\linenummargin{right}
\makeatletter
\def\eldefkey{\romannumeral\line@num @\romannumeral\c@page}
\let\saved@affixline@num\affixline@num
\def\affixline@num{{%
\pdfsavepos
\edef\tmp{\write\@auxout{%
\gdef\string\eldef \romannumeral\line@num @\noexpand\romannumeral\c@page
{\noexpand\the\pdflastxpos}}}%
\tmp
\expandafter\ifx\csname eldef\eldefkey\endcsname\relax
\else
\ifnum \csname eldef\eldefkey\endcsname=3818782 % 3818782
\@firstcolumntrue
\else \ifnum \csname eldef\eldefkey\endcsname=25445662 % 19514654
\@firstcolumnfalse
\else \ifnum \csname eldef\eldefkey\endcsname=5653790 % 5653790
\@firstcolumntrue
\else \ifnum \csname eldef\eldefkey\endcsname=27280670 % 21349662
\@firstcolumnfalse
\else
\showthe\line@num
\fi\fi\fi\fi
\fi
% force first number to first column
\ifnum\line@num=1
\@firstcolumntrue
\fi
\saved@affixline@num}}
\renewcommand*{\affixpstart@num}{%
\ifsidepstartnum
\if@twocolumn
\if@firstcolumn
\gdef\l@dld@ta{\llap{QQQQ{\leftpstartnum}}}%
\else
\gdef\l@drd@ta{\rlap{PPPP{\rightpstartnum}}}%
\fi
\else
\@l@dtempcntb=\line@margin
\ifnum\@l@dtempcntb>\@ne
\advance\@l@dtempcntb \page@num
\fi
\ifodd\@l@dtempcntb
\gdef\l@drd@ta{\rlap{XXXXX{\rightpstartnum}}}%
\else
\gdef\l@dld@ta{\llap{YYYYY{\leftpstartnum}}}%
\fi
\fi
\fi
}
\makeatother
\begin{document}
\chapter*{Hello World}
\beginnumbering
\pstart
\lipsum
\pend
\endnumbering
\end{document}
我没有字体,所以使用标准字体设置进行了测试,但似乎可以正常工作。这不是一个完整的修复,而是一个手动解决方法,当出现问题时,序言中添加的代码会强制行号30
切换。
\documentclass[letterpaper,12pt,twocolumn]{memoir}
\usepackage{polyglossia}
\usepackage[parapparatus]{eledmac}
\usepackage{lipsum}
%\setmainfont{Linux Libertine O}
\linenummargin{left}
\makeatletter
\let\saved@affixline@num\affixline@num
\def\affixline@num{{%
\pdfsavepos
\edef\tmp{\write\@auxout{%
\gdef\string\eldef\romannumeral\line@num{\noexpand\the\pdflastxpos}}}%
\tmp
\expandafter\ifx\csname eldef\romannumeral\line@num\endcsname\relax
\else
\ifnum \csname eldef\romannumeral\line@num\endcsname=3818782
\@firstcolumntrue
\else \ifnum \csname eldef\romannumeral\line@num\endcsname=19514654
\@firstcolumnfalse
\else \ifnum \csname eldef\romannumeral\line@num\endcsname=5653790
\@firstcolumntrue
\else \ifnum \csname eldef\romannumeral\line@num\endcsname=21349662
\@firstcolumnfalse
\else
\showthe\line@num
\fi\fi\fi\fi
\fi
\saved@affixline@num}}
\makeatother
\begin{document}
\chapter*{Hello World}
\beginnumbering
\pstart
\lipsum
\pend
\endnumbering
\end{document}