Can someone explain the differences in how an emdash is rendered by LuaLaTex from this code?

\setmainfont{TeX Gyre Pagella}
Lorem ipsum---dolor---sit amet.
Lorem ipsum—dolor—sit amet.

LaTeX output

Why is the first dash in the first line shorter? I have read through what seem to be related questions:

but I'm not sure whether this is quite the same question, and these discussions are fairly old.

Emdashes in the font documentation don't seem to have this issue, but I can't find the .tex file that generated the documentation to see what commands are being used.

Simply put, my question is what is causing these to be rendered differently, and can I change it to make it consistent?

  • Add \automatichyphenmode=1 to your preamble Commented Nov 24, 2019 at 4:23


Browse other questions tagged .