# How can I use an align environment flush right?

Is there an option analogous within the align environment to the left align for right align, i.e. fralign.

MWE:

 \documentclass{article}
%\usepackage[fleqn]{mathtools} Something that will also work for mathtools as well.

\begin{document}

\begin{align*} % Would be fralign* instead.
\sin 2x &= 2sin x\cos x \\
\cos 2x &= \cos^2 x-\sin^2 x &
\end{align*}

\end{document}

• "fl" in fleqn is "fixed length", while in flalign is "full line". Would you better explain your needs? – egreg Oct 20 '11 at 8:07
• @egeg: Werner fulfilled what the question asked. Thanks – night owl Oct 20 '11 at 9:40

Without specifying a package option to amsmath, you can use the flalign[*] environment and add some (unused) alignment characters & to typeset the equation flush right:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\lipsum[1] \setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}
\begin{flalign*}
&&\sin 2x &= 2\sin x\cos x \\
&&\cos 2x &= \cos^2 x-\sin^2 x
\end{flalign*}
\lipsum[2]
\end{document}


The adjustment to the lengths \abovedisplayskip and \abovedisplayshortskip (both set to 0pt) was merely to reduce the gap above the flushed equation. This may not be necessary in the document in general.

• i'm not sure that flalign* is necessary; align* might be sufficient. (but i'm not able to check from my present location.) – barbara beeton Oct 20 '11 at 11:08
• +1..So double & characters are needed to flush right instead of one &. – night owl Oct 24 '11 at 1:24
• @barbara: You are correct, once fleqn has been set as an option to either amsmath or mathtools in the preamble, then the align environments will automatically be pushed left. For clarification. – night owl Oct 27 '11 at 7:24