1
votes

I am currently using the memoir class to typeset some poems. The \poemtitle command gives me a centered poem title, but I would rather have the title flush with the edge of the poem body. I have redefined the \poemtitle command to remove the automatic centering. The \verse environment coupled \settowidth{\versewidth}{} will center the poem with left justification... thus to get the title flush with the verse environment, I am calling the title inside the \verse environment, like this:

\settowidth{\versewidth}{longest poem line here} 
\begin{verse}[\versewidth]
\PoemTitle*{Poem Tite}
\PlainPoemTitle 

...Poem body...

\end{verse}

This however, sometimes indents the first line of the poem, or sets the title at an indent. The only other solution I see would be setting the title inside its own verse environment, like this:

\settowidth{\versewidth}{longest poem line here} 
\begin{verse}[\versewidth]
\PoemTitle*{Poem Tite}
\PlainPoemTitle 
\end{verse}

\settowidth{\versewidth}{longest poem line here} 
\begin{verse}

...Poem body...

\end{verse}

Is there a better way to do this? Or did I miss something in the memoir documentation (which i have read a number of times)?

EDIT: Perhaps I should have asked a more clear question: Is there any set of command I can issue to latex that will calculate the margin indention from the \verse command, then apply that margin to the \poemtitle so that the poem title ends up flush with the left edge of the text, without setting \poemtitle in its own \verse environment?

2
@Mica S.: Could you please clarify what is unsatisfactory about my answer? It produces the poem title left justified like the poem body, correctly spaced apart from the poem body, in the correct typeface, and with no undesirable indentation. Moreover, it plays well with others: if some command (or package option) modifies the title font or spacing, the macro I gave you continues to behave correctly. Did I miss some important requirement?Anton Geraschenko
Thanks for the clarification. Is there some reason you don't want to put the title in the same verse environment as the body of the poem?Anton Geraschenko
I always try and write as little markup/code as possible-- to keep the document as human-readable as possible. Plus, from my post above: "This however, sometimes indents the first line of the poem, or sets the title at an indent."Mica

2 Answers

2
votes

I don't have any experience with the memoir class or typesetting poems, so I don't know if there is some other way you were intended to do this, but here's a solution that seems to do what you want (assuming you always use the starred form of \PoemTitle).

\newcommand{\leftPoemTitle}[1]{{\PoemTitlefont{#1}}\\[\afterPoemTitleskip]}

\settowidth{\versewidth}{longest poem line here} 
\begin{verse}
\leftPoemTitle{Poem Title}

...Poem body...

\end{verse}

This produces the poem title left justified like the poem body, correctly spaced apart from the poem body, in the correct typeface, and with no undesirable indentation. Moreover, it plays well with others: if some command (or package option) modifies the title font or spacing, this \leftPoemTitle macro continues to behave correctly.


If I understand your edit correctly, you want the poem title to be outside the verse environment that contains the poem body, but still indented in such a way that the title is left justified with the body. Unless you have some special reason to do this, I think the above solution is better, but never mind that.

Chapter 19 of the memoir class manual says that the verse environment is indented by the length \vleftmargin, so you can just indent your title by that length. I assume you'll still want the title to be in a slightly larger typeface, so the following solution should do the trick:

\newcommand{\myPoemTitle}[1]{\noindent\hspace{\vleftmargin}{\PoemTitlefont #1}}

\myPoemTitle{Poem Title}
\settowidth{\versewidth}{longest poem line here} 
\begin{verse}

...Poem body...

\end{verse}

Note that this puts the title somewhat closer to the body than the first solution. You could get this behavior in the first solution by redefining \afterPoemTitleskip.

0
votes

As of 2020 the simplest way to achieve this is to load the verse environment followed by the gmverse environment.

Then replace your code above with:

\poemtitle*{Poem Title here}
%use epigraph package for a subtile, author, etc
\begin{verse}

...Poem body...

\end{verse}

This will centre the poem and title based on the average line length. Various ways to calculate the average are possible (see gmverse documentation). I find the default looks fine.

It will also wrap the longer lines so the overflow is set right flush as is normal in books of verse. I have not found another way to do this automatically.

Gmverse also allows you to set lines without \\ at the end of each line, just using line ends (and an extra line to get gaps between stanzas). This is great for fast and easy typing or copy & paste.

Possible downside: might be incompatible with memoir. I haven't tested it since I use the standard book class for my collections.