I'm using titletoc for having a partial index going down to paragraphs.

I wrote a custom formatting for it using \titlecontents and \titlecontents*.

In some cases (some specific combination of subsections, paragraphs, and text), it fails with the error:

! Missing number, treated as zero.
<to be read again> 
l.6 \contentsline {paragraph}{Bla}{1}

A minimum non-working example is this:








As seen in 



and the file .ptc which seems to be involved in the error has the following content:

\babel@toc {english}{}
\ttl@starttoc {char@1}
\contentsline {paragraph}{Blo}{1}% 
\contentsline {subsection}{\numberline {0.1}Ciao}{1}% 
\contentsline {paragraph}{Bla}{1}% 
\ttl@stoptoc {char@1}

Where does this error come from? Thanks!

  • do you really have \paragraph before \subsection it seems that titletoc don't expect this. – touhami Jun 1 at 9:51
  • I agree, that seems to be the problem. The sectioning of the MWE is weird as it is the minimal example I could find. If you add a "section" at the begin of the MWE, it still fails. If you add a "subsection" it works. – Ilario Gelmetti Jun 1 at 14:43
  • The version in GitHub should work ( github.com/jbezos/titlesec ). I was working on it, and I'll upload it to CTAN in 1 or 2 weeks. – Javier Bezos Jun 2 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.