TransWikia.com

How to achieve no indentation for a single equation?

TeX - LaTeX Asked by Robert Seifert on August 3, 2021

I’d like to have a single equation without indentation at all.
I know I can set it globally with

setlength{mathindent}{0cm}

But I don’t know how to return to the default value after the equation.

Here my minimal example:

documentclass[a4paper,12pt]{article}
usepackage[fleqn]{amsmath}
begin{document}

noindent
Default indentation: 
begin{equation}
  a+b=42
end{equation}
%
Now I want no indention for a single equation:
setlength{mathindent}{0cm}
begin{equation}
  a+b=42
end{equation}
%
Now I'd like to get the default again:
begin{equation}
  a+b=42
end{equation}
%
But how?

end{document}

One Answer

documentclass[a4paper,12pt]{article}
usepackage[fleqn]{amsmath}
begin{document}

noindent
Default indentation: 
begin{equation}
  a+b=42
end{equation}
%
Now I want no indention for a single equation:
{setlength{mathindent}{0cm}
begin{equation}
  a+b=42
end{equation}}%
%
Now I'd like to get the default again:
begin{equation}
  a+b=42
end{equation}
%
But how?

end{document}

enter image description here

Correct answer by David Carlisle on August 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP