Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

\hfill in the \align environment

1,229 views
Skip to first unread message

davea...@googlemail.com

unread,
May 31, 2006, 4:54:25 AM5/31/06
to
This is a little bit complicated...

I have a set of equations which I have laid out in an \align
environment. One line of the equation is too long and so I need to
split it over two lines. What I would like to do is to set the second
part of this long line to be flushed right. (I suppose I want latex to
do what \multline would do, but within \align.) I have tried

\begin{align}
A &= B \\
&= \text{the first part of the long line} \\
& \hfill \text{the second part of the long line} \\
& = C
\end{align}

but this doesn't work: the \hfill creates no space at all.

Any ideas what I can do?

Many thanks.

Dave
8o)

mariano.su...@gmail.com

unread,
May 31, 2006, 12:15:33 PM5/31/06
to

I usually handle that using the multlined environment from the
mathtools package.
(Each time, I wish there was a way to tell the environment to take up
_all_ the avaiable width...)

-- m

Ulrich M. Schwarz

unread,
May 31, 2006, 12:33:33 PM5/31/06
to
"davea...@googlemail.com" <davea...@googlemail.com> writes:

> This is a little bit complicated...
>
> I have a set of equations which I have laid out in an \align
> environment. One line of the equation is too long and so I need to
> split it over two lines. What I would like to do is to set the second
> part of this long line to be flushed right. (I suppose I want latex to
> do what \multline would do, but within \align.)

Then try the environment that does what multline does, just inside an
align (or any other equationesque environment) :)

\documentclass{article}
\usepackage{amsmath, mathtools}
\begin{document}


\begin{align}
A &= B \\
&=

\begin{multlined}[t]%[8cm]


\text{the first part of the long line} \\

\text{the second part of the long line}

\end{multlined}


\\
& = C
\end{align}

\end{document}

HTH
Ulrich
--
http://talcum.sarovar.org/ (Current release: 0.5.138 20050911)

AreThoseMyFeet?

unread,
Jun 1, 2006, 2:21:40 AM6/1/06
to
Ulrich

> Then try the environment that does what multline does, just inside an
> align (or any other equationesque environment) :)

Thanks very much for this, I appreciate it.

Dave
8o)

0 new messages