[Tex/LaTex] Pandoc gives “undefined control sequence” error for seemingly valid statement

amsmathpandoc

I am trying to compile

$\forall u, v, w \in \R^m and c, d \in \R$

All of these are valid symbols and there is no problem in the syntax, as far as I know. However, pandoc refuses to compile it and says there is an undefined control sequence, citing \(\forall u, v, w \in \R. I don't know why that first \( is there because in my text file it is a $. What is wrong with this snippet?

NB: it is 100% this snippet that is the problem since the error persisted after I put it in another file all on its own and tried to compile it.

Edit: this is the entire file. If I put that snippet into its own file it gives the exact same error so I do not see why posting my entire file is necessary. The full error message is as follows (yes, it does say l.61 even though my document is 1 line long):
enter image description here

Best Answer

The format for the error message is

! Undefined control sequence.
l.2 $\forall u, v, w \in \R
                           ^m and c, d \in \R$
? h
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

the linebreak is important as that pinpoints exactly where TeX generated the error.

So here \R is the undefined command. You could define it to be \mathbb{R} or \mathbf{R} or whatever you need.

complete test file:

$\forall u, v, w \in \R^m and c, d \in \R$

\bye