# Minipage content overlaps with text before that if nccmath is used

It seems that if the nccmath package is included, then the text in the following minipage overlaps with the text before that if the minipage contains only display math. The \FixMinipageForNccmath macros is from nccmath affecting minipage widths.

\documentclass[fleqn,preview=false]{standalone}%
%
\usepackage{amsmath}%
\usepackage{nccmath}% Needed for fleqn environment

\newcommand*{\FixMinipageForNccmath}{\hrule height 0pt width \hsize}%

\begin{document}
Some text: $2 \ln x = 1$

\begin{minipage}{0.70\linewidth}\FixMinipageForNccmath
\begin{align*}
\ln x &= \frac{1}{2}
\end{align*}
\end{minipage}
\begin{minipage}{0.30\linewidth}\FixMinipageForNccmath
Note: abcd
\end{minipage}
\end{document}

-
It seems that nccmath has serious bugs. The \hrule has no influence, as you probably have already noticed. –  egreg Jul 2 '11 at 19:44
Yeah, that is why I posted to see if there is a replacement package for nccmath –  Peter Grill Jul 2 '11 at 19:46
@egreg: It seems if I just use \newcommand*{\FixMinipageForNccmath}{\leavevmode} both of the recent problems get fixed. I don't quite understand what other impacts this would have but got the idea from this recent question about aligning minipages –  Peter Grill Jul 2 '11 at 20:14
@egreg: If you post your comment as an answer I'll accept it so we can move this to answered. –  Peter Grill Sep 12 '11 at 18:11
@PeterGrill: What about using etoolbox and \BeforeBeginEnvironment{minipage}{\leavevmode}? –  Bernard May 10 at 23:45

It seems that nccmath has serious bugs. The \hrule has no influence, as you probably have already noticed.