0

I am using Arch Linux. I install TeXLive via system's package manager pacman (the packages installed will be listed later):

If I compile the following code

\documentclass{minimal}

\newcommand{\printinternalcurrentfont}{% \expandafter\texttt\expandafter{\expandafter\string\the\font}% } \newcommand{\printexternalcurrentfont}{% \expandafter\texttt\expandafter{\fontname\font}% }

\begin{document}

\printinternalcurrentfont

\printexternalcurrentfont

``test''

\end{document}

by xelatex, it prints

\TU/lmr/m/n/10

"[lmroman10-regular]:mapping=tex-text;" at 10.0pt

``test''

and if it is by pdflatex, it prints:

\OT1/cmr/m/n/10

cmr10

“test”

Notice the difference:

  1. They use different fonts: for PDFLaTeX, it use cmr (Computer Modern Roman, I guess?), and
  2. The ligature in the XeLaTeX case is not enabled (without any setups for fonts)

I want to know if this is a matter of the environment, so here is the list of the installed TeXLive packages (from output pacman -Qs texlive):

local/texlive-basic 2023.66594-20 (texlive)
local/texlive-bibtexextra 2023.66594-20 (texlive)
local/texlive-bin 2023.66984-19
local/texlive-binextra 2023.66594-20 (texlive)
local/texlive-doc 2023.66594-20
local/texlive-fontsextra 2023.66594-20 (texlive)
local/texlive-fontsrecommended 2023.66594-20 (texlive)
local/texlive-formatsextra 2023.66594-20 (texlive)
local/texlive-games 2023.66594-20 (texlive)
local/texlive-humanities 2023.66594-20 (texlive)
local/texlive-langchinese 2023.66594-20 (texlive-lang)
local/texlive-langcjk 2023.66594-20 (texlive-lang)
local/texlive-langcyrillic 2023.66594-20 (texlive-lang)
local/texlive-langgreek 2023.66594-20 (texlive-lang)
local/texlive-langjapanese 2023.66594-20 (texlive-lang)
local/texlive-langkorean 2023.66594-20 (texlive-lang)
local/texlive-langother 2023.66594-20 (texlive-lang)
local/texlive-latex 2023.66594-20 (texlive)
local/texlive-latexextra 2023.66594-20 (texlive)
local/texlive-latexrecommended 2023.66594-20 (texlive)
local/texlive-mathscience 2023.66594-20 (texlive)
local/texlive-music 2023.66594-20 (texlive)
local/texlive-pictures 2023.66594-20 (texlive)
local/texlive-plaingeneric 2023.66594-20 (texlive)
local/texlive-pstricks 2023.66594-20 (texlive)
local/texlive-publishers 2023.66594-20 (texlive)

I wish I have provided enough information for reproduction, and if any further information is needed, please ask me in the comments and I will updates the question ASAP.

Ref: XeLaTeX, fontspec and printing the name of the current font

  • 1
    xelatex should give this output in an up to date texlive – David Carlisle Jan 27 '24 at 12:37
  • what are you showing in your question it appears to be text. Do you mean you cut and pasted from the pdf output? (the results of cut and paste always depend on the pdf viewer) what does your output image look like, see my above comment – David Carlisle Jan 27 '24 at 12:39
  • 1
    see https://tex.stackexchange.com/questions/690449/suddenly-and-is-not-translated-to-curly-quotes-and-en-dash – Ulrike Fischer Jan 27 '24 at 13:19
  • @DavidCarlisle Yes, I cut and pasted from the PDF output. Since the texts I pasted here looks the same as the PDF output, I did not bother to make a screenshot. I did not get your output with my texlive (which should be up-to-date). The question has been labeled as a duplicate and thank Ulrike Fischer for pointing out the solution! – Hoyan Mok Jan 27 '24 at 15:41

0 Answers0