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

  • in view of your NB you should instead post the test file that you created, so people can debug. – David Carlisle Feb 1 '17 at 18:30
  • \R is not defined by default, have you defined it? – David Carlisle Feb 1 '17 at 18:31
  • Is \R defined? The last token in the error message is the one were TeX stopped; this seems to be \R if you quoted the message correctly. – gernot Feb 1 '17 at 18:31
  • welcome to tex.sx. just a guess ... \R isn't a "basic" command; it's often defined to be \mathbb{R}, but that definition has to be provided. – barbara beeton Feb 1 '17 at 18:32
  • Could you post the (complete) mardown file that replicates your problem? – Werner Feb 1 '17 at 19:27

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$

  • No, \R is definitely defined here and works on its own. – Bluefire Feb 2 '17 at 4:33
  • @Bluefire see above where I have added a complete test file. You have neither shown your full input, nor shown the error message that you got, so the assumption has to be that R is not defined or the error is generated by some different code. Please fix your question to show an a test file. – David Carlisle Feb 2 '17 at 7:47
  • I have posted an update to the question. – Bluefire Feb 2 '17 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.