0

Hi everyone and thank you for reading me,

I am playing around with a phd thesis latex template and I am trying to set the Glenn chapter style from the fncychap package. The problem is that when I try to compile with it the following error comes up:

 ERROR: Undefined control sequence.

--- TeX said ---
\@mkboth ...nguage {\languagename }}\def \bbl@arg 
                                                  {#1}\ifx \bbl@arg \@empty ...l.199 \tableofcontents

                   % Prints the main table of contents

Nonetheless, I should note that this only happens when using the Glenn style, as any other does not produce the error.

A working example may be found in overleaf as this is part of a somehow complicated phd theses template: https://www.overleaf.com/latex/templates/template-for-a-masters-slash-doctoral-thesis/mkzrzktcbzfl#.Wu7w3y-mN26

Just add \usepackage[Glenn]{fncychap} to that template and you get the error.

Any one's got a clue on this one?

5
  • 1
    Welcome to TeX.SX!
    – Bobyandbob
    May 6, 2018 at 12:48
  • 1
    Can you make a minimal working example (MWE)? May 6, 2018 at 13:22
  • This looks like it could be an outdated babel version, so you could check for updates. But it is really hard to tell without a minimal document that reproduces the error (an MWE, see samcarter's link above).
    – moewe
    May 6, 2018 at 16:12
  • I've edited the original question, thank you for your suggestions! May 6, 2018 at 16:55
  • Class and package are not compatible.
    – Johannes_B
    Jun 12, 2018 at 4:01

1 Answer 1

1

I had the same issue as you.

A solution working was to redefined "\tableofcontents" as :

\makeatletter
\renewcommand\tableofcontents{%
  \null\hfill\textbf{\Large\contentsname}\hfill\null\par % line to comment if Glenn style also wanted here
  \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
  \@starttoc{toc}%
}
\makeatother

By default, the title "Contents" is center, If you want it to be like others (with Glenn style) : comment the 3rd line

To call the table of contents:

\chapter*{Table of Contents} %if you want in Glenn style also
\tableofcontents

Jerome

2
  • Welcome to TeX.SX! Your answer seems quite helpful. Nevertheless, could you eleborate on why your redefinition of \tableofcontentssolves?
    – Dave
    Jul 6, 2018 at 8:07
  • 1
    @Dave It's used in .sty file : \ChTitleUpperCase It seems that this command, which makes use of the \MakeUppercase command for the title display, makes the switch command fragile. One way to overcome this difficulty is to redefined the \tableofcontents command to make the switch command robust. For what it's worth, I would probably not trust fncychap for a longer document, it has fairly rudimentary errors. I might recommend instead using the titlesec package or the memoir class (among other options) for customizing headers.
    – Jerome
    Jul 6, 2018 at 9:07

You must log in to answer this question.

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