# How to label a multi-line equation?

I have a a multi-line equation, e_1 = e_2 = ... = e_n. Each of the expressions e_i is quite long. So long, in fact, that using the align environment results in some of the equations intruding into the right-hand margin, and even beyond the page. Using the multline environment solves these issues, however this causes another problem. With the align environment I am able to label each of the equations, and reference them further down the document; however, with the multline environment, the following error message is issued:

Package amsmath Error: Multiple \label's: label '...' will be lost.


How can I label the lines of a multline environment? Alternatively, is there another way to achieve the following goals simultaneously:

1. Arranging the multi-line equation one equation per line.
2. Making sure none of the equations oversteps the margins.
3. Labeling each of the equations (or, more precisely, a selection of the equations), so they can be referenced.

Here's an example document that can be used for experimentation purposes.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\sup_{\mathbf{N}}V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(m+_{\mathbf{M}}n)\rangle &\geq_{\mathbf{N}}\sup_{\mathbf{N}}V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(m) +_{\mathbf{R}^{(S)}_{\mathbf{N}, \varphi}} S_{\mathbf{M}, S, \mathbf{N}, \varphi}(n) \rangle\label{eq:1}\\
&= \sup_{\mathbf{N}}\left(V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(m)\rangle +_{\mathbf{R}^{(S)}_{\mathbf{N}, \varphi}} V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(n) \rangle\right)\label{eq:2}\\
&\geq_{\mathbf{N}} \sup_{\mathbf{N}}\left(V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(m)\rangle\right) +_{\mathbf{N}} \sup_{\mathbf{N}}\left(V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(n) \rangle\right),\label{eq:3}
\end{align}

Referencing eq.~\ref{eq:1}.
\end{document}

• – Dr. Manuel Kuehner Jun 6 '18 at 6:31
• @Dr.ManuelKuehner: A quick reading of my post will reveal that I have already tried this solution, and it doesn't work for me. – Evan Aad Jun 6 '18 at 6:35
• Probably align with nested multlined (needs mathtools). You might make up an example so it would be easier to play with it and give better advice. – egreg Jun 6 '18 at 6:56
• @egreg: I've added an example, as per your request. – Evan Aad Jun 6 '18 at 7:05
• @egreg: OK, I've inserted my actual code. – Evan Aad Jun 6 '18 at 7:37

I see no other sensible way than as follows:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\bvar}[1]{\mathbf{#1}}
\newcommand{\bM}{\bvar{M}}
\newcommand{\bN}{\bvar{N}}
\newcommand{\bR}{\bvar{R}}

\begin{document}

\begin{align}
&\sup_{\bN}V_{\bN, S, \varphi}\langle S_{\bM, S, \bN, \varphi}(m+_{\bM}n)\rangle
\notag \\
V_{\bN, S, \varphi}\langle S_{\bM, S, \bN, \varphi}(m)
+_{\bR^{(S)}_{\bN, \varphi}} S_{\bM, S, \bN, \varphi}(n) \rangle
\label{eq:1}\\
\bigl(V_{\bN, S, \varphi}\langle S_{\bM, S, \bN, \varphi}(m)\rangle
+_{\bR^{(S)}_{\bN, \varphi}} V_{\bN, S, \varphi}
\langle S_{\bM, S, \bN, \varphi}(n) \rangle
\bigr)
\label{eq:2}\\
\bigl(V_{\bN, S, \varphi}\langle S_{\bM, S, \bN, \varphi}(m)\rangle)
+_{\bN} \sup_{\bN}(V_{\bN, S, \varphi}\langle S_{\bM, S, \bN, \varphi}(n) \rangle
\bigr),
\label{eq:3}
\end{align}
Referencing eq.~\ref{eq:1}.

\end{document}


• ...or \MoveEqLeft from mathtools – Andrew Swann Jun 6 '18 at 8:17

I propose this, using \mathlap from mathtools and an \intertext for the beginning of the equations. I alse suggest using cleveref for simpler typing of equations references:

\documentclass{article}

\usepackage{mathtools, nccmath}
\usepackage{cleveref}
\usepackage{showframe}
\renewcommand{\ShowFrameLinethickness}{0.3pt}

\begin{document}

\begin{align}
\intertext[0ex]{$\displaystyle \sup_{\mathbf{N}}\mathrlap{V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(m +_{\mathbf{M}}n) \rangle}$}
&{}\geq_{\mathbf{N}}\sup_{\mathbf{N}}V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(m) +_{\mathbf{R}^{(S)}_{\mathbf{N}, \varphi}} S_{\mathbf{M}, S, \mathbf{N}, \varphi}(n) \rangle\label{eq:1}\\
&= \sup_{\mathbf{N}}\left(V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(m)\rangle +_{\mathbf{R}^{(S)}_{\mathbf{N}, \varphi}} V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(n) \rangle\right)\label{eq:2}\\
&\geq_{\mathbf{N}} \sup_{\mathbf{N}}\left(V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(m)\rangle\right) +_{\mathbf{N}} \sup_{\mathbf{N}}\left(V_{\mathbf{N}, S, \varphi}\langle S_{\mathbf{M}, S, \mathbf{N}, \varphi}(n) \rangle\right),\label{eq:3}
\end{align}

Referencing \cref{eq:1}.

\end{document}


Instead of multine, try using the \subequations environnement

\begin{subequations}
\begin{align}
e_1 = ... \\
e_2 = ... \\
... \\
\end{align}
\end{subequations}


With that solution, each e_i will be numbered (x.i)

For equation size, you would certainly have to play with the font size (a great way to do that is to use fontspec since it enables to adjust size precisely.

Edit :

Reading your comment, you can also use the \split{}environment which is like this :

$$\begin{split} e_1 = x +4 ... 5 +6 \\ = hello \\ ... \\ \end{split}$$


This one allows you to do linebreaks in equations in places of your choice without changing the numbering.

Edit 2 :

$$\begin{subequations*} equ1 \\ equ2\\ \end{subequations*}$$


Should allow to have labels on subequations without any tag inside a numbered equation.

• Thanks, but (a) I'd rather use the normal numbering schema, since there's nothing special about this set of equations that merits a change in numbering schema. (b) As I mentioned, the align environment causes some of my equations to spill beyond the size of the page. I'd rather not shrink the font size, because that would make a complicated expression even harder to understand. – Evan Aad Jun 6 '18 at 7:24
• Thanks for the update. However, I believe the split environment suffers from the same disadvantage as the multline environment in that it's tricky (impossible?) to label the different lines separately. – Evan Aad Jun 6 '18 at 7:40
• You can try nesting a subequations*in an equation environment. I think that way you can still have labels but the subequation numbers won't show. This is compatible with split in case of very very long equation. – Rémi Nazin Jun 6 '18 at 7:46
• +1 Never used subequations before. – Dr. Manuel Kuehner Jun 6 '18 at 12:21