3

First off, I am using a slightly modified version of the Classic Thesis stylesheet. It's too complicated a document to share it all, so there is that factor.

Nevertheless, I've reproduced the issue in the example below. (Apologies for the length...to show orphans, you need a lot of filler text)

The problem is that within the verse, orphans and widows are allowed, despite setting \clubpenalty and \widowpenalty. Without those set, the normal paragraph text will have an orphan/widow, but with them set, orphans/widows go away in the paragraph text, but not in the verse.

Any suggestions or hacks to overcome this? I don't mind a "ragged bottom" or "flexible stanza spacing" solution, but I would prefer it to be programmatic. That is, \enlargethispage{-\baselineskip} works in some specific instances, but becomes problematic when e.g. additional content is on the page, and can actually create orphans/widows which would have otherwise displayed correctly. (see example)

% book example for classicthesis.sty
\documentclass[11pt,paper=5.75in:9in,footinput=true,headinput=true]{scrbook} % 

\usepackage{verse}


% Remove this and you get an orphan with our paragraphs.
% Either way we get an orphan with the verse package

\clubpenalty=9996
\widowpenalty=9999
\brokenpenalty=4991
\predisplaypenalty=10000
\postdisplaypenalty=1549
\displaywidowpenalty=1602

\begin{document}

\settowidth{\versewidth}{Lorem ipsum dolor sit amet,}
\begin{verse}[\versewidth]
Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

% this fixes a widow.
\enlargethispage{-\baselineskip}
Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

\end{verse}


\settowidth{\versewidth}{Lorem ipsum dolor sit amet,}
\begin{verse}[\versewidth]
Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

% Here this creates an orphan.
\enlargethispage{-\baselineskip}
Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

Lorem ipsum dolor sit amet,\\
consectetur adipisicing elit,\\
sed do eiusmod tempor incididunt\\
ut labore et dolore magna aliqua.\\!

\end{verse}


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse mollit anim id est laborum. 

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\end{document}

p.s. I am unsure of how to embed the pdf? Link to my compiled pdf here (with penalties set): https://www.dropbox.com/s/2cjv6sipybwfpu2/ran-test.pdf

enter image description here

2

Internally \\ is \par in verse and similar environments so the primitive penalties have no effect as they are all one line paragraphs.

But you can use \\* instead of \\ If you replace them all then page breaks only happen between verses, or you can just use it on the first and last lines, or whatever you need.

  • Thank you kindly! Mr. Carlisle’s answer led me to look again through the verse commands (which I had missed somehow the first time.) For future reference for others who need the info, it is one page 6 of the Verse package documentation, and is copied below: – Ben Mullikin Oct 22 '14 at 4:32
  • \\ must be used at the end of each line of a verse, except for the last line in each stanza. \\! If the lines in a poem are to be numbered then \\! must be used at the end of the last line in each stanza (the \\ macro increments the line numbers). \* The starred version, \*, prohibits a page break after the line. \\> The \\> version causes a linebreak within a verse line. The \\ macro in its various forms can also take an optional length argument, like \[30pt] which inserts 30pt of vspace; \\>[30pt] 30pt of hspace. – Ben Mullikin Oct 22 '14 at 4:37
  • @BenMullikin the verse package may have additional doc but \\ / \\* are standard latex commands and work that way in most latex environments, plain text, verse, center, longtable etc. – David Carlisle Oct 22 '14 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.