6

I am trying to align the equations, but the alignment has done something wrong to the spacing. The equation in the first line has moved to the right.

\documentclass[12pt,letterpaper]{article}\usepackage[a4paper,left=20mm,top=25mm,right=20mm,bottom=25mm]{geometry}\usepackage[utf8]{inputenc}\usepackage{amsmath}\begin{document}Asymptotic equation of Motion\begin{align*}\mathcal{L}_n (\nabla_{\mu} n_{\nu}) &=& n^{\alpha} \nabla_{\alpha} ( \nabla_{\mu} n_{\nu}) + \nabla_{\alpha} n_{\nu} \nabla_{\mu} n^{\alpha} + \nabla_{\mu} n_{\alpha} \nabla_{\nu} n^{\alpha} \\&=& n^{\alpha} \nabla_{\alpha} ( \nabla_{\mu} n_{\nu}) - n^{\alpha} \nabla_{\mu} ( \nabla_{\alpha} n_{\nu}) + n^{\alpha} \nabla_{\mu} ( \nabla_{\alpha} n_{\nu}) + \nabla_{\alpha} n_{\nu} \nabla_{\mu} n^{\alpha} + \nabla_{\mu} n_{\alpha} \nabla_{\nu} n^{\alpha} \end{align*}\end{document}

These gives the following resultenter image description here

How do I make it appropriate? Also I want to label the second equation as number 1 but not the first line. How to do that?

askedJul 20, 2018 at 6:58
Khushal's user avatar

2 Answers2

5

Inalign you use&=, not&=& like ineqnarray. For the numbering, changealign* toalign and add\nonumber to the end of the first line.

enter image description here

\documentclass[12pt,letterpaper]{article}\usepackage[a4paper,left=20mm,top=25mm,right=20mm,bottom=25mm]{geometry}\usepackage[utf8]{inputenc}\usepackage{amsmath}\begin{document}Asymptotic equation of Motion\begin{align}\mathcal{L}_n (\nabla_{\mu} n_{\nu}) &= n^{\alpha} \nabla_{\alpha} ( \nabla_{\mu} n_{\nu}) + \nabla_{\alpha} n_{\nu} \nabla_{\mu} n^{\alpha} + \nabla_{\mu} n_{\alpha} \nabla_{\nu} n^{\alpha} \nonumber \\ % <----  add \nonumber here&= n^{\alpha} \nabla_{\alpha} ( \nabla_{\mu} n_{\nu}) - n^{\alpha} \nabla_{\mu} ( \nabla_{\alpha} n_{\nu}) + n^{\alpha} \nabla_{\mu} ( \nabla_{\alpha} n_{\nu}) + \nabla_{\alpha} n_{\nu} \nabla_{\mu} n^{\alpha} + \nabla_{\mu} n_{\alpha} \nabla_{\nu} n^{\alpha} \end{align}\end{document}
answeredJul 20, 2018 at 7:05
Torbjørn T.'s user avatar
1
5

For a single equation, the choice should besplit insideequation:

\documentclass[12pt]{article}\usepackage[a4paper,left=20mm,top=25mm,right=20mm,bottom=25mm]{geometry}\usepackage[utf8]{inputenc}\usepackage{amsmath}\begin{document}Asymptotic equation of Motion\begin{equation}\begin{split}\mathcal{L}_n (\nabla_{\mu} n_{\nu}) &= n^{\alpha} \nabla_{\alpha} ( \nabla_{\mu} n_{\nu})    + \nabla_{\alpha} n_{\nu} \nabla_{\mu} n^{\alpha}      + \nabla_{\mu} n_{\alpha} \nabla_{\nu} n^{\alpha}\\&= n^{\alpha} \nabla_{\alpha} ( \nabla_{\mu} n_{\nu})    - n^{\alpha} \nabla_{\mu} ( \nabla_{\alpha} n_{\nu})    + n^{\alpha} \nabla_{\mu} ( \nabla_{\alpha} n_{\nu})    + \nabla_{\alpha} n_{\nu} \nabla_{\mu} n^{\alpha}     + \nabla_{\mu} n_{\alpha} \nabla_{\nu} n^{\alpha}\end{split}\end{equation}\end{document}

enter image description here

If you prefer the number to be at the bottom, this should be a global decision, that can be accomplished by callingamsmath with thetbtags option:

\usepackage[tbtags]{amsmath}

With this single change, the output would become

enter image description here

Note thatamsmath alignment environments use&= (not&=&). I removed theletterpaper option, that does nothing and might be a bit unclear.

answeredJul 20, 2018 at 10:32
egreg's user avatar

You mustlog in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.