## LaTeX forum ⇒ XeTeX ⇒ Fontspec: what is the meaning of Mapping=tex-text?

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
efroselli
Posts: 24
Joined: Wed Feb 20, 2013 1:24 pm

### Fontspec: what is the meaning of Mapping=tex-text?

Hello again to the forum,

I'm still investigating the compilation problem with XeTeX on our production machine.

In all the preambles of the Lyx source files, I have blindly included the lines:
1. \usepackage[T1]{fontenc}
2. \usepackage{xcolor}
3. \usepackage{graphics}
4. \usepackage[cm-default]{fontspec}
5. \usepackage[no-sscript]{xltxtra}
6. \usepackage{xunicode}
7.
8. \setmainfont[Mapping=tex-text]{Calibri}
9. \setsansfont{Calibri}

because I am following examples that I see in documentation, but which are not extensively explained (or comprehensible to me).

Perhaps our compilation problems are coming from something in here. I read about people having problems with Fontspec after upgrading MiKTeX and that this could have something to do with mappings. So what are mappings and what options have I for using them?

And while I'm on it, what is the meaning of the other keys, [cm-default] in fontspec and [no-sscript] in xlxtra? Could a compilation problem come from there?

Thanks to the wise people who can demystify me.

EFR

Tags:

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany
What about just reading the relevant parts of the fontspec manual? Feeding the search function of your PDF viewer with the corresponding keywords should lead you to the places where this option is described.

Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

efroselli
Posts: 24
Joined: Wed Feb 20, 2013 1:24 pm
I have read them. I can't make head or tail of them.

"Using the tex-text mapping is also equivalent to writing Ligatures=TeX. The use of
the latter syntax is recommended for better compatibility with LuaTEX documents."

Much the wiser!

EFR

cgnieder
Site Moderator
Posts: 1986
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:
efroselli wrote:I have read them. I can't make head or tail of them.

"Using the tex-text mapping is also equivalent to writing Ligatures=TeX. The use of
the latter syntax is recommended for better compatibility with LuaTEX documents."

Well, it enables TeX Ligatures such as ---. Compare

1. \documentclass{article}
2. \usepackage{fontspec}
3. \setmainfont{Calibri}
4. \begin{document}
5. A--Z
6. \end{document}

with

1. \documentclass{article}
2. \usepackage{fontspec}
3. \setmainfont[Ligatures=TeX]{Calibri}
4. \begin{document}
5. A--Z
6. \end{document}

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim