[Tex/LaTex] How to use an align environment flush right

alignamsmathhorizontal alignmentmath-mode

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


 \usepackage[fleqn]{amsmath} % Instead have [freqn].
 %\usepackage[fleqn]{mathtools} Something that will also work for mathtools as well.


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


Best Answer

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:

enter image description here

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

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.