Mixone - 10 months ago 65
LaTeX Question

# Curly brace error occurring when curly braces are closed correctly

As title says I get error:

line 55: Missing { inserted ... $$\sum_{i=1}^{n} \lambda_i v_i =O_\vec{E} line 55: Missing } inserted ...v_n \in A =>\lambda_i =0,...,\lambda_n =0 : Not defining \perthousand. : Not defining \micro.  The exact line and its context are:  \begin{itemize} \item On dit que A est \textit{libre} si le seule c. l. de vecteurs de A egales a O_E est la c. l. triviale. \item C'est-a-dire si:$$\sum_{i=1}^{n} \lambda_i v_i =O_\vec{E}, v_1...v_n \in A =>\lambda_i =0,...,\lambda_n =0
\end{itemize}


The packages I have imported are:

\usepackage[utf8]{inputenc}
\usepackage{gensymb}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{fancyhdr}
\usepackage[margin=.75in, a4paper, portrait]{geometry}


The problem here stems from the somewhat greedy nature of the subscript routine when you use

O_\vec{E}


It grabs \vec without it's argument giving rise to the problem. Here are my suggestions to fix your situation:

Here is a complete minimal example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{itemize}
\item Here is some \textit{regular} text, mixed in with $O_E$ some math.
\item And a display equation:
$\sum_{i=1}^{n} \lambda_i v_i = O_{\vec{E}}, v_1,\dots,v_n \in A \implies \lambda_i = 0,\dots,\lambda_n = 0$
\end{itemize}

\end{document}