GeneralHow to prevent indention after equations or floats?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Andy22
Posts: 16
Joined: Wed Jul 25, 2007 10:11 am

How to prevent indention after equations or floats?

Post by Andy22 »

Is there an easy way to suppress the indention of the text right after an equation- or float environment (but only there)?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

How to prevent indention after equations or floats?

Post by localghost »

Andy22 wrote: Is there an easy way to suppress the indention of the text right after an equation- or float environment (but only there)?

Just insert the \noindent command right before the beginning of the text.

Code: Select all

\begin{equation}\label{eqn:equation}
  E=mc^2
\end{equation}

\noindent
And here the text continues …
The same works with figures and tables. This is only a local switch. If you want a global switch off for the indentation, just use a declaration in the preamble.

Code: Select all

\setlength{\parindent}{0pt}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Andy22
Posts: 16
Joined: Wed Jul 25, 2007 10:11 am

Re: How to prevent indention after equations or floats?

Post by Andy22 »

Thanks.
But I'm looking for a way to prevent the indention globally but only after equations and floats.

At this time I use the "search and replace" feature of the editor to search for "\end{equation}" and replace it with "\end{equation} \noindent".
But this only works in a satisfactory way on the final version of a document.
laurenmalone
Posts: 4
Joined: Tue Aug 28, 2007 4:11 pm

Re: How to prevent indention after equations or floats?

Post by laurenmalone »

YES...make sure you leave no vertical space in between the equation and the next line of text.

\end{equation}
text follows here

instead of

\end{equation}

text follows here.

You will still get vertical space in between math and text in the compiled document, but no indentation of the following line.
Andy22
Posts: 16
Joined: Wed Jul 25, 2007 10:11 am

Re: How to prevent indention after equations or floats?

Post by Andy22 »

Thanks a lot. This works fine. Some solutions are so easy and obvious...
mzi
Posts: 3
Joined: Tue Jul 07, 2009 12:00 pm

Re: How to prevent indention after equations or floats?

Post by mzi »

Hello,

I have a similar question, except I want indention to be prevented even if the float is not located within the text ([!h] or [H] option), but its position is left to latex.

Any idea?
Post Reply