我想为我的诗节编号,而不仅仅是诗句。我在包中找不到任何选项verse
。有什么解决方法吗?
请考虑以下 MWE
\documentclass{article}
\usepackage{verse}
\begin{document}
\verselinenumbersleft
\setlength{\vrightskip}{-3em}
\poemtitle{Garden}
\poemlines{2}
\begin{verse}
I used to love my garden \\
But now my love is dead \\
For I found a bachelor's button \\
In black-eyed Susan's bed.\\!
I used to love my garden \\
But now my love is dead \\
For I found a bachelor's button \\
In black-eyed Susan's bed.\\!
\end{verse}
\end{document}
产生
我想要获得的是
答案1
\trlap
的宏会stackengine
帮您完成此操作。通过将其放置在带有索引计数器的宏中,即可实现结果。当您希望重新开始时,\nextverse
您必须定期重置计数器。\setcounter{verseno}{0}
经过编辑,以运用我的吟游技巧来继续创作这首充满象征意义的诗。
\documentclass{article}
\usepackage{verse}
\usepackage{stackengine}
\newcounter{verseno}
\def\nextverse{\stepcounter{verseno}\trlap{\Roman{verseno}}}
\begin{document}
\verselinenumbersleft
\setlength{\vrightskip}{-3em}
\poemtitle{Garden}
\poemlines{2}
\begin{verse}
\nextverse
I used to love my garden \\
But now my love is dead \\
For I found a bachelor's button \\
In black-eyed Susan's bed.\\!
\nextverse
How could this mishap happen? \\
My tool I yet can wield. \\
But that bachelor found his way there; \\
I had failed to plow the field.\\!
\end{verse}
\end{document}
当然,你可以定制效果,例如,
\def\nextverse{\stepcounter{verseno}\trlap{%
\ifnum\theverseno>1\rule{0pt}{4ex}\fi\bfseries\Roman{verseno}}}
给数字加粗,\nextverse
除了第一个数字外,每个数字都有一个额外的空格:
答案2
我不会设置新行,因为罗马数字不是这首诗的一部分。在我看来,计数会让人困惑。
我建议使用该verse
包中介绍的方法,如下所示:
% arara: pdflatex
\documentclass{article}
\usepackage{verse}
\begin{document}
\verselinenumbersleft
\setlength{\vrightskip}{-3em}
\poemtitle{Garden}
\poemlines{2}
\begin{verse}
\flagverse{I}I used to love my garden \\
But now my love is dead \\
For I found a bachelor's button \\
In black-eyed Susan's bed.\\!
\flagverse{II}I used to love my garden \\
But now my love is dead \\
For I found a bachelor's button \\
In black-eyed Susan's bed.\\!
\end{verse}
\end{document}