Hello you all.
I've been trying to fix widows and orphans in LaTeX. I found a handful of ideas, from \enlargethispage to using \pagebreak and \nopagebreak between paragraphs and so forth. But the nicest idea I found is to use \looseness.
My problem is: no matter where I put, let's say, \looseness=1, it won't work. I tried putting it at the very beginning of a paragraph, a line before it, and after the last word. I even tried changing the looseness to negative values or absurd ones (e.g. \looseness=50), but it just doesn't make any difference.
I'm sending a example attached to this post. You can compile it and see the orphan between the paragraph started with “\looseness-1” and the other right after it.
Thanks in advance.
Text Formatting ⇒ \looseness won't work
-
- Posts: 9
- Joined: Sat Feb 13, 2010 3:37 pm
\looseness won't work
- Attachments
-
- example.tex
- (25.75 KiB) Downloaded 340 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
\looseness won't work
This command is not the right measure for preventing widows and orphans. Put some other lines into the preamble instead.
Thorsten
Code: Select all
\clubpenalty10000
\widowpenalty10000
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 9
- Joined: Sat Feb 13, 2010 3:37 pm
\looseness won't work
Ah!, I forgot to mention that. I configured \clubpenalty and \widowpenalty. But then pdflatex created a page break between the paragraphs in question. I was wondering if there isn't a way to force \looseness to work.localghost wrote:This command is not the right measure for preventing widows and orphans. Put some other lines into the preamble instead.As soon as the problem is sorted out, please ac according to Section 3 of the Board Rules (last two paragraphs).Code: Select all
\clubpenalty10000 \widowpenalty10000
Best regards
Thorsten