4

Combining bm with breqn produces following error

! TeX capacity exceeded, sorry [input stack size=5000].
\bm@command ->
\mathchar 30049 \bin@break \mathchar 9259 \mathchar 30050 \let...
l.8 \bm{a + b = c}   
!  ==> Fatal error occurred, no output PDF file produced!

It happens only if I enclose equal sign in \bm, like in this example

\begin{dmath*}[compact]
\bm{a + b = c}
\end{dmath*}

Everything works smoothly if I skip equal sign, like here

\begin{dmath*}[compact]
\bm{a + b} = \bm{c}
\end{dmath*}

However compilation of \bm{=} results in

! TeX capacity exceeded, sorry [input stack size=5000].
\bm@command ->
\let \let \let \let \let \let \let \let \let \let \let \let \l...
l.8 \bm{=}
!  ==> Fatal error occurred, no output PDF file produced!

For displaymath or $$ (inline) there is no such problem.

Compiled using pdflatex version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)

Would be nice not to have to remember about splitting bm every time. Any cure?

  • 1
    In the case that the whole equation is bold, maybe you should use \boldmath outside the math environment. – Leo Liu Aug 10 '13 at 10:38
3

To make the whole equation bold:

\documentclass{article}
\usepackage{breqn}

\begin{document}

{\boldmath
\begin{dmath*}[compact]
a + b = c
\end{dmath*}}

\end{document}

For a bold equals sign:

\documentclass{article}
\usepackage{amsmath}
\usepackage{breqn}

% if you still need bm package otherwhere
\let\saveboldsymbol\boldsymbol
\usepackage{bm}
\let\boldsymbol\saveboldsymbol

\begin{document}

\begin{dmath*}[compact]
a + b \boldsymbol{=} c
\end{dmath*}

\end{document}
| improve this answer | |
  • I was about to check it but for some reason forgot to do so. It solves my actual problem, so thank you for your answer. Still there is a conflict between bm and breqn which may be troublesome. – Paul Aug 10 '13 at 10:57
  • @Paul: Does amsmath's old \boldsymbol solve your problem? – Leo Liu Aug 10 '13 at 10:59
  • \boldsymbol{a + b = c} works fine so I guess it does. Are there any restrictions for \boldsymbol? I mean why would I still need bm? – Paul Aug 10 '13 at 11:09
  • The spacing of \boldsymbol{a+b=c} is wrong. bm package is rather complex to deal with the spacing problems. There're other features described in the manual of bm package. In your particular example, however, \boldmath is still preferred. – Leo Liu Aug 10 '13 at 11:17
  • You're right. I will definetely apply \boldmath as it's all I need for now. Maybe once I get some deeper knowledge on LaTeX I try to fix it, because it looks like just an infinite-loop. Do you think it might be that easy? – Paul Aug 10 '13 at 11:24

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.