I recently noticed that there are numerous under- and overfull hboxes in the document I'm working on. Further inspection revealed that such problems almost always arose when there was Latin text involved; seemingly, LaTeX doesn't see any hyphenation points, so it can't break lines and paragraphs end up looking ugly.
This is a MWE:
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage[variant=classic]{latin}
\begin{document}
\showhyphens{\textenglish{amusing}}
\showhyphens{\textlatin{instigare}}
\end{document}
Compiling this code with LuaLaTeX yields a log file; here are the relevant fragments:
[][] \EU2/lmr/m/n/10 amus-ing
[][] \EU2/lmr/m/n/10 instigare
Omitting the variant option of the Latin language (variant=classic
) does not change the result.
I have left out some things, such as the font setup, which, from what I have seen in my investigations, is involved in the matter (don't know why, though). However, I hope the example provided is enough — if it isn't, please, ask. For the record, this question seems somewhat relevant, although I haven't been able to extrapolate the results to my case.
EDIT: This is another MWE aimed at XeLaTeX, under which -as pointed out by egreg- it seems to work:
\documentclass{article}
\usepackage{polyglossia}
\usepackage{xltxtra}
\setdefaultlanguage{english}
\setotherlanguage[variant=classic]{latin}
\begin{document}
\showhyphens{\textenglish{amusing}}
\showhyphens{\textlatin{instigare}}
\end{document}
In the corresponding log file:
\EU1/lmr/m/n/10 amus-ing
[]\EU1/lmr/m/n/10 in-sti-gare
\showhyphens
version provided byxltxtra
).\setotherlanguage{italian}
just for a check; if I run withlualatex -recorder
, I see thathyph-it.pat.txt
is read in, but there's no entry for the corresponding file for Latin. The same if I call Latin without thevariant=classic
option.gloss-latin.ldf
. Up to now I'm able to get hyphenation with\setotherlanguage{latin}
(novariant=classic
option). Stay tuned.