I'm required to use the sigchi document class for a paper: https://github.com/sigchi/Document-Formats/blob/master/LaTeX/sigchi.cls

I'm also required to include a table of contents on the first page, but using the standard \tableofcontents produces a stack overflow:

TeX capacity exceeded, sorry [input stack size=5000].
\@latexerr #1#2->\GenericError

Turns out a table of contents is usually prohibited in this template, as seen in the .cls file:

\def\tableofcontents{\@latexerr{\tableofcontents: Tables of contents are not
  allowed in the `acmconf' document style.}\@eha}

If I comment out this bit from the .cls file, I get an undefined control sequence error.

I guess, then, that the \tableofcontents command needs to be explicitly defined by a document class? In my case, it isn't. How do I add it? Would I be able to grab the source of the command definition from a standard article document class and stick it into my sigchi.cls? Or is there a package I could use?


Here's a MWE with just a few sections. This will not compile as soon as you add a \tableofcontents.



\section{First section}

\section{Second section}

  • 1
    The \tableofcontents command is defined by the class, usually, but it is possible to use the usual definition as defined by book.cls etc., with caution however. Please show us a minimal version of your document that would compile if there is no \tableofcontents – user31729 Dec 28 '16 at 11:51
  • A problem might still pop up: Do you plan to hand in this document as a paper? The editors might refuse the addition of a \tableofcontents – user31729 Dec 28 '16 at 11:52
  • @ChristianHupfer My department has prescribed this for all theses (don't ask...). The sigchi class is normally used for short articles which obviously don't need a TOC, but for a thesis, a TOC is required. – Elise Dec 28 '16 at 11:57
  • What about sigchi-ext -- that class does have a \tableofcontents – user31729 Dec 28 '16 at 12:03
  • 1
    Sorry but if someone require that you to use a specific cls then it is their responsability to ensure that the cls fullfils whatever they want. It is imho quite impertinent from your department to expect from you to hack a latex class to write your thesis. – Ulrike Fischer Dec 28 '16 at 12:08

The sigchi.cls is not meant for a thesis, it misses several features necessary for typesetting a thesis (or has redefined it strangely)

The easiest way is to use a 'copy' of the \tableofcontents version provided by article.cls

Please note that the page layout is awkward, but this is another question too.


% Perhaps useful?

\newcommand{\contentsname}{Contents}% For example

% sigchi.cls does \let\thepage\relax (don't ask!), so define it again


\section{First section}

\section{Second section}

  • Thanks a bunch! This works if I change \renewcommand{\tableofcontents} to \newcommand{\tableofcontents}, and \newcommand{\thepage} to \renewcommand{\thepage}. – Elise Dec 28 '16 at 12:14
  • 1
    @Elise: A, I forgot that you have disabled \def\tableofcontents. Better use the original version of the class again – user31729 Dec 28 '16 at 12:17
  • And I'm absolutely aware that the template is unsuitable for a thesis... My complaints have been so far ignored :( – Elise Dec 28 '16 at 12:18
  • 1
    @Elise: I hope you will succeed with your thesis anyway. Perhaps using article or memoir miming the look of sigchi might be even better – user31729 Dec 28 '16 at 12:19

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.