[Tex/LaTex] How to get rid of indentation after an equation

equationsindentation

I'm a total newbie to LaTeX and I get very annoyed about this. Every time I write an equation, the text following the equation has some indentation but I don't want it to be there!

Look at the following formula

\begin{equation}
K_BT_k=Dexp\left\lbrace -\frac{1}{2N(E_F)|J|}\right\rbrace
\end{equation}

where $Dexp$ is a ...

The line starting with "where …" is indented and looks horrible. Some people told me about \noindent but do I really have to write this command after every single equation?

Best Answer

Remove the blank lines, either by actually removing them or adding '%'s:

Look at the following formula
%
\begin{equation}
K_BT_k=Dexp\left\lbrace -\frac{1}{2N(E_F)|J|}\right\rbrace
\end{equation}
%
where $Dexp$ is a long sentence guaranteed to take us over the
end of this line and well into the next.

Simple, but subtle!

Explanation: (added in edit)

The indentation is created by the fact that, as far as TeX is concerned, the word 'where' begins a new paragraph and you've decided that new paragraphs should be indented (or rather, you haven't decided that new paragraphs shouldn't be indented). TeX detects this by the presence of the blank line (well, actually by the double newline, but what it considers a double newline is a little complicated so "blank line" is best for now). So to tell TeX that there isn't a new paragraph there, I simply remove the blank line. As I like to keep my source code with lots of visual spaces between things, I do this by putting the comment marker '%' on the blank line. Deleting it (as in Caramdir's answer) would be equivalent as far as TeX is concerned. In fact (as Caramdir pointed out in his answer), both the blank line before and after should be removed. As originally written, there are three paragraphs where there should (according to the wording) be just one. Although the fact that the equation starts a new paragraph is less obvious, it still can have an effect.

Note that although it may have almost the same effect, using the \noindent command here would be wrong. Using \noindent says "This is a new paragraph, but I don't want it indented." whereas putting in the % says "This isn't a new paragraph.".