[Tex/LaTex] Undefined control sequence }

errorslatexian

Latex compile my code and it's kinda ok, but I don't understand an
error it gives me

This is part of my code that doesn't work

\documentclass[paper=a4, fontsize=12pt]{scrartcl} 

\usepackage[T1]{fontenc} 
\usepackage{fourier} 
\usepackage[english]{babel}
\usepackage{amsmath,amsfonts,amsthm} 

\usepackage{enumerate}

\begin{document}

\section*{Exercise 1}

\textit{Let $(\Omega, \varepslion, \mathbb{P})$ 
be a probability space, and take $\mathcal{F}(\cdot)$ 
to be a filtration of $\sigma$-algebras. 
Assume X be an integrable random variable, and define 
$X(t):=\mathbb{E}(X|\mathcal{F}(t))$ for times $t \geqslant 0$. 
Show that  $X(\cdot)$ is a martingale. 
}

\end{document}

Latex (I'm using latexian on mac) give me an error in the last line (the parenthesis } )telling "undefined control sequence".
I really can't understand why it doesn't work. If I erase the }, it doesn't give me any error (but the preview tell me "error view console")

I used this code other times (same thing, different worlds in \textit{}) and always worked fine.

Best Answer

The complete error message you get is

! Undefined control sequence.
<argument> Let $(\Omega , \varepslion 
                                      , \mathbb {P})$ be a probability space...
l.20 }

? 

An error message like this is made of four parts:

  1. The error message itself
  2. The line where the unidentified control sequence appears
  3. The continuation of the line
  4. The line where TeX stopped processing

The number line you get is where the closing brace of the argument to \textit is, because TeX doesn't interpret arguments when it absorbs them. Thus it realizes there's an error when it's too late. The error is somewhere before the }, but you can see it clearly in the LaTeXian console.

In this case it's just a typo: the correct command is \varepsilon.

Note that sometimes this error checking may be confusing: if you make a typo in the preamble, say

\newcommand{\eps}{\varepslion}

and use \eps in the document, the error message would point to the same location, but it will be like

! Undefined control sequence.
\eps ->\varepslion 

l.22 }

so you know that the error is in the definition of \eps.