TransWikia.com

Limit number of consecutively hyphenated lines to a hard numerical value

TeX - LaTeX Asked on December 24, 2020

Is there a way to limit the number of consecutive hyphenated lines to a fixed maximum value (say, at most 3 consecutive lines with hyphen) in (1) LaTeX and (2) LuaLaTeX?

MWE:

documentclass[ngerman]{article}
usepackage{babel}
textwidth=22mmrelax
begin{document}
noindent
Der vom Bundestagsbeauftragten beauftragte Bundesdatenschutzbeauftragte
end{document}

Output using pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) with dvi output:

excerpt from the resulting dvi output using pdftex

I am aware that by adjusting doublehyphendemerits and emergencystretch i can avoid too many hyphens, but as i understood, those parameters only reduce the probability of two (or more) consecutive hyphenated lines. Is there a way to give (Lua)LaTeX a hard, numerical, upper limit?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP