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.

I'm not entirely sure how much this depends on how much I've formatted on my document. I have two equations

\begin{equation*}
\vec{n}_w \times [\vec{E} + \vec{v} \times \vec{B}] = \vec{n}_w \times \vec{E}_t + \vec{n}_w \times(\vec{v} \times \vec{B}) = (\vec{n}_w \cdot \vec{B})\vec{v} - (\vec{n}_{w} \cdot \vec{v})\vec{B} = (\vec{n}_w \cdot \vec{B})\vec{v} = 0
\end{equation*}
\begin{equation}
\vec{n}_w \cdot \vec{B} = 0 \\[1ex]
\end{equation}

If anyone runs this, they might notice there are two lines between the equations, whereas I only want one. How do I fix this?

share|improve this question
    
I'll just comment that the ending of the first equation and starting of the new one means there is two blank lines between them. Is there anyway to combine them in to a single equation that gives exactly what I want? I.e. two split, centred equations with the equation numbering to the right of the second line? –  user51041 May 3 at 20:56
    
Welcome to the site! don't use back-to-back equation environments, and use something from amsmath or mathtools, e.g align or align*. If you want one of them numbered, and one not, then use \nonumber. Welcome! –  cmhughes May 3 at 20:59
    
since you're using equation*, that means you're using amsmath. the best way to avoid excess space between consecutive equations is to use one of the multi-line structures provided by amsmath; i suggest gather, and put \notag on the first line to suppress the equation number. (see the user's guide, texdoc amsmath, for details.) –  barbara beeton May 3 at 21:01
    
Thanks, I'm using \begin{gathered} and whatnot now. The only problem I'm finding is that the equation number isn't directly to the right of the lowest line, it's to the right but one line under. Why is this? –  user51041 May 3 at 21:10
1  
gather and gathered are different beasts. gathered by definition says that all the lines in this display are related and should get only one number; if it's lower than the last line, it means that some line in the group is so wide that there's not space for the equation number on the group as a whole. using gather, each line should be considered individually. to provide a more precise answer, a minimum (non)working example is needed, starting with \documentclass and ending with end{document}. –  barbara beeton May 3 at 21:25

2 Answers 2

If you want to keep the entire first equation on a single line (and not assign it a number), you could employ the gather environment of the amsmath package as follows:

enter image description here

That said, I would recommend you insert line breaks in the first (unnumbered) equation to make it easier for your readers to take in what's going on.

\documentclass{article}
\usepackage[margin=1in]{geometry} % choose margins appropriately
\usepackage{amsmath}
\begin{document}
\begin{gather}
\vec{n}_w \times [\vec{E} + \vec{v} \times \vec{B}] = \vec{n}_w \times \vec{E}_t + \vec{n}_w \times(\vec{v} \times \vec{B}) = (\vec{n}_w \cdot \vec{B})\vec{v} - (\vec{n}_{w} \cdot \vec{v})\vec{B} = (\vec{n}_w \cdot \vec{B})\vec{v} = 0\notag\\
\vec{n}_w \cdot \vec{B} = 0
\end{gather}
\end{document}
share|improve this answer
1  
i don't think you mean gather* (you didn't use the star in your example). –  barbara beeton May 4 at 1:05
    
@barbarabeeton - thanks! Good catch. –  Mico May 4 at 5:57

use

\begin{align}
\vec{n}_w \times [\vec{E} + \vec{v} \times \vec{B}] &= \vec{n}_w \times \vec{E}_t + \vec{n}_w \times(\vec{v} \times \vec{B}) \nonumber\\
  &= (\vec{n}_w \cdot \vec{B})\vec{v} - (\vec{n}_{w} \cdot \vec{v})\vec{B} = (\vec{n}_w \cdot \vec{B})\vec{v} = 0
\nonumber\\
\vec{n}_w \cdot \vec{B} &= 0
\end{align}
share|improve this answer

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.