2

In a recent post, @AWE reports that using the packages verse and songs in the same document leads to a clash:

Package songs Error: Encountered \beginverse without first seeing a \beginsong line.

How can this be fixed?

\documentclass{article}
\usepackage{verse}
\newcommand{\attrib}[1]{\nopagebreak{\raggedleft\footnotesize #1\par}}

\usepackage[chorded]{songs}
\noversenumbers

\begin{document}
\poemtitle{Mathematics}
\settowidth{\versewidth}{Than Tycho Brahe, or Erra Pater:}
\begin{verse}[\versewidth]
In mathematics he was greater \\
Than Tycho Brahe, or Erra Pater: \\
For he, by geometric scale, \\
Could take the size of pots of ale;\\
Resolve, by sines and tangents straight, \\
If bread or butter wanted weight; \\
And wisely tell what hour o’ the day \\
The clock does strike, by Algebra.
\end{verse}
\attrib{Samuel Butler (1612--1680)}

\songsection{Worship Songs}

\begin{songs}{}
\beginsong{Doxology}[by={Louis Bourgeois and Thomas Ken},
                     sr={Revelation 5:13},
                     cr={Public domain.},
                     index={Praise God, from Whom all blessings flow}]
\beginverse
\[G]Praise God, \[D]from \[Em]Whom \[Bm]all \[Em]bless\[D]ings \[G]flow;
\[G]Praise Him, all \[D]crea\[Em]tures \[C]here \[G]be\[D]low;
\[Em]Praise \[D]Him \[G]a\[D]bove, \[G]ye \[C]heav'n\[D]ly \[Em]host;
\[G]Praise Fa\[Em]ther, \[D]Son, \[Am]and \[G/B G/C]Ho\[D]ly \[G]Ghost.
\[C]A\[G]men.
\endverse
\endsong
\end{songs}
\end{document}

1 Answer 1

2

LaTeX defines an environment verse, and both packages redefine it in incompatible ways. To fix it, proceed as follows:

  1. Load the verse package first.

    \usepackage{verse}
    
  2. Rename the verse environment to poemverse.

    \let\poemverse\verse
    \let\endpoemverse\endverse
    
  3. Load the songs package.

  4. Whenever you need the verse environment of the verse package, use poemverse instead.

    \begin{poemverse}
    ...
    \end{poemverse}
    

enter image description here

\documentclass{article}
\usepackage{verse}
\let\poemverse\verse
\let\endpoemverse\endverse
\newcommand{\attrib}[1]{\nopagebreak{\raggedleft\footnotesize #1\par}}

\usepackage[chorded]{songs}
\noversenumbers

\begin{document}
\poemtitle{Mathematics}
\settowidth{\versewidth}{Than Tycho Brahe, or Erra Pater:}
\begin{poemverse}[\versewidth]
In mathematics he was greater \\
Than Tycho Brahe, or Erra Pater: \\
For he, by geometric scale, \\
Could take the size of pots of ale;\\
Resolve, by sines and tangents straight, \\
If bread or butter wanted weight; \\
And wisely tell what hour o’ the day \\
The clock does strike, by Algebra.
\end{poemverse}
\attrib{Samuel Butler (1612--1680)}

\songsection{Worship Songs}

\begin{songs}{}
\beginsong{Doxology}[by={Louis Bourgeois and Thomas Ken},
                     sr={Revelation 5:13},
                     cr={Public domain.},
                     index={Praise God, from Whom all blessings flow}]
\beginverse
\[G]Praise God, \[D]from \[Em]Whom \[Bm]all \[Em]bless\[D]ings \[G]flow;
\[G]Praise Him, all \[D]crea\[Em]tures \[C]here \[G]be\[D]low;
\[Em]Praise \[D]Him \[G]a\[D]bove, \[G]ye \[C]heav'n\[D]ly \[Em]host;
\[G]Praise Fa\[Em]ther, \[D]Son, \[Am]and \[G/B G/C]Ho\[D]ly \[G]Ghost.
\[C]A\[G]men.
\endverse
\endsong
\end{songs}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .