I know they are incompatible, and I more or less understand why. The thing is, they address two things I needed to achieve in a document I'm working on, so I had to find an alternative to either of the packages or a way to make both things work together.
My document (book class, over thousand pages) is split in a few parts and many chapters. For convenience and sanity, I wanted to put a brief ToC listing the parts and their chapters, and then a deeper ToC within each part listing its chapters, sections, and subsections. I am using the shorttoc package for the brief ToC, minitoc's \faketableofcontents command to ensure the .toc file is generated, and the \parttoc command on each part. At this point, things still went fine.
Now titlesec came to the scene: I have customized chapter, section, subsection, and so on with \titleformat, and things still went fine.
But that wasn't enough: I went into customizing the part titles to include a "cover image" on the title page, moving the title itself upwards (actually, I had to get help from this community to achieve that: http://www.latex-community.org/forum/vi ... =44&t=6752), and here is where things broke: as soon as the \titleformat{\part} command was added, the parts' ToCs no longer appear. Quite reasonable that the parts' ToCs break when I start messing with parts, but still a problem nevertheless, because the document needs both features.
I looked deeper at the issue, and noticed that the .ptc<N> files got generated and the contents in them seemed to make sense (I don't really understand all the commands in there, but the titles and numbers of my chapters and deeper divisions appeared there); so my guess is that only the \parttoc breaks because minitoc can't figure out where to put the ToC. It seemed that everything worked fine except for the last detail of rendering the part ToCs, and I thought: if everything else is already done, couldn't I handle that small but critical detail?
Since the .ptc<N> files are there, I bet it should be possible to forget about \parttoc and use all the stuff minitoc has already generated directly. It didn't took too much after that point: a test with
Code: Select all
input{\jobname.ptc\arabic{part}}
Code: Select all
\newcommand{\PToC} {%
\makeatletter%
{\Large Table of Contents}
\input{\jobname.ptc\arabic{part}}%
\cleardoublepage%
\makeatother%
}
I guess I could have used \renewcommand{\parttoc} instead of a brand new command, but I don't like altering commands written by third parties, and I like to have a weird-looking command like \PToC to remind myself of where I'm messing things up.
The formatting of the title is very basic, but the main task (rendering the "local" ToC) is done, and formatting details, while probably tedious on most cases, are not really an issue.
Regards,
Herenvardo