2

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}
7
  • @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, 2018 at 6:35
  • 2
    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, 2018 at 6:56
  • @egreg: I've added an example, as per your request.
    – Evan Aad
    Jun 6, 2018 at 7:05
  • @egreg: OK, I've inserted my actual code.
    – Evan Aad
    Jun 6, 2018 at 7:37

3 Answers 3

5

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 \\
&\qquad\geq_{\bN}\sup_{\bN}
  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}\\
&\qquad= \sup_{\bN}
  \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}\\
&\qquad\geq_{\bN} \sup_{\bN}
  \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}

enter image description here

1
  • 1
    ...or \MoveEqLeft from mathtools Jun 6, 2018 at 8:17
2

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} 

enter image description here

2

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{equation}
\begin{split}
e_1 = x +4 ... 5 +6 \\
= hello \\
... \\
\end{split}
\end{equation}

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

Edit 2 :

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

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

4
  • 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, 2018 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, 2018 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. Jun 6, 2018 at 7:46
  • +1 Never used subequations before. Jun 6, 2018 at 12:21

You must log in to answer this question.

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