em-dash ligature is converted to en-dash in the generic fontloader
As reported on the dev-luatex list --- is converted to an en-dash (instead of em-dash) if there are no spaces around the ---. We could now reproduce the problem also with the generic fontloader: it appears only with mode=node. I'm using the files from 2019-02-14, but the problem appeared first in the files from 2018-11-18): \font\test={file:texgyreheros-regular.otf:+tlig;mode=node;}\test dashes-these % gives dash dashes--these % gives en-dash dashes---these % gives en-dash WRONG dashes --- these % gives em-dash em-dashes---these % gives em-dash \bye context is not affected, there the code works fine. -- Ulrike Fischer https://www.troubleshooting-tex.de/
On 2/23/2019 1:50 PM, Ulrike Fischer wrote:
As reported on the dev-luatex list --- is converted to an en-dash (instead of em-dash) if there are no spaces around the ---.
We could now reproduce the problem also with the generic fontloader: it appears only with mode=node. I'm using the files from 2019-02-14, but the problem appeared first in the files from 2018-11-18):
\font\test={file:texgyreheros-regular.otf:+tlig;mode=node;}\test
dashes-these % gives dash
dashes--these % gives en-dash
dashes---these % gives en-dash WRONG
dashes --- these % gives em-dash
em-dashes---these % gives em-dash
\bye
context is not affected, there the code works fine.
in context we set: \automatichyphenmode=1 i'll do the same in luatex-plain Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am Sat, 23 Feb 2019 15:55:53 +0100 schrieb Hans Hagen:
As reported on the dev-luatex list --- is converted to an en-dash (instead of em-dash) if there are no spaces around the ---.
in context we set: \automatichyphenmode=1
This solves the problem and after some pondering over the documentation it also looks like a sensible default. But why does \automatichyphenmode=0 suddenly eat a hyphen? -- Ulrike Fischer https://www.troubleshooting-tex.de/
On 2/23/2019 4:30 PM, Ulrike Fischer wrote:
Am Sat, 23 Feb 2019 15:55:53 +0100 schrieb Hans Hagen:
As reported on the dev-luatex list --- is converted to an en-dash (instead of em-dash) if there are no spaces around the ---.
in context we set: \automatichyphenmode=1
This solves the problem and after some pondering over the documentation it also looks like a sensible default. But why does \automatichyphenmode=0 suddenly eat a hyphen?
because
Am Sat, 23 Feb 2019 17:11:12 +0100 schrieb Hans Hagen:
because
followed by -- is pretty obscure ... a replace could be seen as --- and when hyphenated as - -- and such ... it's about time that texies start using the proper unicode symbols instead of these funny ligatures
well the problem with the proper unicode symbols is that at first they are not so easy to input (that could be handled by the editor) and that they are not so visible. - - — look quite the same in my editor, even more if the screen is not so large and when my eyes tire. If -- wouldn't work I would resort to a command like \ndash instead only to get a better visual clue what's in the document. But regardless from the input method. How can one enable a line break after an em-dash when \automichyphenmode is 1? The only way I found is to explicitly insert a penalty: \starttext \hsize=2pt dash---\penalty1 dash dash—\penalty1 dash \stoptext -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 26/02/19 3:55 AM, Ulrike Fischer wrote:
Am Sat, 23 Feb 2019 17:11:12 +0100 schrieb Hans Hagen:
because
followed by -- is pretty obscure ... a replace could be seen as --- and when hyphenated as - -- and such ... it's about time that texies start using the proper unicode symbols instead of these funny ligatures well the problem with the proper unicode symbols is that at first they are not so easy to input (that could be handled by the editor) and that they are not so visible. - - — look quite the same in my editor, even more if the screen is not so large and when my eyes tire. If -- wouldn't work I would resort to a command like \ndash instead only to get a better visual clue what's in the document.
But regardless from the input method. How can one enable a line break after an em-dash when \automichyphenmode is 1? The only way I found is to explicitly insert a penalty:
\starttext \hsize=2pt
dash---\penalty1 dash
dash—\penalty1 dash
dash\discretionary{---}{}{---}dash dash\discretionary{—}{}{—}dash
\stoptext
On 2/25/2019 15:45, Henri Menke wrote:
On 26/02/19 3:55 AM, Ulrike Fischer wrote:
Am Sat, 23 Feb 2019 17:11:12 +0100 schrieb Hans Hagen:
because
followed by -- is pretty obscure ... a replace could be seen as --- and when hyphenated as - -- and such ... it's about time that texies start using the proper unicode symbols instead of these funny ligatures well the problem with the proper unicode symbols is that at first they are not so easy to input (that could be handled by the editor) and that they are not so visible. - - — look quite the same in my editor, even more if the screen is not so large and when my eyes tire. If -- wouldn't work I would resort to a command like \ndash instead only to get a better visual clue what's in the document. But regardless from the input method. How can one enable a line break after an em-dash when \automichyphenmode is 1? The only way I found is to explicitly insert a penalty:
\starttext \hsize=2pt
dash---\penalty1 dash
dash—\penalty1 dash dash\discretionary{---}{}{---}dash
dash\discretionary{—}{}{—}dash
\stoptext
dash|---|dash dash|—|dash -- Rik
On 26/02/19 3:55 AM, Ulrike Fischer wrote:
Am Sat, 23 Feb 2019 17:11:12 +0100 schrieb Hans Hagen:
because
followed by -- is pretty obscure ... a replace could be seen as --- and when hyphenated as - -- and such ... it's about time that texies start using the proper unicode symbols instead of these funny ligatures well the problem with the proper unicode symbols is that at first they are not so easy to input (that could be handled by the editor) and that they are not so visible. - - — look quite the same in my editor, even more if the screen is not so large and when my eyes tire. If -- wouldn't work I would resort to a command like \ndash instead only to get a better visual clue what's in the document.
But regardless from the input method. How can one enable a line break after an em-dash when \automichyphenmode is 1? The only way I found is to explicitly insert a penalty:
\setbreakpoints[compound] makes dash---dash breakable but not dash—dash
\starttext \hsize=2pt
dash---\penalty1 dash
dash—\penalty1 dash
\stoptext
participants (4)
-
Hans Hagen
-
Henri Menke
-
Rik Kabel
-
Ulrike Fischer