Math & Science ⇒ Splitting formulae inside aligned equation
Splitting formulae inside aligned equation
suppose I'm writing a long calculation of the form
X= X1
= X2
= X3
etc
I use amslatex align environment to get all the = signs aligned.
so far, so good.
now, what if one of the r.h.s., say X2, is too long to fit on a line?
I'd like to be able to split it in such a way that the first half is aligned due to the equal sign, and the second half is *shoved to the right*. but despite the plethora of (semi-useless) commands in amslatex, there seems to be no way to position that second half properly. I end up using something like
&=X2a \\ &\hskip{5cm} X2b \\
where the actual hskip has to be adjusted for each equation. This is a very unsatisfactory solution. Anyone know a better one?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
-
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm
Re: Splitting formulae inside aligned equation
Re: Splitting formulae inside aligned equation
Re: Splitting formulae inside aligned equation
Splitting formulae inside aligned equation
Here's a possibility, but clearly not optimal:
Code: Select all
\newcommand\rightalign[1]{\noalign{\vbox{\hfill $\displaystyle #1$}}}
\begin{align*}
A&=B1
\\
&=B2a
\\
\rightalign{B2b}
&=B3
\end{align*}
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Splitting formulae inside aligned equation
Stefan