1

Just upgraded to the 2019 version of LaTeX. Prior to upgrading, this command had no problems:

\printcontents{l}{0}{\setcounter{tocdepth}{1}}

After upgrading, this command does not print the secondary table of contents. If I remove the {l}:

\printcontents{ }{0}{\setcounter{tocdepth}{1}}

then it will print, but as expected it uses the chapter, section, etc. settings rather than the lchapter, lsection, etc. settings as defined with the \titlecontents command, for example:

\titlecontents{chapter}
  [1.25cm]
  {\addvspace{12pt}\large\bfseries}
  {\color{blue!60}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{blue}}
  {\color{blue}}
  {\color{blue!60}\normalsize\;\titlerule*[.5pc]{.}\;\thecontentspage}
\titlecontents{lchapter}
  [0em]
  {\addvspace{15pt}\large\bfseries}
  {\color{black}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{black}}
  {}
  {\color{black}\normalsize\bfseries\;\titlerule*[.5pc]{.}\;\thecontentspage}

MWE:

\documentclass[12pt,fleqn,twoside]{book}

\RequirePackage{titletoc}

\titlecontents{chapter}
  [1.25cm]
  {\large\bfseries}
  {\contentslabel[\Large\thecontentslabel]{1.25cm}}
  {}
  {\normalsize\thecontentspage}
\titlecontents{lchapter}
  [0em]
  {\large\bfseries}
  {\contentslabel[\Large\thecontentslabel]{1.25cm}}
  {}
  {\normalsize\bfseries\thecontentspage}

\begin{document}

\startcontents%

\chapter{Chapter 1}
some text

\chapter{Chapter 2}
some text

\printcontents{l}{0}{\setcounter{tocdepth}{1}}

\end{document}

This doesn't print a table of contents. Replacing {l} with { } will print one as described above.

epR8GaYuh
  • 2,432
  • 1
    As always on the site, full minimal example please. 99% of times we cannot work with sniplets like this. – daleif Jul 25 '19 at 17:31
  • I'm modifying https://www.latextemplates.com/template/the-legrand-orange-book for my own needs. The problem is there as well, though worked fine on the previous version of latex. Does that count as a MWE? – eipiisnegone Jul 25 '19 at 17:51
  • 1
    We generally do not go off site for resources or mwes as they may disappear in the future and thus making your question unusable for others in the future. – daleif Jul 25 '19 at 17:55

0 Answers0