In mathmode, ' gets converted to "prime" symbol. What I'd like is neither the closing nor opening single quote as in (How to get the closing single quote in math mode). Rather, how do I get an unslanted neutral single quote in mathmode?

To avoid any XY problem, I state here problem X:

I am typesetting a document that uses Mathematica's font using the wrisym package. After \usepackage{wrisym}, I can access all the Mathematica font in math-mode using \mathversion{monobold}. But sometimes, I need the character that you get when you type ' in the front end of the notebook, which is not the prime character. How do I get LaTeX to output the unslanted ' character.

EDIT Many thanks for everyone's prompt answers. Please read below for a clear formulation of my problem.


\usepackage{amsmath, amssymb}




normal math:
$x y z$

Mathematica text:

symbol then quote:



enter image description here

Inputing the last two lines in Mathematica, it looks like:

enter image description here

Notice that the ' character looks different in LaTeX than in the Mathematica notebook, because (I believe) it has been converted to a prime.

How do I get the raw ' character in Mathematica font to appear in LaTeX so that it better approximates what appears in the Mathematica notebook?

  • Maybe \textrm{'}, as in $A' \ne A\textrm{'}$ Jul 6, 2016 at 13:28
  • Should this be in textmode? Maybe you could show us an example of expected output?
    – Runar
    Jul 6, 2016 at 13:29
  • @StevenB.Segletes I cannot access the special fonts in text mode (which is why \textrm{'} doesn't work).
    – QuantumDot
    Jul 6, 2016 at 13:32
  • Then how about \setbox0=\hbox{'}$A' \ne A\box0$? Jul 6, 2016 at 13:34
  • 1
    This comment won't bring any answer, but this seems more a font design question than a LaTeX question to me. In general, it seems straight single quote signs are more common in fixed width fonts. Furthermore, from the space between x and ' in your last example, it seems to me that your output uses such a font (I can't test, I don't use mathematica). Lastly, from the very low quality images on this page I conclude that mathematica uses a very ordinary single quote sign for derivatives. Jul 6, 2016 at 17:16

2 Answers 2


I really doubt this is correct usage, but here is a solution using the textcomp-package.


enter image description here



  • Probably \textnormal is better.
    – egreg
    Jul 6, 2016 at 23:48

Wether you define a command, and use it

$a\q b$

or if you want all ' to give you the usual single text quote, you change the mathcode of ' to not being “math-active” (active means \mathcode`'="8000).

\mathcode`'=`' % this seems to work, but I'm not sure it's the perfect way
  • @QuantumDot It's not entirely clear to me if this is what you want, if you want the “upquote”, you can change the definition of the active ' to whatever you want that outputs the upquote. You should edit your question and add some code or image.
    – Manuel
    Jul 6, 2016 at 13:48
  • I have expanded my question under "EDIT". Perhaps it clearly explains what I'm looking for.
    – QuantumDot
    Jul 6, 2016 at 14:41
  • I think I came up with an alternative way to find what I need, but I need some help: tex.stackexchange.com/questions/318358/…
    – QuantumDot
    Jul 7, 2016 at 8:12
  • Use \xfonttable as Ulrike said (and with other math encodings), and look for hte position of the glyph. If you pass a screenshot of the font table we can help you.
    – Manuel
    Jul 7, 2016 at 9:47
  • 1
    Post the answer here in that case, or add the screenshot and we can add an answer that lets ' give you the glyph you want.
    – Manuel
    Jul 7, 2016 at 10:37

You must log in to answer this question.

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