tags:

views:

866

answers:

1

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  A: 

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.

Anton Geraschenko
The bottom part works for the most part. I will continue to tweak it :D but that was what i was looking for.
Mica