LyXHelp: TeX capacity exceeded [grouping levels]

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Blaazen
Posts: 4
Joined: Fri Jun 01, 2018 7:03 pm

Help: TeX capacity exceeded [grouping levels]

Post by Blaazen »

Hello,

I need help with following error: TeX capacity exceeded, sorry [grouping levels=255] (or 80000, or 100000, depends if I use pdflatex, LuaTex, ps2pdf or so). I guess it is more related to changes in Lyx (or packages), because I tried 2 years old backup of my document and I get this error too although I'm sure that conversion to pdf worked well at that time.

My Lyx: 2.3.0, OS Linux Chakra 64-bit, Qt 5.10.1, texlive-langgreek 2017.46662-1 (from Arch Linux repository).

Preamble:
\usepackage{footnote}
\makesavenoteenv{tabular}

Log:

Code: Select all

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Chakra) (preloaded format=pdflatex 2018.2.25)  1 JUN 2018 22:53
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**devman2.tex
(./devman2.tex
LaTeX2e <2017-04-15>
Babel <3.12> and hyphenation patterns for 84 language(s) loaded.

(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (/usr/share/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
(/usr/share/texmf-dist/tex/latex/greek-fontenc/lgrenc.def
File: lgrenc.def 2015/12/07 v0.13.1 LGR Greek font encoding definitions
(/usr/share/texmf-dist/tex/latex/greek-fontenc/greek-fontenc.def
File: greek-fontenc.def 2015/08/04 v0.13 Common Greek font encoding definitions

)) (/usr/share/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding T1 on input line 48.
)) (/usr/share/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2015/03/17 v1.2c Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
(/usr/share/texmf-dist/tex/latex/base/latin9.def
File: latin9.def 2015/03/17 v1.2c Input encoding file
)) (/usr/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
Package: fancyhdr 2017/06/30 v3.9a Extensive control of page headers and footer
s
\f@nch@headwidth=\skip43
\f@nch@O@elh=\skip44
\f@nch@O@erh=\skip45
\f@nch@O@olh=\skip46
\f@nch@O@orh=\skip47
\f@nch@O@elf=\skip48
\f@nch@O@erf=\skip49
\f@nch@O@olf=\skip50
\f@nch@O@orf=\skip51
) (/usr/share/texmf-dist/tex/latex/tools/longtable.sty
Package: longtable 2014/10/28 v4.11 Multi-page Table package (DPC)
\LTleft=\skip52
\LTright=\skip53
\LTpre=\skip54
\LTpost=\skip55
\LTchunksize=\count87
\LTcapwidth=\dimen103
\LT@head=\box26
\LT@firsthead=\box27
\LT@foot=\box28
\LT@lastfoot=\box29
\LT@cols=\count88
\LT@rows=\count89
\c@LT@tables=\count90
\c@LT@chunks=\count91
\LT@p@ftn=\toks16
) (/usr/share/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip10
Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
) (/usr/share/texmf-dist/tex/latex/mdwtools/footnote.sty
Package: footnote 1997/01/28 1.13 Save footnotes around boxes
\fn@notes=\box30
\fn@width=\dimen104
) (/usr/share/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2017/06/29 3.12 The Babel package
(/usr/share/texmf-dist/tex/generic/babel/switch.def
File: switch.def 2017/06/29 3.12 Babel switching mechanism
) (/usr/share/texmf-dist/tex/generic/babel-english/english.ldf
Language: english 2017/06/06 v3.3r English support from the babel system
(/usr/share/texmf-dist/tex/generic/babel/babel.def
File: babel.def 2017/06/29 3.12 Babel common definitions
(/usr/share/texmf-dist/tex/generic/babel/switch.def
File: switch.def 2017/06/29 3.12 Babel switching mechanism
)
\babel@savecnt=\count92
\U@D=\dimen105
)
\l@canadian = a dialect from \language\l@american 
\l@australian = a dialect from \language\l@british 
\l@newzealand = a dialect from \language\l@british 
)) (/usr/share/texmf-dist/tex/latex/listings/listings.sty (/usr/share/texmf-dis
t/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
)
\lst@mode=\count93
\lst@gtempboxa=\box31
\lst@token=\toks18
\lst@length=\count94
\lst@currlwidth=\dimen106
\lst@column=\count95
\lst@pos=\count96
\lst@lostspace=\dimen107
\lst@width=\dimen108
\lst@newlines=\count97
\lst@lineno=\count98
\lst@maxwidth=\dimen109
(/usr/share/texmf-dist/tex/latex/listings/lstmisc.sty
File: lstmisc.sty 2015/06/04 1.6 (Carsten Heinz)
\c@lstnumber=\count99
\lst@skipnumbers=\count100
\lst@framebox=\box32
) (/usr/share/texmf-dist/tex/latex/listings/listings.cfg
File: listings.cfg 2015/06/04 1.6 listings configuration
))
Package: listings 2015/06/04 1.6 (Carsten Heinz)
No file devman2.aux.
\openout1 = `devman2.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 57.
LaTeX Font Info:    ... okay on input line 57.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 57.
LaTeX Font Info:    ... okay on input line 57.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 57.
LaTeX Font Info:    ... okay on input line 57.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 57.
LaTeX Font Info:    ... okay on input line 57.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 57.
LaTeX Font Info:    ... okay on input line 57.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 57.
LaTeX Font Info:    ... okay on input line 57.
LaTeX Font Info:    Checking defaults for LGR/cmr/m/n on input line 57.
LaTeX Font Info:    Try loading font information for LGR+cmr on input line 57.
(/usr/share/texmf-dist/tex/latex/cbfonts-fd/lgrcmr.fd
File: lgrcmr.fd 2017/07/29 v1.2 Greek European Computer Regular
)
LaTeX Font Info:    ... okay on input line 57.
\c@lstlisting=\count101
! TeX capacity exceeded, sorry [grouping levels=255].
\savenotes ->\begingroup 
                         \if@savingnotes \else \@savingnotestrue \let \@foot...
l.67 \maketitle
               
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:
 3337 strings out of 492990
 47839 string characters out of 6138692
 97869 words of memory out of 5000000
 6914 multiletter control sequences out of 15000+600000
 5935 words of font info for 17 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 26i,1n,43p,462b,630s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!
Line 57 of my lyx file is:
56 \use_bibtopic false
57 \use_indices false
58 \paperorientation portrait

IMO I don't have anything special in my document, mainly text, tables, toc.

Thanks for help, if you need more info, let me know.

Vojtěch
Last edited by Blaazen on Sat Jun 02, 2018 3:21 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Help: TeX capacity exceeded [grouping levels]

Post by Stefan Kottwitz »

Hi Vojtěch,

welcome to the forum!

Can you perhaps make a pdfLaTeX export in LyX, and post it here? At least until the \maketitle line.

Stefan
LaTeX.org admin
Blaazen
Posts: 4
Joined: Fri Jun 01, 2018 7:03 pm

Help: TeX capacity exceeded [grouping levels]

Post by Blaazen »

Thanks for reply.

I got the same error if I use preview (Ctrl+R) or File -> Export -> pdflatex.

The log is the same as in my first post.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Help: TeX capacity exceeded [grouping levels]

Post by Stefan Kottwitz »

Export to pdfLaTeX doesn't produce a PDF and cannot bring the error. I'd like to se the exported .tex file.

Stefan
LaTeX.org admin
Blaazen
Posts: 4
Joined: Fri Jun 01, 2018 7:03 pm

Help: TeX capacity exceeded [grouping levels]

Post by Blaazen »

I understand. This is snippet from beggining to \maketitle. Whole tex file has 40kB and ~1700 lines.

Code: Select all

%% LyX 2.3.0 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[LGR,T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{longtable}
\usepackage{url}
\usepackage{footnote}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.

\makesavenoteenv{tabular}

\DeclareRobustCommand{\greektext}{%
  \fontencoding{LGR}\selectfont\def\encodingdefault{LGR}}
\DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}}
\ProvideTextCommand{\~}{LGR}[1]{\char126#1}

%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newenvironment{lyxcode}
	{\par\begin{list}{}{
		\setlength{\rightmargin}{\leftmargin}
		\setlength{\listparindent}{0pt}% needed for AMS classes
		\raggedright
		\setlength{\itemsep}{0pt}
		\setlength{\parsep}{0pt}
		\normalfont\ttfamily}%
	 \item[]}
	{\end{list}}
\newenvironment{lyxlist}[1]
	{\begin{list}{}
		{\settowidth{\labelwidth}{#1}
		 \setlength{\leftmargin}{\labelwidth}
		 \addtolength{\leftmargin}{\labelsep}
		 \renewcommand{\makelabel}[1]{##1\hfil}}}
	{\end{list}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{footnote}
\makesavenoteenv{tabular}

\makeatother

\usepackage{babel}
\usepackage{listings}
\renewcommand{\lstlistingname}{Listing}

\begin{document}

\lhead{\url{http://www.ecsas.org}}

\title{Analoga ECSAS Developer's Manual}

\author{Vojt\v{e}ch \v{C}ihák\\
vojtech.cihak@atlas.cz\\
Czech Republic}

\maketitle
User avatar
Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Help: TeX capacity exceeded [grouping levels]

Post by Stefan Kottwitz »

Very good! Now I can test it and could reproduce the error and test the fix. In this export, we see that LyX already defined \makesavenoteenv{tabular}, seen in line 16 of the export. As you added it to the preamble yourself too, seen in line 47 of the export, it's called twice and that causes the error, this double modification. Just remove it from your document preamble.

Stefan
LaTeX.org admin
Blaazen
Posts: 4
Joined: Fri Jun 01, 2018 7:03 pm

Help: TeX capacity exceeded [grouping levels]

Post by Blaazen »

Yes, it works now! Thank you very much!
Post Reply