Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
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

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer

Your Answer

 
discard

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.