我怎样才能设置 \stanzas 之间的跳过

我怎样才能设置 \stanzas 之间的跳过

是否可以在reledmac(和reledpar) 的节之间自动插入跳过(空行)。以前的使用方法\endstanzaextra不再有效……

\documentclass{article}

\usepackage{reledmac}
\setstanzaindents{1,0}
\setcounter{stanzaindentsrepetition}{1}

% doesn't word anymore
\def\endstanzaextra{\pstart\strut\skipnumbering\pend}

\begin{document}
\beginnumbering
\stanza First Verse & Second Verse \&
\stanza Third Verse & Fourth Verse \&
\endnumbering
\end{document}

答案1

刚刚在 CTAN 上发送的2.10.0 版本reledmac添加了一个名为 的新钩子\AtEveryStopStanza。请参阅此 MWE:

\documentclass{article}

\usepackage{reledmac}
\setstanzaindents{1,0}
\setcounter{stanzaindentsrepetition}{1}

\AtEveryStopStanza{\vspace{2\baselineskip}}


\begin{document}
\beginnumbering
\stanza[\textsf{optional before}] First Verse & Second Verse \&[\textsf{optional after}]
\stanza Third Verse & Fourth Verse \&
\stanza Fifth Verse & Sixth Verse \&
\stanza 7th Verse & 8th Verse \&
\endnumbering
\end{document}

答案2

根据reledmac手册,可以提供可选参数\&来在诗句后插入内容,也可以提供用于\stanza在诗句前插入内容的参数。因此,这两个参数都可以通过添加空格来创建空白行。

\documentclass{article}

\usepackage{reledmac}
\setstanzaindents{1,0}
\setcounter{stanzaindentsrepetition}{1}

% doesn't word anymore
%\def\endstanzaextra{\pstart x\strut\skipnumbering\pend}

\begin{document}
\beginnumbering
\stanza First Verse & Second Verse \&[*After verse*]
\stanza[/Before verse/] Third Verse & Fourth Verse \&
\stanza[ ]Third Verse & Fourth Verse \&[ ]
\stanza Third Verse & Fourth Verse \&
\endnumbering
\end{document}

enter image description here

查看样式文件以了解自动化方法,可以使用重新定义在每个节的开头自动添加一个空白行

\makeatletter
\renewcommandx{\stanza}[1][1,usedefault]{\@startstanza[#1~]}
\makeatother

同样,通过以下重新定义可以在每节末尾自动添加一个空白行:

\makeatletter
\renewcommandx{\@stopstanza}[1][1,usedefault]{%
  \unskip%
  \endlock%
  \pend[#1$\!\!$]%
  \endgroup%
  \instanzafalse%
}
\makeatother

\stanza这两个重新定义都只是修改了或的默认可选参数\&

正在使用:

\documentclass{article}

\usepackage{reledmac}
\setstanzaindents{1,0}
\setcounter{stanzaindentsrepetition}{1}

\makeatletter
% THE FOLLOWING INSERTS BLANK LINE BEFORE EACH STANZA
%\renewcommandx{\stanza}[1][1,usedefault]{\@startstanza[#1~]}

% THE FOLLOWING INSERTS BLANK LINE AFTER EACH STANZA
\renewcommandx{\@stopstanza}[1][1,usedefault]{%
  \unskip%
  \endlock%
  \pend[#1$\!\!$]%
  \endgroup%
  \instanzafalse%
}
\makeatother

\begin{document}
\beginnumbering
\stanza[\textsf{optional before}] First Verse & Second Verse \&[\textsf{optional after}]
\stanza Third Verse & Fourth Verse \&
\stanza Fifth Verse & Sixth Verse \&
\stanza 7th Verse & 8th Verse \&
\endnumbering
\end{document}

enter image description here

相关内容