3

I am experiencing the following problem. I have multiple equations that need to be aligned and numbered, but some of them are too long to fit into one line.

Here is my small example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\huge Here are my equations:
\begin{align}
 A & = B should be numbered \\
 A & = C another very long equation which must be split at a resaonable place, but still numbered
\end{align}
\end{document}

enter image description here

  • 1
    Isn't this something for the multiline or split environments? – user31729 Aug 11 '16 at 17:37
  • probably... It would be nice to get a definite answer that others could use. I am not sure how to use the "&". To which one does it refer: inner or outer environment? Is this similar to nested tables? – Yossi Gil Aug 11 '16 at 17:46
  • I am pretty sure there are answers on this already here ... but I am too lazy to look after them ;-) – user31729 Aug 11 '16 at 17:47
  • Sam here. Except, that my google search did not yield anything. I can write an answer, or let someone else try.. – Yossi Gil Aug 11 '16 at 17:49
4

Here are 3 possibilities, hopefully illustrative. I suppose there are two groups of alignment, and the second group has long equations:

\documentclass[11pt]{article}
\usepackage{mathtools}

\begin{document}

Here are my equations:

\begin{align}
  \shortintertext{with \texttt{aligned}: }
  A & = B & \text{should be } & \text{ numbered }\\
  A & = C & \text{another very long } & \!\begin{aligned}[t] & \text{ equation which must be split} \\
  & \text{ at a reasonable place,}\\
  & \text{ but still numbered} \end{aligned}
\end{align}

\begin{align}
  \shortintertext{with \texttt{aligned} again: }
  A & = B & \text{should be } & \text{ numbered }\\
  A & = C & \text{another very long } & \!\begin{aligned}[t]  \text{ equation which must be split} &   \\
  \text{ at a reasonable place,} & \\
  \text{ but still numbered} &  \end{aligned}
\end{align}

\begin{align}
  \shortintertext{A variant with \texttt{multlined}: }
  A & = B & \text{should be }        & \text{ numbered }                                            \\
  A & = C & \text{another very long } & \!\begin{multlined}[t]  \text{ equation which must be split} \\
  \text{ at a reasonable place,}\\[-0.8ex]
  \text{ but still numbered}
  \end{multlined}
\end{align}

\end{document}

enter image description here

| improve this answer | |
6

As are suggested in @Christian Hupfer comments above

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\huge Here with multlined:
\begin{align}
 A & = B should be numbered \\
 A & = \begin{multlined}[t][0.7\textwidth]
        C + another + very +\\ 
        long + equation + which + \\
        must + bev split + at + \\
        a + resaonable + place, +  \\
        but + still + numbered
        \end{multlined}
\end{align}
or with split
\begin{align}
 A = \; & B should be numbered \\
\begin{split}
 A =\; & C + another + very +\\
   &    long + equation + which + \\
   &    must + bev split + at + \\
   &    a + resaonable + place, +  \\
   &    but + still + numbered
        \end{split}
\end{align}
\end{document}

enter image description here

| improve this answer | |
  • Ah, I mispelled the name: multlined is the correct name ;-) (+1) – user31729 Aug 11 '16 at 18:06
  • @ChristianHupfer, I always struggle with its correct spelling too :-) – Zarko Aug 11 '16 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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