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

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

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

Post by efroselli »

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:

Code: Select all

\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{graphics}
\usepackage[cm-default]{fontspec}
\usepackage[no-sscript]{xltxtra}
\usepackage{xunicode}

\setmainfont[Mapping=tex-text]{Calibri}
\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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

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

Post by localghost »

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
efroselli
Posts: 24
Joined: Wed Feb 20, 2013 1:24 pm

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

Post by efroselli »

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
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

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

Post by cgnieder »

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

Code: Select all

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Calibri}
\begin{document}
A--Z
\end{document}
with

Code: Select all

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Calibri}
\begin{document}
A--Z
\end{document}
Regards
site moderator & package author
Post Reply