[Tex/LaTex] error with math mode

errorsmath-mode

Given a curve $\mathcal{L}$, define two functions of distance transform $\kappa_{+}$ and $\kappa_{-}$ on \mathbb{R}^{2} as
$\kappa_{+}(x) = d(x,\mathbb{R}^{2}\D), x \in \mathbb{R}^{2},                     (1)$
$\kappa_{-}(x) = d(x,\mathbb{R}^{2}\D), x \in \mathbb{R}^{2},                     (2)$

I get following error:

Undefined sequence

Best Answer

You need to be careful to use mathmode correctly; in particular, \mathbb needs to be in mathmode.

You didn't specify what the macro \D does, but it looks as if would you like to use the align environment, as follows

\documentclass{article}

\usepackage{amssymb}
\usepackage{amsmath}
\newcommand{\D}{D}

\begin{document}
 Given a curve $\mathcal{L}$, define two functions of distance transform $\kappa_{+}$ 
 and $\kappa_{-}$ on $\mathbb{R}^{2}$ as 
 \begin{align}
 \kappa_{+}(x) & = d(x,\mathbb{R}^{2}\D), x \in \mathbb{R}^{2} \\
 \kappa_{-}(x) & = d(x,\mathbb{R}^{2}\D), x \in \mathbb{R}^{2}
 \end{align}
\end{document}
Related Question