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.

In the following code, how do I align the n's?

Here is the MWE:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
n \propto exp(-U/kT) \notag \\
\Rightarrow \quad n  = A.exp(-U/kT) \notag
\end{align}
\end{document}

share|improve this question

2 Answers 2

up vote 8 down vote accepted

Something like this. Put & right after n's.

Update: commented by barbara beeton. Thanks.

enter image description here

Code

\documentclass[12pt]{article}
\usepackage[paper size={10cm,3cm}]{geometry}
\usepackage{amsmath}
\begin{document}
\begin{align}
n& \propto \exp(-U/kT) \notag \\
\Rightarrow \quad n&  = A \exp(-U/kT) \notag  
\end{align}
\end{document}
share|improve this answer
    
I would change \Rightarrow to \implies. –  Manuel Jul 19 at 10:27
    
@Manuel -- Thanks for the suggestion, mcuh appreciated. A link tex.stackexchange.com/q/47063/34618 for the OP to make his/her decision. –  Jesse Jul 19 at 10:51
1  
the exp should really be roman. \exp is already provided by amsmath as an operator name, which should do the right thing. –  barbara beeton Jul 19 at 13:24
    
@barbarabeeton -- Much appreciated. Corrected accordingly. –  Jesse Jul 19 at 13:28
\documentclass[preview,border=12pt,12pt]{standalone} % please change it back to your article class below
%\documentclass[12pt]{article}
\usepackage{amsmath}


\begin{document}
\abovedisplayskip=0pt\relax% don't use this line in your production
\begin{align*}
n                   & \propto \exp(-U/kT)  \\
\Rightarrow \quad n &= A \exp(-U/kT)   
\end{align*}
\end{document}

enter image description here

share|improve this answer
1  
What is the difference between this and Jesse's answer? –  Manuel Jul 19 at 10:27
    
@Manuel This answer makes the alignment at the proportional and equals signs, rather than at the ns, which is standard practice: if the relations didn't have the same RHSs, the difference would be more noticeable. –  ChrisS Jul 19 at 10:48
    
@Manuel: \exp and exp is one of the differences. –  Who is crazy first Jul 19 at 10:56
    
@ChrisS And so does Jesse's. Pleasedon'ttouch true, I missed that one ;) –  Manuel Jul 19 at 10:56

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.