如何在 Verse 包中右对齐 \attrib?

如何在 Verse 包中右对齐 \attrib?

此 MWE 直接来自 Peter Wilson 的 Verse Package 手册 (v2.4b)。示例中的归属是右对齐的。右对齐归因

然而,当我在 MikTex 中实现 MWE 时,我的归因是左对齐的。

左对齐归因

我该如何正确论证归因?

\documentclass{book}
\usepackage{verse}
\begin{document}
\pagenumbering{gobble}
\poemtitle{Fleas}
\settowidth{\versewidth}{What a funny thing is a flea}
\begin{verse}[\versewidth]
What a funny thing is a flea. \\
You can't tell a he from a she. \\
But he can. And she can. \\
Whoopee! \\
\end{verse}
\attrib{Anonymous}
\end{document}

答案1

\attrib默认情况下未定义。您会注意到verse 文档提及(部分3.4 示例,第 9 页,就在“跳蚤例子”之前):

如何添加有关诗歌作者的信息完全由您决定。以下是此宏的一个示例:

\newcommand{\attrib}[1]{%
  \nopagebreak{\raggedleft\footnotesize #1\par}}

那么,让我们这样做:

在此处输入图片描述

\documentclass{article}
\usepackage{verse}

\newcommand{\attrib}[1]{%
  \nopagebreak{\raggedleft\footnotesize #1\par}}
\begin{document}

\poemtitle{Fleas}
\settowidth{\versewidth}{What a funny thing is a flea}
\begin{verse}[\versewidth]
  What a funny thing is a flea. \\
  You can't tell a he from a she. \\
  But he can. And she can. \\
  Whoopee! \\
\end{verse}
\attrib{Anonymous}

\end{document}

相关内容