gmverse 包在 endnote 中拆分诗句

gmverse 包在 endnote 中拆分诗句

情况

gmverse在序言中调用包时,我将verse环境放在里面,并由包\endnote提供命令enotez,因此该诗句没有解释\\换行命令。

这是我的 MWE

\documentclass{article}
\usepackage{gmverse}
\usepackage{enotez}

\begin{document}


Shakespear wrote the following poem to the queen\endnote{\begin{verse}
As the dial hand tells o'er\\
The same hours it had before,\\
Still beginning in the ending,\\
Circular account still lending,\\
So, most mighty Queen we pray,\\
Like the dial day by day
\end{verse}
}

\printendnotes

\end{document}

这是渲染

渲染结果

预期结果

但正常情况下,当gmverse序言中没有调用包时,我应该得到如下结果: 预期结果

问题

\endnotegmverse在序言中调用包时,我可以从谁那里获得正常的诗句渲染?

答案1

回过头来看,我认为您之所以使用它gmverse,是因为它会自动提供“French Hanging”。我尝试过,但未能诱使verse包执行此操作,但发现有一种方法可以使用\\>linebreak 命令手动执行此操作。

% newverseprob.tex  try for French hanging

\documentclass{article}
\usepackage{verse}

\newcommand*{\fh}{\mbox{} \hfill [ }
%%%% I couldn't automate it
\makeatletter
\renewenvironment{verse}[1][\linewidth]{%
  \stepcounter{verse@envctr}%
  \setcounter{poemline}{0}\refstepcounter{poemline}%
  \setcounter{vslineno}{1}%
  \let\\=\@vscentercr
  \list{}{\itemsep \z@
          \itemindent  -\vindent%
          \listparindent\itemindent
          \parsep       \stanzaskip
          \ifdim #1 < \linewidth
            \rightmargin        \z@
            \setlength{\leftmargin}{\linewidth}%
            \addtolength{\leftmargin}{-#1}%
            \addtolength{\leftmargin}{-0.5\leftmargin}%
          \else
            \rightmargin        \leftmargin
          \fi
          \addtolength{\leftmargin}{\vindent}}%
%      \fh
  \item[] 
%     \fh 
}
{%\fh
 \endlist}
\makeatother
%%%%%% but it can be done maually

\begin{document}

\poemtitle{In the Beginning}
\settowidth{\versewidth}{And objects at rest tended to remain at rest}
\begin{verse}%[\versewidth]
Then God created Newton, \\
And objects at rest tended to remain at rest, \\
And objects in motion tended to remain in \\> \fh
motion, \\
And energy was conserved
  and momentum \\> \fh was conserved
  and matter \\> \fh was conserved \\
And God saw that it was conservative. \\
\end{verse}


\end{document}

在此处输入图片描述

我不知道输出是否是你想要的。如果不是,也许其他人可能愿意/能够帮助你

相关内容