Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

I'm calculating a huge term, say

rl := b * b = 0;
def post_process(ex):
    substitute( distribute( expand_power(ex) ), rl)

expr := (a + b) ** 12;

and I get the following warning:

Output cell too large (breqn dimension too large), output suppressed. 
See /tmp/cdbK3j9vr.tex to debug this.

I know (because I tried) that the expression can still be manipulated if I use

expr := (a + b) ** 12.

How can I increase the tolerance to huge expressions in cadabra-gtk?

asked in General questions by (7.3k points)

1 Answer

0 votes

At the moment you can't. There is a bug in breqn (the LaTeX package which handles automatic line breaking for large expressions) which prevents such expressions from being printed. The maintainer of that package has acknowledged the bug but I do not have an estimate of when it will be fixed.

In the long run Cadabra will probably move to a different typesetting backend but there is no expected time of arrival for that either. Sorry.

answered by (61.8k points)

FYI breqn seems to be the last update, but I don't know if it is the one on CTAN

I know, that's what is included in Cadabra (and as you can see, the last update of that github repo was quite a while ago).

I found a workarround suggested by egreg on tex.stackexchange, which doesn't require breqn package... but is not exactly a solution of the problem.

Workarround by egreg

The logic of that workaround is to typeset maths inline using single-$ maths, which does do line-breaking without using breqn.sty. The problem with that workaround is that as soon as you use a \left( ... \right) construction, it will not line-break the content of that bracket anymore. Since I do not know in advance how large brackets should be, I can't simply use \bigg( and the like (as the example on tex.stackexchange does).