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

This is a follow-up to this question.

Here is an exemple of the code I wrote to add a light gray background to important equations:


% \usepackage[frenchb]{babel}

% Coloured background


He said : ` you must defeat Sheng Long to stand a chance' which more or less amounted to
      \frac{\partial \langle \alpha K \rangle}{\partial t} + \frac{\partial \lambda}{\partial z} =0


Quite strangely, it produces a wrong spacing before the equation, as displayed on the following picture:

Spacing problem

Removing either the fleqn option of amsmath of the loading of babel with the frenchb option solves the problem :

Good spacing

I would expect frencb to cause such issue with something regarding paragraph indentation but why does it interact with fleqn?

Do you have any idea to prevent this additional space from appearing while keeping these two options?

share|improve this question
up vote 6 down vote accepted

This shows a problem which is not related to mdframed, but appears with the french module in babel whenever you start a math environment in vertical mode together with the fleqn option; the space would be added also with the input

He said : `you must defeat Sheng Long to stand a chance' which more or less amounted to

      \frac{\partial \langle \alpha K \rangle}{\partial t} + \frac{\partial \lambda}{\partial z} =0

(notice the blank line)

A paragraph is started anyway, so a "solution" (which is more of a hack) is to backup manually:


You don't need the \noindent anyway; better, though, adding a \par.

However, I'd suggest to use the standard spacing used for math displays:

share|improve this answer
Thanks. Good to know – Marco Daniel Sep 17 '12 at 6:30

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.