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'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}
share|improve this question

1 Answer 1

up vote 6 down vote accepted
\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}
share|improve this answer
    
...even the basic principles are unknown to me. Thanks! I will accept as soon as possible. –  thewaywewalk Aug 11 at 16:18
2  
@thewaywewalk almost all tex assignments are local so any settings are lost at the next } or \end{zzz} –  David Carlisle Aug 11 at 16:40
    
thanks, good to know! –  thewaywewalk Aug 11 at 17:10

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.