0

I am trying to write an integral over quite a few factors. Everything put together will easily exceed one line, maybe even two. If I try to align everything with some align environment (be it align, alignat, split, multiline, anything), I will always be faced with a big gap between my first and second line because the vbox of the integral is much bigger than the box of a standard line. Is there a way to reduce the size of my integral box so that I can have the entire integrand closer together?

\documentclass[12pt]{article}
\usepackage[intlimits]{amsmath}
\begin{document}
\begin{align}
   \notag I(\mu)&=\int_\Omega \text{long equation here}\\
   \notag&\hphantom{=\int_{\Omega}}+\text{even more long equation here}\\
   &\hphantom{=\int_{\Omega}}+\text{even even more long equation here}\,\mathrm{d}\mu
\end{align}
\end{document}

enter image description here

8
  • 2
    Please provide a minimal working example (MWE) to demonstrate the issue. But you could play around with \smash.
    – Gaussler
    Sep 2, 2023 at 14:51
  • 2
    No, it is not an MWE but just a code fragment. Please ad to it used document class as well packages which are needed for compile it.
    – Zarko
    Sep 2, 2023 at 15:08
  • 1
    \smash{\int_\Omega} will remove the height of the integral box. However, you then have to be concerned about potential overlap with the 2nd line. Sep 2, 2023 at 15:12
  • 1
    I would assume this covers what is required to run the code, but I don't actually know which exact packages are required for this MWE. If this is still incomplete, I am very much sorry.
    – Sellerie
    Sep 2, 2023 at 15:20
  • 1
    of course you should always know, as you should test the example before posting. Here for example your main issue is the intlimits option which you had not mentioned until just now. Sep 2, 2023 at 15:23

1 Answer 1

5

You don't have a multi-line equation, but a single line equation with a multi-line integrand, so I would use equation not align

enter image description here

\documentclass{article}

\usepackage[intlimits]{amsmath}

\begin{document}

\begin{equation}
   I(\mu)=\int_\Omega
   \;\begin{aligned}
  &\text{long equation here} +\\
  &\text{even more long equation here}\\
  &\text{even even more long equation here}
   \end{aligned}
\,\mathrm{d}\mu
\end{equation}

\end{document}
6
  • The problem, that arose from this option, was the fact, that I was actually writing even more lines to that equation (with several more "=" signs), such that the align environment complained about too many alignment tabs. I tried to simplify my question as much as possible and might have simplified it too much then.
    – Sellerie
    Sep 2, 2023 at 15:31
  • 1
    no you can have an align with a 100 rows, you would not have that error. @Sellerie Sep 2, 2023 at 15:34
  • Is there a substantial difference between the split envorinment and the aligned environment that could explain, why none of this worked with split while it does work with aligned?
    – Sellerie
    Sep 2, 2023 at 15:43
  • 1
    if in doubt use aligned. normally they produce the same but split is vastly more complicated and can merge with an outer align @Sellerie Sep 2, 2023 at 15:49
  • 1
    I would probably use\left(...\right) around the aligned, then it is all perfectly normal @Sellerie Sep 2, 2023 at 16:08

You must log in to answer this question.

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