I'm compiling a large, automatically generated LaTeX file that contains many \[ nested.

This gives the error:

! TeX capacity exceeded, sorry [grouping levels=255].
<recently read> \bgroup 

I don't have a way to reduce the grouping level. The automatically generated file relies on prooftree.sty by Paul Taylor --- it is a large derivation tree of 355 levels, and each level needs its own \[. On the highest level, this means you have 355 nested \[s.

Is there a way to increase the maximum number of grouping levels?

I'm using TeX Live 2015 on Debian. I would be okay with recompiling if necessary.

If there are alternatives to prooftree.sty that would not need this high grouping levels, I would be interested in that as well.

  • 2
    Nesting \[...\] is completely wrong in the first place. – egreg Jun 6 '16 at 21:03
  • 1
    Compile with LuaLaTeX – egreg Jun 6 '16 at 21:08
  • @egreg I think prooftree.sty translates that to \prooftree ... \endprooftree. LuaLaTeX works, thanks! Perhaps you could make that an answer? – Keelan Jun 6 '16 at 21:08
  • 3
    @egreg -- the documentation for prooftree (which is on ctan, though not on texlive) says that \[ must be used only within the prooftree environment because it is invalid otherwise in latex. the package hasn't been updated since 1996. – barbara beeton Jun 6 '16 at 21:12
  • @barbarabeeton Wow! – egreg Jun 6 '16 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.