2

The following compiles fine, but outputs a pdf with a line too long.

\documentclass{article}
\usepackage{amsmath}

\def\group#1{\left ( #1 \right )}
\begin{document}

$$
%\begin{split}
 \group{\neg (v_1 = v_2) \land \neg (v_1 = v_3) \land ... \land \neg(v_1 = v_n)}
 \land \group{\neg (v_2 = v_3) \land \neg (v_2 = v_4) \land ... \land \neg(v_2 = v_n)}
 \land ... \land \group{\neg (v_{n-2} = v_{n-1}) \land \neg (v_{n-2} = v_n)} \land \group{\neg (v_{n-1} = v_n)}
%\end{split}
$$

\end{document}

On the other hand, I get an error when I add the split environment.

\documentclass{article}
\usepackage{amsmath}

\def\group#1{\left ( #1 \right )}
\begin{document}

$$
\begin{split}
 \group{\neg (v_1 = v_2) \land \neg (v_1 = v_3) \land ... \land \neg(v_1 = v_n)}
 \land \group{\neg (v_2 = v_3) \land \neg (v_2 = v_4) \land ... \land \neg(v_2 = v_n)}
 \land ... \land \group{\neg (v_{n-2} = v_{n-1}) \land \neg (v_{n-2} = v_n)} \land \group{\neg (v_{n-1} = v_n)}
\end{split}
$$

\end{document}

Error message:

! Missing } inserted.
<inserted text> 
                }
l.13 $
      $
3
  • 6
    $$ is not supposed to be used with amsmath (or... at all, actually). The documentation even says as much. Try using \[ .. \] instead.
    – kahen
    Feb 28, 2013 at 4:13
  • 2
    Oh, and ... should be \dotsb because you're using amsmath and they are dots between binary operators.
    – kahen
    Feb 28, 2013 at 4:18
  • @kahen Your comment is the correct answer.
    – egreg
    Feb 28, 2013 at 9:38

1 Answer 1

3

$$ is a low level TeX construct that has long been declared obsolete in LaTeX. Instead one should use \[ .. \] for displayed equations. For amsmath in particular, there are certain things one needs to know. (1) the split environment must be inside an equation or equation* environment, and (2) when using amsmath, \[ and \begin{equation*} are functionally equivalent - \[ even starts a new TeX group (not that one should rely on this, though!)

See for example "Why is \[...\] preferable to $$?". I recommend marking it as a favourite because searching for that question is near impossible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .