# XeLaTeX changes " to ”

Whenever I enter a QUOTATION MARK (U+0022), like in this MWE:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}
This is "in quotes"
\end{document}


I end up with:

That wrong symbol there is a RIGHT DOUBLE QUOTATION MARK (U+201D).

This is XeTeX, Version 3.14159265-2.6-0.99998 (MiKTeX 2.9.6350 64-bit) (preloaded format=xelatex 2017.10.13)

• Try with  instead of " Aug 12 '18 at 9:38
• That yields “ (U+201C LEFT DOUBLE QUOTATION MARK), but it's kind of tangential to my question. Also, I don't mind this behavior because I usually don't use  in text and also it's one of the "classic" workarounds before we had XeTeX. Aug 12 '18 at 9:42
• Do you need other TeX ligatures to work, like , '', --, ---, etc.? Aug 12 '18 at 10:28
• Oh just saw your comment! Aug 12 '18 at 10:29

You can avoid this mapping like this. But this will also disable the other "tex" mappings like -- to endash:

\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures[\rmfamily,\sffamily]{}
\setmainfont{Arial}
\begin{document}
This is "in quotes" -- ---
\end{document}


An alternative is to use \textquotedbl.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}
This is \textquotedbl in quotes\textquotedbl\  -- ---

This is in "quotes".
\end{document}


• Would it be better to explicitly use Mapping= instead of an empty feature set to make clear what specifically makes this work? Aug 12 '18 at 10:17
• Mapping wouldn't work with lualatex. I personally wouldn't need to reset the quote style at all like this, I never use quote signs directly but use \enquote of csquotes. Aug 12 '18 at 10:35
• In hindsight this mapping probably should have been left out of the tex-text mapping / tlig feature... oh well :) Aug 12 '18 at 12:26