Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

MWE:

 \documentclass{article}
 \usepackage[fleqn]{amsmath} % Instead have [freqn].
 %\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}
share|improve this question
1  
"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
add comment

1 Answer

up vote 7 down vote accepted

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

\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.

share|improve this answer
1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.