我正在尝试将一首诗排版成这样:
The first line of first stanza
The second line of first stanza
The third line of first stanza
The first line of second stanza
The second line of second stanza
The third line of second stanza
The fourth line of second stanza
The first line of third stanza
The second line of third stanza
The first line of fourth stanza
The second line of fourth stanza
为此,我使用verse
允许这种缩进的包,方法是使用\indentpattern
并指定每节要缩进的行数。然而,我的情况是,许多节的行数不同,所以我最终会得到像这样的荒谬模式\indentpattern{00011110011...}
。我正在寻找的是类似altverse
环境的东西,仅适用于节。如果有人能建议如何制作一个,我将不胜感激。
最小工作示例:
\documentclass{scrartcl}
\usepackage{fontspec}
\setmainfont{CMU Serif}
\usepackage{verse}
\begin{document}
\settowidth{\versewidth}{The first line of first stanza}
\poemtitle{Some Glorious Poem}
\begin{verse}[\versewidth]
The first line of first stanza\\
The second line of first stanza\\
The third line of first stanza
The first line of second stanza\\
The second line of second stanza\\
The third line of second stanza\\
The fourth line of second stanza
The first line of third stanza\\
The second line of third stanza
The first line of fourth stanza\\
The second line of fourth stanza
\end{verse}
\end{document}
它产生的输出:
答案1
可能是这样的吗?
\documentclass{article}
\usepackage{verse,attrib}
\usepackage{enumitem}
\newenvironment{altstanza}[1][\vindent]{%
\begin{itemize}[label={},leftmargin=#1]
\item}{%
\end{itemize}}
\title{For Anne Gregory}
\author{WB Yeats}
\date{}
\begin{document}
\settowidth{\versewidth}{That he had found a text to prove}
\addtolength{\versewidth}{\vindent}
\begin{verse}[\versewidth]
\poemtitle{For Anne Gregory}
Never shall a young man,\\
Thrown into despair\\
By those great honey-coloured\\
Ramparts at your ear,\\
Love you for yourself alone\\
And not your yellow hair.
\begin{altstanza}
But I can get a hair-dye\\
And set such colour there,\\
Brown, or black, or carrot,\\
That young men in despair\\
May love me for myself alone\\
And not my yellow hair.
\end{altstanza}
I heard an old religious man\\
But yesternight declare\\
That he had found a text to prove\\
That only God, my dear,\\
Could love you for yourself alone\\
And not your yellow hair.\\
\end{verse}
\attrib{WB Yeats}
\end{document}
答案2
我不使用 verse 环境,但是我熟悉(e)ledmac
,我认为它使用了类似的想法。
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{eledmac}
\setlength{\stanzaindentbase}{10pt}% default: 20pt
\setstanzaindents{5,0,0,0,0}
%\setcounter{stanzaindentsrepetition}{3}% with long stanzas, this comes in handy
\newcommand{\stanzai}{%
\setstanzaindents{5,0,0,0,0,0,0}%
\stanza}
\newcommand{\stanzaii}{%
\setstanzaindents{5,1,1,1,1,1,1}%
\stanza}
\begin{document}
\beginnumbering
\stanza % normal
The first line of first stanza&
The second line of first stanza&
The third line of first stanza\&
\stanzaii % stanza ii
The first line of second stanza&
The second line of second stanza&
The third line of second stanza&
The fourth line of second stanza\&
\stanzai % stanza i
The first line of third stanza&
The second line of third stanza\&
\stanzaii % stanza ii
The first line of fourth stanza&
The second line of fourth stanza \&
\end{document}