dbitouze / yathesis

Classe de thèse LaTeX pour universités françaises
27 stars 3 forks source link

Using localtocs/depth throws undefined control sequence error #103

Open renatospacek opened 3 months ago

renatospacek commented 3 months ago

Whenever I load the class with the localtocs/depth option, it throws an undefined control sequence error:

...
<argument> \etocifunknownlevelTF 
                                 {\YAD@localtocsdepth }
l.470 \ProcessPgfOptions{/yad}
                              %
The control sequence at the end of the top line
of your error message was never \def'ed
...

I looked into yathesis.cls and noticed that \etocifunknownlevelTF is used in a test on line 339, but isn't defined until line 521:

\RequirePackage{etoc}[2016/09/29]%
\providecommand*\etocifunknownlevelTF[1]{\@ifundefined{Etoc@#1@@}}%
\ifdefined\etockeeporiginaltableofcontents\etockeeporiginaltableofcontents\fi

I played with the cls file, and loading etoc earlier on fixed it for me (but then I had to move the etockeeporiginaltableofcontents line before 484 when book is loaded to fix another error).

Thanks a lot for the very nice package!