TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using amsmath[fleqn] but I'd like to also indent equations outside equation/align/gather environments. A natural choice would be to indent using the same length amsmath uses, but I don't know how to do that. I've tried to use \mathindent (without defining its value) but it gives a "missing number" error. How should I do this? Thanks

share|improve this question
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Especially how do you produce these equations outside of align/gather environments? – Qrrbrbirlbel Apr 3 '13 at 4:06
Could you be a bit more specific about what you mean by wanting to "indent equations outside [of] equation/align/gather environments"? What kind of equations do you have in mind -- those encased by \[ and \] statements? Or, expressions given in "inline" math mode (delimited by $ signs, or \( and \) pairs)? Please edit/augment your posting to tell us a bit more about the material you want to indent. – Mico Apr 3 '13 at 5:47
Would \setlength{\mathindent}{<length>} do? – Herr K. Apr 3 '13 at 5:51

\mathindent holds a length, so to "use it", it would have to be done as \hspace{\mathindent}, say. Here's perhaps an example of what might be of interest:

enter image description here

\usepackage[fleqn]{amsmath}% http://ctan.org/pkg/amsmath
Some text before the equation.
  f(x) = ax^2 + bx + c
Some text after the equation.

\hspace*{\dimexpr\mathindent-\parindent}$f(x) = ax^2 + bx + c$

Some more text before an equation.
  f(x) = ax^2 + bx + c
Some more text after an equation.

Note that unnumbered equations are possible without the need for manual indentation. You could just use the starred version of align, say.

share|improve this answer

Your Answer


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.