Quotations in math mode using \enquote command from csquotes package
LaTeX issues one error and two warnings:
! Double superscript.
<recently read> ^
l.13 Quote by hand: $``a^2+b^2=c^2'
'$
?
LaTeX Warning: Command \textquotedblleft invalid in math mode on input line 15.
LaTeX Warning: Command \textquotedblright invalid in math mode on input line 15
Such errors and warnings should not be disregarded; it's a perhaps sad truth that \textquotedblleft
in math mode produces a backslash, whereas \textquotedblright
actually produces a closing double quote.
The error is because '
in math mode is interpreted as ^{\prime}
, so c^2'
indeed has a double superscript (the converse c'^2
is instead legal, as is c''^2
).
If you want to quote something in math mode, you should use math symbols.
\documentclass{article}
\DeclareMathSymbol{\mlq}{\mathord}{operators}{'134}
\DeclareMathSymbol{\mrq}{\mathord}{operators}{'42}
\begin{document}
$\dots\mlq\dots\mrq\dots$
\end{document}