I have a problem with multline
inside gather
.
I already found this old question (multline inside gather?) on the topic, but the answer I got does not really satisfy me.
The problem of using multlined
inside gather
is that it is not possible to get the nice effect that we get from multline
, namely that the second line is shifted toward the right side of the page (at least that's what happens to me).
\documentclass{article}
\usepackage{mathtools}
\usepackage{amsmath}
\makeatletter
\newcommand{\mathleft}{\@fleqntrue\@mathmargin0pt}
\newcommand{\mathcenter}{\@fleqnfalse}
\makeatother
\begin{document}
%%% Multline
\begin{multline*}
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\end{multline*}
%
\vspace{-1cm}
%
\begin{multline*}
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \\%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \\%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\end{multline*}
%%% Gather + Multlined
\begin{gather*}
\begin{multlined}
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \\
%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\end{multlined}
\end{gather*}
%%% Gather + Multlined + mathleft
\mathleft
\begin{gather*}
\begin{multlined}
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \\
%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\%
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\end{multlined}
\end{gather*}
\end{document}
From this piece of code it can indeed be noticed that in the first case, when there is multline
, we obtain this nice effect (the second line is aligned to the left, and in the case of a three line objects, it is centered, with the third left-aligned). On the contrary, this is not the case with gather
plus multlined
, even when we add \mathleft
.
- Is there a way to obtain this effect with
multlined
insidegather
? - If not, how can I reduce the space between the two
multline
I am writing down?
Any feedback is most welcome.
Thank you for your time.
mathleft
. Still, the question stands.\MoveEqLeft
frommathtools
is very handy.