Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 $
      $
share|improve this question
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 '13 at 4:13
2  
Oh, and ... should be \dotsb because you're using amsmath and they are dots between binary operators. –  kahen Feb 28 '13 at 4:18
    
@kahen Your comment is the correct answer. –  egreg Feb 28 '13 at 9:38

1 Answer 1

$$ 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.