I am writing a linguistic paper and I read that gb4e is a great package to insert numbered examples. When I use the package, the program no longer compiles. I cannot find answers on why I am getting the answers I am getting.

Here is my preamble:

\usepackage{lmodern}% http://ctan.org/pkg/lmodern
\usepackage{slantsc}% http://ctan.org/pkg/slantsc

\DeclareUnicodeCharacter{00A0}{ }



Here are the error messages:

! Missing \endcsname inserted.
<to be read again>
l.10 \newlabel{chapter2_goals}{{1}{1}}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.
! TeX capacity exceeded, sorry [parameter stack size=10000].
\gb@ifnextchar #1#2#3->
\let \reserved@d =#1\def \reserved@a {#2}\def \reserv...
l.10 \newlabel{chapter2_goals}{{1}{1}}
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.
Here is how much of TeX's memory you used:
5829 strings out of 493014
78303 string characters out of 6133351
194551 words of memory out of 5000000
9310 multiletter control sequences out of 15000+600000
6558 words of font info for 22 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
3340i,0n,10001p,237b,56s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!

Thank you for your help

  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Oct 3, 2016 at 21:56
  • 1
    I added a document body with a single gb4e example, and it executes successfully. Please supply a minimal document body that demonstrates the problem. While you're at it, take out some of those packages until you find the smallest set that still triggers the bug.
    – alexis
    Oct 4, 2016 at 2:57
  • Thank you all for the constructive answers. I will know what to include for next time. Also, replacing the underscores did it, thank you very much!
    – Wolfgang
    Oct 5, 2016 at 0:56

1 Answer 1


gb4e redefines the underscore character. It looks from your error message like you have underscores in some of your labels which will stop your document compiling. So try removing the underscores from your labels.

Alternatively you can stop gb4e from redefining the underscore character by adding \noautomath immediately after loading gb4e.

  • While nobody marks as the correct answer, a thank you!
    – Alberto
    Jan 2, 2020 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .