TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to get the closing single quote in math mode. The apostrophe in math mode is displayed as prime.

Why can't I get $`a'$ in math mode.                                                  
share|improve this question
up vote 6 down vote accepted

You should switch to text-mode, eg.

Why can't I get $`a\textrm'$ in math mode
share|improve this answer
that's it. thanks! – Oxdeadbeef Mar 20 '12 at 21:37

Punctuation that is not part of a formula should go outside the formula:

When \(a>0\), we say that \(a\) is \emph{positive}.

In the interval \([0,1]\) there are infinitely many rational numbers.

It's quite rare that quotes are used as math symbols, but I've seen them in some textbook on mathematical logic. Since ' is used for denoting a prime (dash) in math, one can resort to a different trick: the lines


will define two commands that will give left and right quotes in math and your input can become

Why can't I get $\mlq a\mrq$ in math mode.

but in this case `$a$' should be probably better.

I've added a companion to \mrq just for symmetry and, perhaps, greater clarity.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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