# latex equation missing { inserted on end split

I looked up and tried many previous posts on the matter with no success, any help would be great!

I am getting the error message : “latex missing } inserted” error message in equation"

  \begin{equation*}
\begin{split}
a = max{(b(l{1}, vocab),\\
b(l{2}, vocab),...\\
,b(l{n}, vocab))}
\end{split}
\end{equation*}

• Each row in a split is contained in its own group, so you can't use a macro that takes arguments across rows. Jun 30 '19 at 12:34
• @Skillmon Thank you! Is there any other way to write this equation on several lines? Jun 30 '19 at 12:35
• You might want to use \max instead of max, the latter uses the wrong font for an operator. Also \max doesn't take any argument, so you can just drop the two braces. If you want to have braces in your output, you have to use \{ and \} instead. Jun 30 '19 at 12:35
• @Skillmon This solved the error and put an end to hours of work! Thank you! Jun 30 '19 at 12:38

You might want to use aligned instead of split, also the things stated in my second comment remain true. Additionally, I'm not sure what you do mean with vocab, the way you put it it would be interpreted as v*o*c*a*b (so 5 factors), if this is a word, you might want to put a \text around them (provided by amsmath), or a \mathrm.

\documentclass[border=3.14,preview]{standalone}

\usepackage[]{amsmath}

\begin{document}
\begin{aligned} a = \max\{( &b(l\{1\}, \text{vocab}), \\ &b(l\{2\}, \text{vocab}), \dots, \\ &b(l\{n\}, \text{vocab}))\} \end{aligned}
\end{document}


I think the traditional way of typesetting this is

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$a = \max_{i\in\{1,\ldots,n\}}\{b(\ell_i, vocab)\}$$
\end{document}


or

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$a = \max_{1\le i\le n}\{b(\ell_i, vocab)\}$$
\end{document}


modulo the uncertainty what vocab really is.

From the need of splitting this, I guess you're dealing with a two column document.

It's a common misunderstanding that \max takes an argument. It doesn't. Likewise for \sum, \int, \log and the other operators.

In your case it's better to use slightly bigger outer delimiters.

\documentclass[a4paper,twocolumn]{article}
\usepackage{amsmath}

\usepackage{lipsum} % for mock text

\begin{document}

\lipsum[1][1-3]
\begin{equation*}
\begin{split}
a = \max\bigl(
&b(l_{1}, \mathit{vocab}), \\
&b(l_{2}, \mathit{vocab}), \\
&\dots, \\
&b(l_{n}, \mathit{vocab})\bigr)
\end{split}
\end{equation*}
\lipsum

\end{document}


I made a guess about l{1}: if it's not a subscript, then type simply l1. If you want braces, it should be l\{1\}.

I would do it in one of these ways, on two lines:

\documentclass[]{article}
\usepackage{mathtools}

\begin{document}

\begin{equation*}
\begin{split}
a = \max\bigl( b(l_{1}, \mathrm{vocab}), b(l_{2},\mathrm{ vocab} & ), \\
\dots, b(l_{n}, \mathrm{vocab} & )\bigr)
\end{split}
\end{equation*}

\begin{equation*}
\begin{multlined}
a = \max\bigl( b(l_{1}, \mathrm{vocab}),b(l_{2},\mathrm{ vocab}), \\
\dots, b(l_{n}, \mathrm{vocab})\bigr)
\end{multlined}
\end{equation*}

\end{document}