> I suppose I'll go with option 1 for now,

I discussed this on the latex list, and quite probably the next latex
format will set \automatichyphenmode=1 too.

> but it seems very unfortunate that
> luatex no longer behaves like every other TeX engine wrt this simple behavior.

Well I made a few tests also with pdftex and xetex (which has a
similar value \XeTeXdashbreakstate) and there is no "like every other
engine" behaviour". They all have slight differences how they handle
this. If you want to try check the document below.

And this stuff is not simple. --- is a ligature, and ligatures can not
be fixed before hyphenation as luatex must be able to split them
there. The ligature --- has the additional problem that is consists of
hyphens which play a special role in word breaking. It is also not
possible to replace them earlier, e.g. at input as you don't want such
a replacement normally for tt fonts, so it must be font specific.


> This is a large breaking change

While I understand that this is annoying: luatex and the fontloader
code is still a moving target, and such changes can not always be
avoided. Also while I'm trying to build a large enough test pool,
there are still a number of area where we can't catch changes.

Just to warn you: the luaotfload version I just uploaded will change
letterspacing in an incompatible way, so if you are using it, check
the documentation about your options.

> - it affects every existing document that doesn't explicitly set
> `\automatichyphenmode` or use Unicode em dashes. May I ask what
> recent work caused this?

I didn't try to find out, some change in the generic fontloader we
import from context. context has the same problem if
\automatichyphenmode is set to zero:

\starttext

\automatichyphenmode=0
dash---dash  %changes to endash
dash--- dash dash ---dash   %ok

\stoptext

so you could ask on the context list, if they change it, we will pick
it up.


% test file for hyphen/en-/em-dash handling:

\documentclass{article}
\textwidth=2pt
\begin{document}
% luatex: set \automatichyphenmode= 0/1/2
% xetex: set  \XeTeXdashbreakstate=0/1

-hyphen

hyph-hyph

ndash--ndash

ndash–ndash

endash--endash

endash–endash

mdash---mdash

mdash—mdash


\mbox{mdash---mdash} %not ok in luatex with value 0
\end{document}

-- 
Mit freundlichen Grüßen
Ulrike Fischer


_______________________________________________
dev-luatex mailing list
dev-luatex@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-luatex

Reply via email to