# How to write quotation marks in math environment?

How to use quotation marks in math mode? I need to get \lim with the quation marks above.

-
Would you be able to provide a graphic of exactly what you're after? The reason being that \lim is an operator that already takes a subscript (or superscript). –  Werner Jul 16 '12 at 17:51

If you use ", these are no different in text mode, or math mode in terms of how you use them, although the spacing is a slightly different. However, as Mico pointed out is you use the recommended approach of ...'' to obtain the double quotes, then this needs special handing inside math mode.

If you desire single quotes you can use the solution from How to get the closing single quote in math mode:

If possible you should put the quotes outside of math mode.

## Code:

\documentclass{article}
\usepackage{amsmath}

\DeclareMathSymbol{\mlq}{\mathord}{operators}{}
\DeclareMathSymbol{\mrq}{\mathord}{operators}{'}

\begin{document}
\textbf{Text mode:}\par
abc'' \qquad\qquad\quad abc'

\bigskip
\textbf{Inline Math:}\par
$\lim_{x \to 0} f(x)"$ \quad $\mlq\lim_{x \to 0} f(x)\mrq$

$\lim_{x \to 0} f(x)$'' ~\quad $\lim_{x \to 0} f(x)$'

\bigskip
\textbf{Display Math:}
$\lim_{x \to 0} f(x)" \qquad \mlq\lim_{x \to 0} f(x)\mrq$
%
$\text{\lim_{x \to 0} f(x)''} \qquad \mlq\lim_{x \to 0} f(x)\mrq$

\end{document}

-
What about single right quotes? –  Ian Thompson Jul 16 '12 at 18:01
@IanThompson: Good point, have updated the solution for single quotes. –  Peter Grill Jul 16 '12 at 18:12
It might be good to point out explicitly that whereas one can get away with using " for closing double quotes inside math mode, this is not the case for the usually-recommended way of inserting double closing quotes (''). The latter method will give a double-prime symbol when encountered in math mode. To display items encased in single or double quotes while in math mode, it may be best to encase the item in question in \text{$...$''}. Doing so will also circumvent problems with inconsistent spacing caused by whether the quotes occur before or after the math-mode switch \$. –  Mico Jul 16 '12 at 18:42
@Mico: Incorporated your suggestion. –  Peter Grill Jul 17 '12 at 0:12