我正在尝试学习如何使用“reledpar”包。特别是,我希望在一个页面上显示多个文本,并在对页上显示它们的翻译。因此,我发现使用 reledpar 包(与 reledmac 一起提供)可能是可行的方法。
我从以下简单的代码开始:
\documentclass[twoside]{book}
\usepackage[]{reledmac}
\usepackage[]{reledpar}
\begin{document}
\begin{pages}
\begin{Leftside}
\beginnumbering
\pstart
1L first left text: Received shutters expenses
ye he pleasant. Drift as blind above at up. No up simple county stairs
do should praise as. Drawings sir gay together landlord had law
smallest. Formerly welcomed attended declared met say unlocked.
Jennings outlived no dwelling denoting in peculiar as he believed.
Behaviour excellent middleton be as it curiosity departure ourselves.
\pend
%
\pstart
\setcounter{pstartL}{0}
2L second left text: On no twenty spring of in
esteem spirit likely estate. Continue new you declared differed
learning bringing honoured. At mean mind so upon they rent am walk.
Shortly am waiting inhabit smiling he chiefly of in. Lain tore time
gone him his dear sure. Fat decisively estimating affronting
assistance not. Resolve pursuit regular so calling me. West he plan
girl been my then up no.
\pend
\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering
\pstart
1R first right text: Received shutters expenses
ye he pleasant. Drift as blind above at up. No up simple county stairs
do should praise as. Drawings sir gay together landlord had law
smallest. Formerly welcomed attended declared met say unlocked.
Jennings outlived no dwelling denoting in peculiar as he believed.
Behaviour excellent middleton be as it curiosity departure ourselves.
\pend
%
\pstart
\setcounter{pstartR}{0}
2R second right text: On no twenty spring of in
esteem spirit likely estate. Continue new you declared differed
learning bringing honoured. At mean mind so upon they rent am walk.
Shortly am waiting inhabit smiling he chiefly of in. Lain tore time
gone him his dear sure. Fat decisively estimating affronting
assistance not. Resolve pursuit regular so calling me. West he plan
girl been my then up no.
\pend
\endnumbering
\end{Rightside}
\end{pages}
\Pages
\end{document}
但是,无论是在左侧还是右侧,当第二个文本开始时,我希望行号从 0 重新开始。为此,我查看了 CTAN 文档,然后插入
\setcounter{pstartL}{0}
\setcounter{pstartR}{0}
将 pstart 计数器再次设置为零。但是结果没有任何变化,我真的不明白为什么。
另外,我想将两段文字在两边展开,从而在现在有 % 符号的位置插入更多垂直空间。我尝试手动插入(这显然不是最好的解决方案),但结果并不好。你们有什么建议吗?
我已提前感谢您对此主题的任何评论和回答!
答案1
你的问题中有两个问题。将来,最好每个问题都提出一个问题。但是,这里是答案
行号
pstartL
和pstartR
计数器是用于pstart
在左侧和右侧进行编号的计数器。如果您希望对pstart
进行编号,则必须使用它,使用\numberpstarttrue
来自reledmac
。但您在这里要管理的不是与每个 关联的数字pstart
,而是与每行关联的数字(行编号,而不是pstart
编号)。
reledmac
/本机系统在每个:reledpar
处重置行号 (手册第 5.3.3 节)。要将其应用于两侧,请使用星号选项。pstart
\lineation{pstart}
reledmac
所以你的例子将是
\documentclass[twoside]{book}
\usepackage[]{reledmac}
\usepackage[]{reledpar}
\lineation*{pstart}
\firstlinenum*{1}
\linenumincrement*{1}
\begin{document}
\begin{pages}
\begin{Leftside}
\beginnumbering
\pstart
1L first left text: Received shutters expenses
ye he pleasant. Drift as blind above at up. No up simple county stairs
do should praise as. Drawings sir gay together landlord had law
smallest. Formerly welcomed attended declared met say unlocked.
Jennings outlived no dwelling denoting in peculiar as he believed.
Behaviour excellent middleton be as it curiosity departure ourselves.
\pend
%
\pstart
2L second left text: On no twenty spring of in
esteem spirit likely estate. Continue new you declared differed
learning bringing honoured. At mean mind so upon they rent am walk.
Shortly am waiting inhabit smiling he chiefly of in. Lain tore time
gone him his dear sure. Fat decisively estimating affronting
assistance not. Resolve pursuit regular so calling me. West he plan
girl been my then up no.
\pend
\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering
\pstart
1R first right text: Received shutters expenses
ye he pleasant. Drift as blind above at up. No up simple county stairs
do should praise as. Drawings sir gay together landlord had law
smallest. Formerly welcomed attended declared met say unlocked.
Jennings outlived no dwelling denoting in peculiar as he believed.
Behaviour excellent middleton be as it curiosity departure ourselves.
\pend
%
\pstart
2R second right text: On no twenty spring of in
esteem spirit likely estate. Continue new you declared differed
learning bringing honoured. At mean mind so upon they rent am walk.
Shortly am waiting inhabit smiling he chiefly of in. Lain tore time
gone him his dear sure. Fat decisively estimating affronting
assistance not. Resolve pursuit regular so calling me. West he plan
girl been my then up no.
\pend
\endnumbering
\end{Rightside}
\end{pages}
\Pages
\end{document}
(我添加了\linenumincrement*
并\firstlinenum*
为了设置打印行号的频率。)
并不是说你必须运行 LaTeX 两次才能得到正确的行号。一般来说,使用reledmac
/ 时reledpar
,你应该使用latexmk
或类似的工具来轻松得到正确的运行次数。
之间的垂直间距pstart
。
您可以使用\AtEveryPend
在每个 后插入内容,包括垂直间距\pend
。
例如将插入一个等于 2 行高(或者更准确地说,等于 2 )\AtEveryPend{\vskip2\baselineskip}
的垂直跳过( ) 。\vskip
\baselineskip
最终代码如下
\documentclass[twoside]{book}
\usepackage[]{reledmac}
\usepackage[]{reledpar}
\lineation*{pstart}
\firstlinenum*{1}
\linenumincrement*{1}
\AtEveryPend{\vskip2\baselineskip}
\begin{document}
\begin{pages}
\begin{Leftside}
\beginnumbering
\pstart
1L first left text: Received shutters expenses
ye he pleasant. Drift as blind above at up. No up simple county stairs
do should praise as. Drawings sir gay together landlord had law
smallest. Formerly welcomed attended declared met say unlocked.
Jennings outlived no dwelling denoting in peculiar as he believed.
Behaviour excellent middleton be as it curiosity departure ourselves.
\pend
%
\pstart
2L second left text: On no twenty spring of in
esteem spirit likely estate. Continue new you declared differed
learning bringing honoured. At mean mind so upon they rent am walk.
Shortly am waiting inhabit smiling he chiefly of in. Lain tore time
gone him his dear sure. Fat decisively estimating affronting
assistance not. Resolve pursuit regular so calling me. West he plan
girl been my then up no.
\pend
\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering
\pstart
1R first right text: Received shutters expenses
ye he pleasant. Drift as blind above at up. No up simple county stairs
do should praise as. Drawings sir gay together landlord had law
smallest. Formerly welcomed attended declared met say unlocked.
Jennings outlived no dwelling denoting in peculiar as he believed.
Behaviour excellent middleton be as it curiosity departure ourselves.
\pend
%
\pstart
2R second right text: On no twenty spring of in
esteem spirit likely estate. Continue new you declared differed
learning bringing honoured. At mean mind so upon they rent am walk.
Shortly am waiting inhabit smiling he chiefly of in. Lain tore time
gone him his dear sure. Fat decisively estimating affronting
assistance not. Resolve pursuit regular so calling me. West he plan
girl been my then up no.
\pend
\endnumbering
\end{Rightside}
\end{pages}
\Pages
\end{document}
注意有关 reledmac/reledpar 手册的一般信息
如果您认为您的需求特定于并行排版,请查看reledpar
手册。如果您认为您的需求不特定于并行排版,请查看reledmac
手册。