I've run into a difference in the memoir class vs the standard book class
in the way they handle the verse environment. I suspect I'm missing some
rather elementary detail, but no amount of Googling tonight has turned up
an answer for me.
With the default settings of the book class there is a blank line both
before and after the verse environment. With the memoir class there is a
blank line before the beginning of the verse environment (of length
\stanzaskip it appears), but not after the end of the environment. If the
last line of the verse ends in \\ the first line of the following
paragraph appears to get typeset over the top of it.
Here is a contrived simple example:
% start of contrived example
\documentclass{book}
\begin{document}
\mainmatter
This is a paragraph. It is before the verse environment.
\begin{verse}
Roses are red\\
Violets are blue\\
Roses aren't blue\\
Violets aren't red\\
\end{verse}
This is another paragraph. It is after the verse environment.
\end{document}
% end of contrived example
With \documentclass{book} I'd have:
This is a paragrpah. It is before the verse environment.
Roses are red
Violets are blue
Roses aren't blue
Violets aren't red
This is another paragraph. It is after the verse environment.
Changing to \documentclass{memoir} (and removing the \\ after the 4th
line of verse), I get:
This is a paragrpah. It is before the verse environment.
Roses are red
Violets are blue
Roses aren't blue
Violets aren't red
This is another paragraph. It is after the verse environment.
(If I don't remove the \\ after "Violets aren't red" the following
paragraph gets typeset over the top of it.)
In my real document I tried adding \vspace{\stanzaskip} after \end{verse};
I do get additional whitespace (that looks closer to the original) but I
get a lot of underfull \vboxes on subsequent pages that I don't get
without the \vspace{\stanzaskip}.
Any suggestions?
Thanks in advance,
Michael
>I have a LaTeX file that uses \documentclass{book} and various packages
>(geometry, fncyhdr, etc.) and I've been modifying to only use the memoir
>class.
>
>I've run into a difference in the memoir class vs the standard book class
>in the way they handle the verse environment. I suspect I'm missing some
>rather elementary detail, but no amount of Googling tonight has turned up
>an answer for me.
>
>With the default settings of the book class there is a blank line both
>before and after the verse environment. With the memoir class there is a
>blank line before the beginning of the verse environment (of length
>\stanzaskip it appears), but not after the end of the environment. If the
>last line of the verse ends in \\ the first line of the following
>paragraph appears to get typeset over the top of it.
There seems to be a typo in memoir's definition of the verse
environment. The last line of the definition (line 2487 in my copy)
is
\item[]}}{\endlist}
when it probably should be:
}\item[]}{\endlist}
The "\item[]" should come after the brace rather than before. This
changes the internal timing of the \item command, causing it to
happen after the initializations of the \@trivlist command rather than
before. It's rather surprising no error is triggered.
Dan
--
Dan Luecking Department of Mathematical Sciences
University of Arkansas Fayetteville, Arkansas 72701
To reply by email, change Look-In-Sig to luecking
> On Mon, 10 Jan 2005 22:55:03 -0700, "Michael A. Cleverly" wrote:
>
>>> I've run into a difference in the memoir class vs the standard book class
>> in the way they handle the verse environment. I suspect I'm missing some
>> rather elementary detail, but no amount of Googling tonight has turned up
>> an answer for me.
>
> There seems to be a typo in memoir's definition of the verse
> environment. The last line of the definition (line 2487 in my copy)
> is
>
> \item[]}}{\endlist}
>
> when it probably should be:
>
> }\item[]}{\endlist}
Perfect--changing that gives me the output I expected. Thank you very
much! I seriously doubt I'd have ever figured that out on my own.
Michael
Peter W.