Math & ScienceUnwanted Variations in Equation Alignment

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
abikutn
Posts: 18
Joined: Sat May 12, 2012 8:44 pm

Unwanted Variations in Equation Alignment

Post by abikutn »

I don't understand why the variation in the alignment of the math output happens.

Code: Select all

\documentclass[11pt]{article}
\usepackage{color}
\usepackage{amsmath}
\usepackage[square, comma, sort&compress]{natbib}
\author{abhi} 
\title{Simple Document}
\label{Simple document to show different reference typesets}

\begin{document}

 \section{This is how a Referencing section and Math formula should be done!}
 
And below is some math typesetting of \LaTeX

\begin{align}
	 E &= mc^2                              \\
    m &= \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
\end{align}

And below is some math typesetting of \LaTeX with the help of mathematica
\begin{align}
	E=\frac {1}{\sqrt{{{v}^{{2}}}}}\\
	E=\frac {1}{\sqrt{{{v}^{{2}}}}}\\
	n_{\text{ave}}\text{  }=\text{  }i_{\text{dark}} \text{$\Delta $t}/e
\end{align}
And below is some math typesetting of \LaTeX with the help of mathematica
\begin{align}
E &= mc^2\\
n_{\text{ave}}\text{  }=\text{  }i_{\text{dark}} \text{$\Delta $t}/e\\
   P[n] \approx  \frac{1}{\sqrt{2\pi } \sigma }e^{\left.-\left(n-n_{\text{ave}}\right){}^2\right/2 \sigma ^{2\text{   }}}\\   
   \sigma _i{}^2 =\frac{n_{\text{ave}} e^2}{\text{$\Delta $t}^2}=\text{  }i_{\text{signal}} \frac{e}{\text{$\Delta $t}} =i_{\text{signal}} e 2B\\
   N_p[t]=\frac{P[t]-P_0}{P_0}= \frac{S[t]^r-S_0{}^r}{S_0{}^r}\approx \frac{\left(S[t]-S_0\right)r S_0{}^{r-1}}{S_0{}^r}\approx  r n[t]
\end{align}

And below is some math typesetting of \LaTeX with the help of mathematica
\begin{align}
	E=\frac {1}{\sqrt{{{v}^{{2}}}}}\\
	E=\frac {1}{\sqrt{{{v}^{{2}}}}}\\
	n_{\text{ave}}\text{  }=\text{  }i_{\text{dark}} \text{$\Delta $t}/e\\
	\sigma _i{}^2 =\frac{n_{\text{ave}} e^2}{\text{$\Delta $t}^2}=\text{  }i_{\text{signal}} \frac{e}{\text{$\Delta $t}} =i_{\text{signal}} e 2B
\end{align}

\end{document}
The following attachment is the output after compiling the above code.

Can anyone clarify this on their system. I want to make sure its not my editor bug.

Best,
Abhi
Attachments
oly mathformulaes.pdf
(94.18 KiB) Downloaded 272 times
oly mathformulaes.tex
(1.72 KiB) Downloaded 151 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Unwanted Variations in Equation Alignment

Post by localghost »

You should always work with the correct placement of the alignment character (»&«) as you do in the first align environment. Sometimes this environment is not enough and you better use the alignat environment.

And as an act of politeness please give some feedback on proposed solutions. The majority of the replies to your former questions yet hasn't got any reaction from your side.


Further reading:

Thorsten
Post Reply