3

It seems there is an issue with \dotfill after a hyphenation break, minimal example

\documentclass{article}
\begin{document}
hippopotamus, hippopotamus, hippopotamus, hippopotamus, hippopotamus
\dotfill 23 24 25
\end{document}

processed with pdflatex produces

enter image description here

Any ideas?

Note, this post replaces an earlier post which included details which I later found were not relevant to the problem.

2
  • This deserves the tag "tex-core" although the OP is likely not aware of that. Feb 10, 2023 at 16:36
  • Added, thank you.
    – J.J. Green
    Feb 10, 2023 at 17:08

1 Answer 1

6

TeX tries to avoid that line before the paragraph end has a hyphen. You can allow that by changing \finalhyphendemerits:

\documentclass{article}
\begin{document}
hippopotamus, hippopotamus, hippopotamus, hippopotamus, hippopotamus \dotfill 
23 24 25 

\finalhyphendemerits =0 hippopotamus, hippopotamus, hippopotamus, 
hippopotamus, hippopotamus \dotfill 23 24 25 

\end{document}

enter image description here

1
  • Fabulous, fixes the problem from which the minimal example was derived -- many thanks!
    – J.J. Green
    Feb 10, 2023 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .