This MWE


A `set` or 'set' 

A `set` or 'set'


Compiled with lualatex foo.tex given the PDF file:

Mathematica graphics

I understand that is how Latex default font works. But I want ' and ` (straight quote and back quote) characters in the main text to also remain the same as in the input Latex file.

The package upquote fixes the verbatim text. How would one go about also fixing the ` and ' that show up in the main text as well?

Does one need a complete new font? Which one would that be? Or is there a package like upquote but for main text?

I googled but could not find something.

Using texlive 2017 on Linux.

1 Answer 1


You can use simply \textquotesingle and escaped grave accents followed by {}. To make both active characters an easy way is the niceverb package:

\usepackage{textcomp}     % access \textquotesingle

A \textquotesingle set\textquotesingle\ or \`{}set\`{}


A 'set' or `set`


The result with pdflatex should be:


  • Thanks. Is it possible to put these commands "\MakeActiveLet\'\textquotesingle \def\textquoteback{`{}} \MakeActiveLet`\textquoteback" in the preamble instead of inside \begin{document} and have them work? I get an error when putting them in preamble now. On windows under Milktex, the package niceverb does not exist for some reason. I will try to install it manually for windows.
    – Nasser
    Jan 15, 2018 at 16:29
  • @ According to CTAN, niceverb.sty is in the nice­text package of MikTeX. I'm afraid that in the preamble break something, and maybe also in the body of a complex document. For instance, is not compatible with the markdown package ... IMHO change active characters is a bad idea at least in projects of importance.
    – Fran
    Jan 15, 2018 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .