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.

How to make the first line of aligned equations sit in the same baseline as the bullet and make the equation left justified?

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{itemize}
    \item $3!=3\times2\times1=6$
    \item $\tfrac{5!}{3!}=\tfrac{5\times4\times3!}{3!}=5\times4=20$
    \item \begin{align*}
                    \frac{n!}{(n-2)!}   &=\frac{n\times(n-1)\times(n-2)!}{(n-2)!}\\
                                                        &=n\times(n-1)\\
                                                        &=n^2-n
                \end{align*}
\end{itemize}
\end{document}
share|improve this question

1 Answer 1

up vote 10 down vote accepted

the aligned environment works just fine, with the [t] option to get the bullet on the first line:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{itemize}
    \item $3!=3\times2\times1=6$
    \item $\tfrac{5!}{3!}=\tfrac{5\times4\times3!}{3!}=5\times4=20$    
    \item $\!\begin{aligned}[t]
                    \frac{n!}{(n-2)!}   &=\frac{n\times(n-1)\times(n-2)!}{(n-2)!}\                                                            &=n\times(n-1)\                                                            &=n^2-n
                \end{aligned}$
\end{itemize}

\end{document}

output of example code

edit: added a negative thin space \! just before the aligned block to counteract the thin space \, built into the beginning of aligned. for some background, see the question Why is there a \, space at the beginning of the “aligned” environment?.

share|improve this answer
    
I think you need to insert \! between $ and \begin{aligned} to remove the unnecessary white space. –  In PSTricks we trust Apr 14 '13 at 17:47
    
@Ohmyghost: Thanks for the good question. I just had a minor related question. Suppose in addition to what you desire in the problem, one also would like to make sure the equal signs appearing first in each bullet point are vertically aligned, how can we go about this please? (in other words inter-bullet alignment, so to speak) –  Abhimanyu Arora Sep 21 at 13:59
    
@AbhimanyuArora: I don't understand. Sorry. Please show me the sample by your handwriting. –  In PSTricks we trust Sep 21 at 14:07
1  
@AbhimanyuArora -- you could use \widthof on the pre-equal-sign parts of the first two as described in this answer. you'd have to flush those parts to the right in the box with \hfil, otherwise they'd be centered in the box. –  barbara beeton Sep 21 at 14:31
    
That's elegant, barbara!. @Ohmyghost, just the vertical alignment of = signs of equations in two different bullet points above. Thanks both. –  Abhimanyu Arora Sep 21 at 15:35

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.