# Straight quote literals when using LuaTeX and fontspec

This is a similar question to How to get straight quotation marks?, but in my case, I want literal ' and " marks to stay that way, as I use Unicode curly quotes when I want curly quotes. Is there a simple header option to make this happen? I’m using LuaTeX and fontspec.

(Background: I’m using Emacs to export existing Org documents—written, not by me, with straight quotes only—as PDFs. When I did this with the default PDFLaTeX setup, Unicode special characters (not quotes, but other special characters) wouldn’t render. So I changed the compiler to LuaTeX and found a way to add \usepackage{fontspec} and \setmainfont{Linux Libertine O} to my documents’ header options, and now Unicode special characters work, but every straight quote is rendered as a closing curly quote. This is simply too much for my autistic sensibilities!)

• Welcome to TeX.SE.
– Mico
Feb 27, 2021 at 6:28

The "smart" closing single and double quotes are generated if fontspec's option Ligatures=TeX option is active, which is the case by default. To switch it off, just specify the option Ligatures=TeXOff -- or, equivalently, [RawFeature=-tlig] -- when running \setmainfont or \setsansfont. Observe that this approach works with all fonts, not just Linux Libertine O.

Note that setting Ligatures=TeXOff will also prevent -- and --- being converted automatically to en-dashes and em-dashes, respectively. Please advise if this might cause a problem for your document. (Given that your document already Unicode curly quotes, I tend to think that it might also use Unicode en- and em-dash characters; however, I may be wrong.)

\documentclass{article}
\usepackage{fontspec}
\newcommand\dummysentence{A sentence with straight 'single' and  "double" quotes.}

\begin{document}
\setmainfont{Linux Libertine O}[Ligatures=TeXOff] % or [RawFeature=-tlig]
\dummysentence

\setmainfont{EB Garamond}[Ligatures=TeXOff,
Scale=MatchLowercase % same x-height as preceding font
]
\dummysentence

\setsansfont{Helvetica Neue}[Ligatures=TeXOff,Scale=MatchLowercase]
\textsf{\dummysentence}



• @Clément - I can only point to section 3.1.8, "Ligatures", of the fontspec` manual, along with associated table 11. Version 2.7i of the package, dated 2020/02/21, is used with MacTeX2020 and MacTeX2021. Which version of the package is on your system?