4

I have the problem, that I need some quite long formulas and therefore I use breqn. Up till now, there was no problem doing so. But now I have a formula that seems to be too long for breqn. I get some error messages like

! Extra \else.
\eq@trial@b ...e }\eq@trial@succeed \fi \fi \else 
  \eq@trial@save \EQ@last@tr...
l.55 \end{dmath}

These messages are coming several times in the log. The output in the PDF file is correct, but the messages are not pretty. Also I will have to set some even longer formulas and then the output will be even worse.

So my question: Why are there these messages and what can I do against them?

PS: A minimal example. If you disable the landscape environment you will see the error:

\documentclass[a5paper,10pt]{article}
\usepackage{amsmath}
\usepackage{pdflscape}
\usepackage{breqn}

\begin{document}

\begin{landscape}
\begin{dmath}
\stackrel{(4)}{y}_1 = -b_1\,v_1\,\cos x_3 \,\sin x_5 \,x_6^2-c_1\,v_1\,\cos x_3 \,\cos x_5
\,x_6^2+2\,c_1\,v_1\,\sin x_3 \,x_4\,\sin x_5 \,x_6-2\,c_1\,\dot v_1 \,\cos x_3 \,\sin x_5 
\,x_6+c_1\,d_3\,v_1\,\cos x_3 \,\sin x_5 \,x_6+c_1\,d_1\,v_1\,\cos x_3 \,\sin x_5 \,x_6-2\,b_1\,v_1\,
\sin x_3 \,x_4\,\cos x_5 \,x_6+2\,b_1\,\dot v_1 \,\cos x_3 \,\cos x_5 \,x_6-b_1\,d_3\,v_1\,\cos x_3 
\,\cos x_5 \,x_6-b_1\,d_1\,v_1\,\cos x_3 \,\cos x_5 \,x_6-b_1\,c_2\,{v_1}^{2}\,\sin x_3 \,\sin^2 x_5 -
a_3\,c_1\,v_1\,\cos^2 x_3 \,\sin^2 x_5 -c_1\,c_2\,v_1^2\,\sin x_3 \,\cos x_5 \,\sin x_5 b_1\,b_2\,v_1^2\,\sin x_3 \,\cos x_5 \,\sin x_5 +a_3\,b_1\,v_1\,\cos^2 x_3 \,\cos x_5 \,\sin x_5 -
b_1\,v_1\,\cos x_3 \,x_4^2\,\sin x_5 -2\,b_1\,\dot v_1 \,\sin x_3 \,x_4\,\sin x_5 +b_1\,d_2\,v_1\,
\sin x_3 \,x_4\,\sin x_5 +b_1\,d_1\,v_1\,\sin x_3 \,x_4\,\sin x_5 -a_1\,b_1\,v_1\,\sin^2 x_3 \,\sin 
x_5 -a_2\,b_1\,v_1\,\cos x_3 \,\sin x_3 \,\sin x_5 -b_3\,c_1\,v_1\,v_2\,\cos x_3 \,\sin x_5 +b_1\,
\ddot v_1  \,\cos x_3 \,\sin x_5 -b_1\,d_1\,\dot v_1 \,\cos x_3 \,\sin x_5 +b_1\,d_1^2\,v_1\,\cos x_3 
\,\sin x_5 -b_2\,c_1\,v_1^2\,\sin x_3 \,\cos^2 x_5 -c_1\,v_1\,\cos x_3 \,x_4^2\,\cos x_5 -2\,c_1\,
\dot v_1 \,\sin x_3 \,x_4\,\cos x_5 +c_1\,d_2\,v_1\,\sin x_3 \,x_4\,\cos x_5 +c_1\,d_1\,v_1\,\sin x_3 
\,x_4\,\cos x_5 -a_1\,c_1\,v_1\,\sin^2 x_3 \,\cos x_5 -a_2\,c_1\,v_1\,\cos x_3 \,\sin x_3 \,\cos x_5 
+b_1\,b_3\,v_1\,v_2\,\cos x_3 \,\cos x_5 +c_1\,\ddot v_1  \,\cos x_3 \,\cos x_5 -c_1\,d_1\,\dot v_1 
\,\cos x_3 \,\cos x_5 +c_1\,d_1^2\,v_1\,\cos x_3 \,\cos x_5 -d_1^3\,x_2
\end{dmath}
\end{landscape}

\end{document}
18
  • Shouldn't it be the other way around - leaving this as-is in the example causes a problem.
    – Werner
    Aug 30 '11 at 20:10
  • OK, throw the package out and the two lines. Then I get some errors (texlive 2011) Aug 30 '11 at 20:13
  • do you need the equation number? If not use simply $...$ instead of dmath
    – user2478
    Aug 30 '11 at 20:19
  • Commenting out the landscape environment, I get the following error: ! Undefined control sequence. \eq@dense@enough@b ...m@b <\dim@c \true@true@true \else \false@true@false \fi l.25 \end{dmath} Aug 30 '11 at 20:21
  • @Herbert: $..$ does not break the equation, or am I wrong? Aug 30 '11 at 20:25
5

Adding the definition

\makeatletter
\def\true@true@true{\fi\fi\iftrue\iftrue\iftrue}
\makeatother

corrects the error under TeX Live 2011.

Loading the pdflscape package before the breqn package seems to solves the problem under TeX Live 2009 (tested on ScribTeX).

0

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.