0

I am using the memoir package to typeset material that includes some psalms. The psalms are placed in the verse environment. I would like the verses to be numbered. But when a verse is particularly long, the wrapping seems to mess up the verse numbers. For example, the code at the bottom of my post produces verses that look like this:

   O LORD, rebuke me not in Thine anger, neither chas-
1       ten me in Thy wrath.
   Have mercy upon me, O Lord, for I am weak; O Lord,
2       heal me, for my bones are vexed.

instead of

1   O LORD, rebuke me not in Thine anger, neither chas-
       ten me in Thy wrath.
2   Have mercy upon me, O Lord, for I am weak; O Lord,
       heal me, for my bones are vexed.

The corresponding code is:

%! program = pdflatex
\documentclass{memoir}

\begin{document}
    
    \linenumberfrequency{1}
    \verselinenumbersleft   
    \settowidth{\versewidth}{My soul also is sore troubled;}
    \begin{verse}[\versewidth]      
        O LORD, rebuke me not in Thine anger, neither chasten me in Thy wrath.\\
        Have mercy upon me, O Lord, for I am weak; O Lord, heal me, for my bones are vexed.\\!
    \end{verse} 
\end{document}

What am I doing incorrectly?

Thank you for any guidance --

2
  • I'm not sure if you consider the contents of the verse environment to be a long line that automatically gets set as multiple lines or as individual lines which you have to specify. Aug 6, 2021 at 19:37
  • I had been under the impression that "\\" ended a line within the verse environment. So in effect, an individual line is specified by a bunch of words that ends with "\\". Then the next line begins and goes on until the next "\\". Aug 6, 2021 at 20:19

1 Answer 1

0

Not an answer, more an admission of failure. I have tried many varieties of verse code but really no luck. I agree that the first line of a two line entry should be numbered instead of the second line. But ...

 % verseprob.tex  SE 609802

%! program = pdflatex
\documentclass{memoir}

\begin{document}
    
    \linenumberfrequency{1}
    \verselinenumbersleft   
    \settowidth{\versewidth}{My soul also is sore troubled;}

First verse.

    \begin{verse}[\versewidth]      
        O LORD, rebuke me not in Thine anger, neither chasten me in Thy wrath.\\
        Have mercy upon me, O Lord, for I am weak; O Lord, heal me, for my bones are vexed.\\!
    \end{verse} 

Second verse.

    \begin{verse}[\versewidth]      
        O LORD, rebuke me not in Thine anger,\\!
         neither chasten me in Thy wrath.\\
\end{verse}

Third verse

\begin{verse}[\versewidth]
        Have mercy upon me, O Lord, for I am weak; O Lord, heal me, for my bones are vexed.\\!
    \end{verse} 

Fourth verse.

    \begin{verse}[\versewidth]      
        O LORD, rebuke me not in Thine anger,\\>
         neither chasten me in Thy wrath.%\\!
\end{verse}

Fifth verse

    \begin{verse}[\versewidth]      
        O LORD, rebuke me not in Thine anger, neither chasten me in Thy wrath.\\>[0pt]
        Have mercy upon me, O Lord, for I am weak; O Lord, heal me, for my bones are vexed.\\!
    \end{verse} 

Sixth verses.

    \begin{verse}[\versewidth]      
        O LORD, rebuke me not in Thine anger,\\>
         neither chasten me in Thy wrath.%\\!
\end{verse}
%\setcounter{poemline}{2}
\vspace{-1.8\baselineskip}
\begin{verse}[\versewidth] \setcounter{poemline}{2}
%  \setcounter{vslineno}{2}
        Have mercy upon me, O Lord, for I am weak; \\>
        O Lord, heal me, for my bones are vexed.%\\!
    \end{verse} 

\end{document}

enter image description here

I have spent quite a lot of time looking at the memoir code but must confess that I no longer understand it; my memory is fading. Hopefully Lars Madsen (aka daleif) the memoir maintainer will be able to help.

You must log in to answer this question.

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