# Weird compilation error

Why is it that

$f\langle s,t \rangle = \sum_\substack{v,w \in E \\ v \in S, w \in T}}f(v,w) \\$


compiles for me, despite the extra }, but

$f\langle s,t \rangle = \sum_\substack{v,w \in E \\ v \in S, w \in T}f(v,w) \\$


does not?

Edit: amsmath 2000/07/18 v2.13, pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/W32TeX) (format=pdflatex 2013.3.3)

I get an error on both lines:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$f\langle s,t \rangle = \sum_\substack{v,w \in E \\ v \in S, w \in T}}f(v,w) \\$

compiles for me, despite the extra \}, but

$f\langle s,t \rangle = \sum_\substack{v,w \in E \\ v \in S, w \in T}f(v,w) \\$

does not?

\end{document}


Produces

! Missing { inserted.
\vcenter
l.8 ...um_\substack{v,w \in E \\ v \in S, w \in T}
}f(v,w) \\
?
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/omscmr.fd)
! Missing { inserted.
\vcenter
l.14 ...m_\substack{v,w \in E \\ v \in S, w \in T}
f(v,w) \\
? x
No pages of output.


with an error on lines 8 and 14.

The error is a missing { after the _

This produces no error:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$f\langle s,t \rangle = \sum_{\substack{v,w \in E \\ v \in S, w \in T}}f(v,w)$

\end{document}

• I'll keep the complete documents thing in mind. Also, I was under the impression that one entity counted as the same, for example a_\mathrm{min} is valid. Why is this different? – Hameer Abbasi Apr 9 '13 at 13:20