0

i'm currently working on using the equation environment in combination with split. I later want to reference this equation with only one number, but it simply doesnt work

\begin{equation}
\left\{ \begin{split}
    (\partial_\mu \partial^\mu + m^2) D_R(x-y) = -i \dfdist{x-y} \\
    D_R(x-y) = \qq{if $x^0 < y^0$}
\end{split} \right.\label{equ:scalar-source-cond}
\end{equation}

The \left\{ is there to embrace both equations.

I hope you can help me with that.

2
  • 1
    Welcome to TeX.SE. How are \dfdist and \qq defined?
    – Mico
    Jan 12, 2020 at 14:49
  • 1
    Have you considered replacing \left\{ \begin{split} with \begin{cases} and \end{split} \right. with \end{cases}?
    – Mico
    Jan 12, 2020 at 14:54

1 Answer 1

1

The simple code

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\left\{ \begin{split}
    (\partial_\mu \partial^\mu + m^2) D_R(x-y) = -i \dfdist{x-y} \\
    D_R(x-y) = \qq{if $x^0 < y^0$}
\end{split} \right.\label{equ:scalar-source-cond}
\end{equation}
\end{document}

produces ten errors when run, all marked on line 8, that is, at \end{split}.

Of course, the fact that the label is not set is completely irrelevant: after so many errors, the main thing to do is to fix them.

How is beyond the capabilities of my crystal ball that has no idea of what \dfdist and \qq mean.

Probably using cases is a better idea.

If I remove \dfdist and \qq, I get no error, but a self-explaining warning:

Package amsmath Warning: Cannot use `split' here;
(amsmath)                trying to recover with `aligned' on input line 8.

and the equation can be referenced. But split is definitely out of place there anyway.

You must log in to answer this question.

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