[Tex/LaTex] Runaway argument? paragraph ended before \split was complete

amsmath

Please help me with my Latex code. I've been trying to get this running but I don't understand the error:

_Runaway argument?
h \in ZWEI-PAAR \iff \exists k1,k2,k3,k4 \in h: (k1\neq k2 \\ \wedge \ETC.
Paragraph ended before \split was complete.
\par
l.63_


Here's the code snippet.

\begin{equation*}
\begin{split}

h \in ZWEI-PAAR \iff \exists k1,k2,k3,k4 \in  h: (k1\neq k2 \\
\wedge k1 \neq k3
\wedge k3 \neq k4
\wedge wert(k1)= wert(k2) \\
\wedge wert(k3) = wert(k4) \\
\wedge \nexists k \in h \backslash \{k1,k2,k3,k4,k5\}:
wert(k) = wert(k1)
\wedge wert(k) = wert(k3) ) \\

\end{split}
\end{equation*}


EDIT: I fixed the new lines. However, now I got a new problem:

*Undefined control sequence.
<argument> ...t {wert}(k_{4}) \\ {}\land \nexists
k \in h \setminus \{\,k_{1...
l.64 \end{split}*


Translated code snippet:

\documentclass{article}

\usepackage{amsmath}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}

\begin{document}

\subsection{b)}
\begin{equation*}
\begin{split}
h \in \mathit{TWO} - \mathit{PAIR} \iff \exists k_{1}, k_{2},
k_{3}, k_{4} \in  h : (k_{1} \neq k_{2} \\
{}\land k_{1} \neq k_{3} \land k_{3} \neq k_{4}
\land \mathit{value}(k_{1}) = \mathit{value}(k_{2}) \\
{}\land \mathit{value}(k_{3}) = \mathit{value}(k_{4}) \\
{}\land \nexists k \in h \setminus \{\,k_{1}, k_{2}, k_{3}, k_{4},
k_{5}\,\} : \mathit{value}(k) =
\mathit{value}(k_{1})
\land \mathit{value}(k) = \mathit{value}(k_{3}))
\end{split}
\end{equation*}

\subsection
\end{document}


You have blank lines in your equation environment. These are not allowed, you must remove them.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{equation*}
\begin{split}
h \in ZWEI-PAAR \iff \exists k1,k2,k3,k4 \in  h: (k1\neq k2 \\
\wedge k1 \neq k3 \wedge k3 \neq k4
\wedge wert(k1)= wert(k2) \\
\wedge wert(k3) = wert(k4) \\
\wedge \nexists k \in h \backslash \{k1,k2,k3,k4,k5\}: wert(k) =
wert(k1)
\wedge wert(k) = wert(k3) ) \\
\end{split}
\end{equation*}

\end{document}


Or comment them out:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{equation*}
\begin{split}
%
h \in ZWEI-PAAR \iff \exists k1,k2,k3,k4 \in  h: (k1\neq k2 \\
\wedge k1 \neq k3 \wedge k3 \neq k4
\wedge wert(k1)= wert(k2) \\
\wedge wert(k3) = wert(k4) \\
\wedge \nexists k \in h \backslash \{k1,k2,k3,k4,k5\}: wert(k) =
wert(k1)
\wedge wert(k) = wert(k3) ) \\
%
\end{split}
\end{equation*}

\end{document}


Below I've taken the liberty of suggesting a few general improvements.

• I have enclosed ZWEI and PAAR in \mathit{}. I have no idea what these are, and whether they should be upright, but if you just use ZWEI LaTeX will treat them as variables being multiplied and you will get quite bad spacing

• I've subscripted your numbers after k but you may not have wanted this.

• I've elected to replace \wedge by \land (logical and) as I think this more appropriate here. In same cases you will see I have {}\land which will get you nice binary spacing after the symbol, which I think should be there.

• I've replaced \backslash with \setminus

• I've given wert the \mathit{} treatment as well, although perhaps this should be an operator?

• I've added \, inside the { ... } for better spacing

I think it looks better this way, but I'm not actually familiar with what you're typesetting here so some of my guesses may be mistakes, but you might like to consider them.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{equation*}
\begin{split}
h \in \mathit{ZWEI} - \mathit{PAAR} \iff \exists k_{1}, k_{2},
k_{3}, k_{4} \in  h : (k_{1} \neq k_{2} \\
{}\land k_{1} \neq k_{3} \land k_{3} \neq k_{4}
\land \mathit{wert}(k_{1}) = \mathit{wert}(k_{2}) \\
{}\land \mathit{wert}(k_{3}) = \mathit{wert}(k_{4}) \\
{}\land \nexists k \in h \setminus \{\,k_{1}, k_{2}, k_{3}, k_{4},
k_{5}\,\} : \mathit{wert}(k) =
\mathit{wert}(k_{1})
\land \mathit{wert}(k) = \mathit{wert}(k_{3})) \\
\end{split}
\end{equation*}

\end{document}