# Help with aligning equations and numbering

I'm new to LaTeX so you're going to have to bear with me. I am trying to write a project report using it and I have got this so far for a certain section:

Then,

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb}
% In case you are wondering what these packages are for:
% amsmath provides extra mathematical constructs and symbols
% graphicx facilitates the inclusion of graphics files
% hyperref makes links into clickable hyperlinks
% parskip leaves more space between paragraphs
\usepackage[cm]{fullpage}
% The above package makes the page margins smaller. I included it
% to save you printing costs.
% Feel free to also print two-sheets per page and double-sided

%==================
%.....
%==================

$$\label{eq:six} x = Vtsin(K),$$
and
\begin{align*}
X
&= x-(l+h)sin(\phi), \\
&= Vt\sin(K)-(l+h)sin[K-2\tan ^{ - 1}\{\tan(K/2).exp((-Vt)/l)\}],
\end{align*}


This is what it says at the top:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb}


And I would like to get all three lines of equations in line- so the x and X equations- and the first and third lines have numbers assigned to them. All my other equations have $$...$$ around them and those ones have been given reference numbers- like the x equation but I wanted to have these two in line so I used the align formula instead of the equation one and then tried both together but it didn't work. (Also, the labelling isn't working but that's another issue!)

Any help would be greatly appreciated!

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
– user31729
May 8, 2014 at 18:46
• And: Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
– user31729
May 8, 2014 at 18:46
• Your question about equation numbering may be answered by this question May 8, 2014 at 18:50
• @Ella it would be better if you put that comment into the question. You can edit your question with the link just to the left of your name and above the comments May 8, 2014 at 18:51
• @darthbith thanks, that's helped the numbering situation I think
– Ella
May 8, 2014 at 18:59

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb}
% In case you are wondering what these packages are for:
% amsmath provides extra mathematical constructs and symbols
% graphicx facilitates the inclusion of graphics files
% hyperref makes links into clickable hyperlinks
% parskip leaves more space between paragraphs
\usepackage[cm]{fullpage}
% The above package makes the page margins smaller. I included it
% to save you printing costs.
% Feel free to also print two-sheets per page and double-sided

%==================
%.....
%==================
\begin{document}

{%
\setlength{\belowdisplayskip}{0pt}%
\setlength{\abovedisplayskip}{0pt}%
\begin{align}\label{eq:six}
x & = Vtsin(K)  \\
\intertext{and}  \notag
X &= x-(l+h)sin(\phi), \notag \\
&= Vt\sin(K)-(l+h)sin[K-2\tan ^{ - 1}\{\tan(K/2).exp((-Vt)/l)\}],
\end{align}
}

\end{document}


The \intertext introduces a lot of space around the and line, unless you put that tweak in with the setlength commands, which I found out about here

I think this gives the alignment and numbering you were after?

• @ella in case you didn't see, I just reduced the space around the intertext bit (I don't like it as big as the default, personally, though it probably looks way worse out of context). Right, back to the thesis... May 8, 2014 at 19:23

The mathtools package provides for \shortintertext; moreover one can use split in order to number together the second equation. A small adjustment is needed in this case (some small vertical space after the intertext).

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,mathtools}

\usepackage{lipsum} % just for the example

\begin{document}

\lipsum*[3]
\begin{align}
x & = Vt\sin K \label{eq:six} \\
\shortintertext{and\vspace{\jot}}
\begin{split}
X &= x-(l+h)\sin\phi, \\
&= Vt\sin K-(l+h)\sin\bigl(K-2\arctan(\tan(K/2)\exp(-Vt/l)\bigr),
\end{split}
\end{align}
\lipsum[4]

\end{document}


Sorry, but I can't stand \tan^{-1} for the arctangent; also, parentheses should be round as much as possible. Also \sin(K) is redundant and \sin K is more than sufficient (and traditional); the period should never be used to denote multiplication: either nothing or a centered dot \cdot. Of course these are just my opinions.