列表中的诗句或引语环境

列表中的诗句或引语环境

我想在诗歌课上逐行解释一首诗,我想要达到的效果是 在此处输入图片描述

但是我在格式化第 2 点之后的三行时遇到了一些困难。Google 没有提供太多帮助。我该怎么做?下面提供了一个最小模板。

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[itemindent = 3em, leftmargin = 0em, itemsep = 1ex, partopsep = 0ex, parsep = 1ex, listparindent = 2em]
\item The first line of the poem

Some explanations
\item \begin{quote}% How to get these lines formatted?
The second line of the poem\\
The third line of the poem\\
The fourth line of the poem
\end{quote}

Some other explanations that may contain several paragraphs

\end{enumerate}
\end{document}

答案1

你可以用这个verse包来实现这一点,甚至可以给诗句编号。这是一个示例代码:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[lf]{ebgaramond}
\usepackage{verse, etoolbox}
 \usepackage{enumitem}
 \AtBeginEnvironment{verse}{\itshape}

\settowidth{\versewidth}{In the midst of the word he was trying to say,}
\poemlines{1}
\verselinenumfont{\footnotesize\upshape}
\setlength\vgap{-\dimexpr\leftmargini + \labelsep\relax}

\begin{document}
\begin{enumerate}[itemindent = 3em, leftmargin = 0em, itemsep = 1ex, partopsep = 0ex, parsep = 1ex, listparindent = 2em]
\item %

\begin{verse}[\versewidth]% How to get these lines formatted?
\vin In the midst of the word he was trying to say,\\[3ex]
\end{verse}

Some explanations
\item

\begin{verse}[\versewidth]\setverselinenums{2}{1}
     \vin     In the midst of his laughter and glee,\\
     He had softly and suddenly vanished away — \\
     For the Snark \emph{was} a Boojum, you see.\\[3ex]
\end{verse}

Some other explanations that may contain several paragraphs

\end{enumerate}
\end{document} 

在此处输入图片描述

相关内容