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?

1 Answer 1


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:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.