Can someone explain the differences in how an emdash is rendered by LuaLaTex from this code?
\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}
\begin{document}
Lorem ipsum---dolor---sit amet.
Lorem ipsum—dolor—sit amet.
\end{document}
Why is the first dash in the first line shorter? I have read through what seem to be related questions:
- Change em-dash character in an OpenType font with xetex
- Suppress specific ligature in XeLaTeX
- How to enable ligatures for emdash/endash in LuaTeX ?
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?
\automatichyphenmode=1
to your preamble