I noticed XeLaTeX uses different unicode such as the SINGLE RIGHT QUOTATION MARK (and related others), and for hyphens too. How can I get it to just use ' and " and - regular ascii marks like you use for programming, so (a) when you copy-paste the stuff from the PDF it doesn't use the special unicode characters for quotations/hyphens, and (b) I don't have to write \regularsinglequote or something like that for every quote I want to use, I can just write a sentence "hello world, I don't use unicode quotes-or-hyphens" and it uses the plain ascii versions of quotes/hyphens.

The document I'm using is basically this:



\settowidth{\characterwidth}{\normalfont x}

hello world

You can suppress the replacement of the quotes and dashes with the option [Ligatures=TeXReset]:



\setmainfont{TeX Gyre Heros}[Ligatures=TeXReset]

"abc--cde 'quote' text"

enter image description here

| improve this answer | |
  • I get LaTeX error: "kernel/key-choice-unknown" ! Key 'fontspec/Ligatures' accepts only a fixed set of choices. – Lance Pollard Aug 21 '19 at 14:52
  • then either update your texsystem or check the fontspec documentation or the code for the name your version used. – Ulrike Fischer Aug 21 '19 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.