General ⇒ Keep lines together in \verse
Keep lines together in \verse
\begin{verse}\itshape
Line 1\\
Line 2.
Line 3\\
Line4.
Line 5\\
Line 6.
\end{verse}
The question is: how to prevent breaks at the end of page after Line 1, 3 or 5? Is there a command "keep lines together", "keep with next" or something similar?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Keep lines together in \verse
Code: Select all
\begin{minipage}{\textwidth}
\begin{verse}
…
\end{verse}
\end{minipage}
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Keep lines together in \verse
B.A.
Re: Keep lines together in \verse
No, \nopagebreak doesn't work at this.
\enlargethispage works but I don't like using it, really. If I reorganize text, add something or change the font and \verse is moved, this added line still remains when not needed.
Is it possible that there is no command that keeps lines together?
Re: Keep lines together in \verse
Re: Keep lines together in \verse
\widowpenalty=10000
\clubpenalty=10000
\raggedbottom
in your preamble; it suppresses widows and orphans.
B.A.
Re: Keep lines together in \verse


By the way, I do use \widowpenalty10000 and \clubpenalty10000, but it doesn't work in this case. For other cases it works just fine.