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:
\documentclass{article}
\usepackage[fleqn]{amsmath}
% \usepackage[frenchb]{babel}
% Coloured background
\usepackage{xcolor}
\usepackage{mdframed}
\newmdenv[backgroundcolor=black!3!white,
linewidth=0pt,
innerleftmargin=0pt,
innerrightmargin=0pt,
innertopmargin=0.2\baselineskip,
innerbottommargin=0.2\baselineskip]{graybck}
\newcommand{\highlighteq}[1]{#1}
\newenvironment{highlighteqenv}{%
\noindent
\vspace{0.2\baselineskip}
\begin{graybck}
}
{\end{graybck}}
\begin{document}
He said : ` you must defeat Sheng Long to stand a chance' which more or less amounted to
\begin{highlighteqenv}
\begin{equation}
\frac{\partial \langle \alpha K \rangle}{\partial t} + \frac{\partial \lambda}{\partial z} =0
\end{equation}
\end{highlighteqenv}
\end{document}
Quite strangely, it produces a wrong spacing before the equation, as displayed on the following picture:
Removing either the fleqn
option of amsmath
of the loading of
babel
with the frenchb
option solves the problem :
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?