Using xelatex, the following code produces six hyphens, as in the code sample.
Using pdflatex, it produces a hyphen, an en-dash and an em-dash, as should be. The behavior is reproducible with other document classes.
\documentclass{article}
\begin{document}
- -- ---
\end{document}
This must have started more than a few days back (maybe weeks, maybe longer) but I only realized it today. Is there an easy explanation for it?
I’m using Tex Live 2023 and it is up-to-date as per the Arch Linux repositories:
user@desktop ~ $ xelatex --version
XeTeX 3.141592653-2.6-0.999995 (TeX Live 2023/Arch Linux)
edit: As requested in the comments, I added \XeTeXtracingfonts=1 before \documentclass, this is the log file:
This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023/Arch Linux) (preloaded format=xelatex 2023.6.12) 4 AUG 2023 15:09
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22>
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
Requested font "[lmroman10-regular]:mapping=tex-text;" at 10.0pt
Font mapping `tex-text.tec' for font `[lmroman10-regular]:mapping=tex-text;' no
t found.
-> /usr/share/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf
)
\c@part=\count181
\c@section=\count182
\c@subsection=\count183
\c@subsubsection=\count184
\c@paragraph=\count185
\c@subparagraph=\count186
\c@figure=\count187
\c@table=\count188
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(/usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
File: l3backend-xetex.def 2023-01-16 L3 backend support: XeTeX
\g__graphics_track_int=\count189
\l__pdf_internal_box=\box51
\g__pdf_backend_object_int=\count190
\g__pdf_backend_annotation_int=\count191
\g__pdf_backend_link_int=\count192
) (./test.aux)
\openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 3.
LaTeX Font Info: Trying to load font information for TS1+cmr on input line 3
.
(/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 2022/07/10 v2.5l Standard LaTeX font definitions
)
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
[1
] (./test.aux) )
Here is how much of TeX's memory you used:
460 strings out of 476683
9400 string characters out of 5809790
1842018 words of memory out of 5000000
20786 multiletter control sequences out of 15000+600000
512295 words of font info for 33 fonts, out of 8000000 for 9000
1348 hyphenation exceptions out of 8191
33i,5n,38p,143b,107s stack positions out of 10000i,1000n,20000p,200000b,200000s
Output written on test.pdf (1 page).
\XeTeXtracingfonts=1before \documentclass and then show the log-file. (It works fine for me on windows) – Ulrike Fischer Aug 04 '23 at 12:59Font mapping `tex-text.tec' for font `[lmroman10-regular]:mapping=tex-text;' not found., which should be in/usr/share/texmf-dist/fonts/misc/xetex/fontmapping/base/. Can you please look there to confirm the file is present? – egreg Aug 04 '23 at 13:16sudo mktexlsrshould fix the issue. – egreg Aug 04 '23 at 13:19