Text Formatting ⇒ \looseness won't work
-
- Posts: 9
- Joined: Sat Feb 13, 2010 3:37 pm
\looseness won't work
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.
- Attachments
-
- example.tex
- (25.75 KiB) Downloaded 341 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
\looseness won't work
Code: Select all
\clubpenalty10000\widowpenalty10000
Thorsten
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