我用它\startverseline
来将行号与溢出行的开头对齐(如 poetryscol 手册 3.3.2 中所述)。行号现在位于正确的位置,但行略微缩进。有人知道解决这个问题的办法吗?下面是 MWE:
\documentclass{article}
\usepackage{fancyhdr, poemscol}
\setverselinemodulo{2}
\begin{document}
\begin{poem}
\begin{stanza}
Short line\verseline
Long line without startverseline --- long long long long
long long long long long long long long line\verseline
Short line\verseline
\startverseline Long line with startverseline, numbered ---
long long long long long long long long long long line\verseline
Short line\verseline
Short line\verseline
\startverseline Long line with startverseline, not numbered ---
long long long long long long long long long long line\verseline
Short line\end{stanza}
\end{poem}
\end{document}
\startverseline
我遇到了这个问题:无论是否有行号,带有的溢出行都会稍微缩进:
我正在使用最新版本的 xelatex 和 poemscol:
XeTeX 3.14159265-2.6-0.999992 (TeX Live 2020)
Package: poemscol 2020/06/12 v3.141592 poemscol file
答案1
这个包在行尾添加了几十个%,但是却遗漏了几个需要它们的地方:
\documentclass{article}
\usepackage{fancyhdr, poemscol}
\makeatletter
\renewcommand{\verseline}{\ifspeciallinelock%
\relax\else%
\nolinebreak\incrementverselinenumber%
\fi%
\speciallinelockfalse%
\nolinebreak\\%<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
}
\renewcommand{\incrementverselinenumber}{%
\nolinebreak\addtocounter{verselinenumber}{1}%
%%NO! \makeatletter
\@ifundefined{marksthe}{\relax}{\marksthe{verselinemark}{\theverselinenumber}}%<<<<<<<<<<<<<<<<<<<<<<
%%NO! \makeatother
\addtocounter{printlineindex}{1}%
\ifnum\theprintlineindex>\thelineindexrepeat%
\ifverselinenumbers\nobreak%
\putverselinenumber\nobreak%
\fi\nobreak%
\setcounter{printlineindex}{0}%
\fi%
}
\makeatother
\setverselinemodulo{2}
\begin{document}
\begin{poem}
\begin{stanza}
Short line\verseline
Long line without startverseline --- long long long long
long long long long long long long long line\verseline
Short line\verseline
\startverseline Long line with startverseline, numbered ---
long long long long long long long long long long line\verseline
Short line\verseline
Short line\verseline
\startverseline Long line with startverseline, not numbered ---
long long long long long long long long long long line\verseline
Short line\end{stanza}
\end{poem}
\end{document}