[Tex/LaTex] Proof + \mathaccent error

accentserrorsmath-mode

I'm getting an error: "Please use \mathaccent for accents in math mode" for the following code. I'm guessing it is a problem with $Vˆ{\infty}$, but I'm not really sure why it is wrong since it is in $.

\begin{proof}
(4) can be written component-wise for all $t$ 
as $v=Qv$, where $Q$ is the operator 
on $Vˆ{\infty}$ defined on the R.H.S of (4). 
\end{proof}

Best Answer

You are using a non-ASCII character, ˆ, instead of ^ as the superscript initiator. The character ˆ can also be inputted as \textasciicircum. That might be OK in text mode (as long as utf8 input encoding is used), but it doesn't work in math mode.

The upshot: Use only ^ in math mode.

An MWE (mininum working example):

\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
$Vˆ{\infty}$ vs.\ $V^{\infty}$
\end{document}

The full set of warning messages actually is:

LaTeX Warning: Command \textasciicircum invalid in math mode on input line 4.

LaTeX Warning: Command \^ invalid in math mode on input line 4.

! Please use \mathaccent for accents in math mode.

\add@accent ...@spacefactor \spacefactor }\accent 

                                                 #1 #2\egroup \spacefactor ...

l.4 $Vˆ

        {\infty}$ vs.\ $V^{\infty}$

? 

TeX's error and warning messages are famously terse (and sometimes nearly impenetrable). The key is to look for the first error or warning message, which in the present case is "LaTeX Warning: Command \textasciicircum invalid in math mode". This might have tipped you off; however, it may not have been obvious [!] that ˆ may also be entered as \textasciicircum.

Related Question