Take the 2-minute tour ×
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.

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

share|improve this question
1  
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
add comment

1 Answer

up vote 5 down vote accepted

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:

enter image description here

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}
share|improve this answer
    
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
1  
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
1  
@Mico: Incorporated your suggestion. –  Peter Grill Jul 17 '12 at 0:12
add comment

Your Answer

 
discard

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.