![ledpar 忽略 \startstanzahook(无法在节之间添加额外的空格)](https://linux22.com/image/236414/ledpar%20%E5%BF%BD%E7%95%A5%20%5Cstartstanzahook%EF%BC%88%E6%97%A0%E6%B3%95%E5%9C%A8%E8%8A%82%E4%B9%8B%E9%97%B4%E6%B7%BB%E5%8A%A0%E9%A2%9D%E5%A4%96%E7%9A%84%E7%A9%BA%E6%A0%BC%EF%BC%89.png)
ledmac/-par 手册说我可以使用\startstanzahook
来在节之间获得额外的空间。但它只适用于普通的与非并行排版相反。以下示例可能更好地表达了我的意思:
% XETEX-DOCUMENT
\documentclass{scrartcl}
\usepackage{xltxtra}
\usepackage{ledmac,ledpar}
\maxchunks{100}
\newcommand*{\startstanzahook}{\vspace{\baselineskip}}
\begin{document}
% works (vspace between stanzas):
\beginnumbering
\setstanzaindents{2,0,0}
\stanza
Non ego Caesareas, non arma virumque, &
sed chitaram plectrumque cano nec inutile numen
\&
\stanza
Doctus in Arcadiis vivebat musicus oris, &
clarus circa urbes et famae voce lyraeque.
\&
\endnumbering
% doesn't work (no vspace):
\begin{pages}
\begin{Leftside}
\beginnumbering
\setstanzaindents{2,0,0}
\stanza
Non ego Caesareas, non arma virumque, &
et lyricam poterit, nisi centum vocibus, artem?
\&
\stanza
Doctus in Arcadiis vivebat musicus oris, &
vicina quondam late celebratus in urbe
\&
\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering
\setstanzaindents{2,0,0}
\stanza
Non ego Caesareas, non arma virumque, &
et lyricam poterit, nisi centum vocibus, artem?
\&
\stanza
Doctus in Arcadiis vivebat musicus oris, &
vicina quondam late celebratus in urbe
\&
\endnumbering
\end{Rightside}
\Pages
\end{pages}
\end{document}
有没有办法在并行模式下在节之间插入额外的空格?
答案1
诀窍是将要插入节之间的材料放入单独的\pstart ... \pend
构造中,否则它将不会被延迟输出例程处理ledpar
.因此你必须更换
\newcommand*{\startstanzahook}{\vspace{\baselineskip}}
经过
\def\endstanzaextra{\pstart\skipnumbering\strut\pend}
以便在节之间添加一行额外的行(使用\strut
宏)。请注意,此钩子在结尾在每个节的末尾,而不是开头。这是因为默认情况下,额外的行包含在行号中 - 为了避免这种情况,\skipnumbering
调用了 ,这只能在节的末尾进行。