2

Why LaTeX does not hyphenate "esco" in a way I explicitely set (i.e. "e-sco")?

I noticed this behaviour persists for any single-letter initial syllable.

Here is a MWE that forces hyphenation by setting the left and right page margin to 50% of the paper width. The example is focussed on the Italian word "esco" (I go out), whose syllables are "e-sco":

\documentclass[italian]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=0.5\paperwidth,rmargin=0.5\paperwidth}
\pagestyle{empty}
\usepackage[italian]{babel}

% if uncommented, this has no effect: produces "esco" 
% \hyphenation{e-sco} 

% if uncommented, this test produces "es-co" as requested (but I want "e-sco"!)
% \hyphenation{es-co}

\begin{document}
\noindent\hspace{0pt}
esco % by default, this produces "esco" (while the correct Italian hyphenation is "e-sco")
coro % by default, this produces "co-ro" (which is correct in Italian)
\end{document}

Is this due to some sort of penalty to not break the word at the very beginning? If yes, how can I fix it? Note also that \hyphenpenalty=0 does not fix the problem.

Note also that by typing e\-sco within the document, the hyphenation will be performed correctly, but obviously I want to avoid this because I look for a more "general" solution which makes use of the language-specific hyphenation rules.

I'm using TeXLive 2019 on Windows 10. Thanks in advance to this great community!

1 Answer 1

3

TeX has a parameter called \lefthyphenmin which tells it how many characters a word must at least have left of the hyphenation point to consider it valid. This parameter is by default set to 2, so e-sco can't be used as that would only be 1 character left of the hyphenation point.

You can change \lefthyphenmin in \AtBeginDocument to 1 to get words hyphenated that have a valid hyphenation point after their first letter only:

\documentclass[italian]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=0.5\paperwidth,rmargin=0.5\paperwidth}
\pagestyle{empty}
\usepackage[italian]{babel}

% if uncommented, this has no effect: produces "esco" 
%\hyphenation{e-sco}

% if uncommented, this test produces "es-co" as requested (but I want "e-sco"!)
% \hyphenation{es-co}

\AtBeginDocument{\lefthyphenmin=1 }

\begin{document}
\noindent\hspace{0pt}
esco % by default, this produces "esco" (while the correct Italian hyphenation is "e-sco")
coro % by default, this produces "co-ro" (which is correct in Italian)
\end{document}
2
  • +1 for the speed! You provided a working answer so fast! You're really great, your solution is simple and works perfectly!
    – Muttley
    Jun 12, 2019 at 18:03
  • Thanks to Skilmon, I also noted that to address my high-level objective (i.e. counting orthographic syllables), it's better to use \AtBeginDocument{\lefthyphenmin=1\righthyphenmin=1} to force LaTeX to always use the laguage-specific hyphenation rules
    – Muttley
    Jun 12, 2019 at 18:28

You must log in to answer this question.

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