A LyX document I wrote won't compile after I added in a mathematical formula the command root (in fact, \root[k]{\alpha}). I would have written you the code, but the document is long (over than 20 pages), so it would be too much. Any ideas on how to solve it?
Thanks in advance.
Edit:
The specific line is:
Let $\alpha\in\mathbb{R}$. Then
\[
\sqrt[k]{\alpha}
\]
And the error message is:
"A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)"
Edit 2:
Here is the problematic part, I created a new document and this one doesn't compile on LyX.]
%% LyX 2.0.6 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=2.54cm,bmargin=2.54cm,lmargin=3.18cm,rmargin=3.18cm}
\usepackage{mathrsfs}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\theoremstyle{plain}
\newtheorem{thm}{\protect\theoremname}[section]
\theoremstyle{definition}
\newtheorem{defn}[thm]{\protect\definitionname}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{bbold}
\DeclareSymbolFont{bbold}{U}{bbold}{m}{n}
\DeclareSymbolFontAlphabet{\mathbbold}{bbold}
\setcounter{section}{-1}
\renewcommand{\raise}[2]{#1^#2}
\makeatother
\usepackage{babel}
\providecommand{\definitionname}{Definition}
\providecommand{\theoremname}{Theorem}
\begin{document}
\title{Try}
\maketitle
\global\long\def\layer#1#2{\overset{\left[#2\right]}{}#1}
\global\long\def\ELT#1#2{\mathscr{R}\left(#2,#1\right)}
\begin{defn}
Let $R=\ELT{\mathbb{R}}{\mathbb{C}}$, and take $\alpha=\layer a{\ell}\in R$
and $k\in\mathbb{N}$. Then $\sqrt[k]{\alpha}$.\end{defn}
\end{document}
\sqrt, not\root. And a general comment: example code for questions should always be as short as possible. That means you should make a copy of your document, and remove everything that doesn't influence whether the error occurs or not. In some cases you may need to go through some trial and error, but in this case you could probably have removed everything but a single equation containing the command. It's also helpful to report the entire error message that you get. – Torbjørn T. Jan 19 '15 at 15:13\documentclass{article}\usepackage{amsfonts} \begin{document}Let $\alpha\in\mathbb{R}$. Then \[\sqrt[k]{\alpha}\]\end{document}– LaRiFaRi Jan 19 '15 at 15:28\sqrteven for the kth root. – David Carlisle Jan 19 '15 at 15:29layercommand missing its parameters? – Nigel Jan 21 '15 at 00:04\renewcommandon a command you don't know what's used for. – egreg Jan 22 '15 at 20:47