Jean-Marc Lasgouttes wrote: > The following preliminary patch fixes the problem. Why is it > preliminary, I hear you ask? Because I am not sure why artcile and > book use different TocLevel settings for things like sections and > Subsections. So currently, the display is off-by-one for books. > > Juergen, in your tests how do you handle the difference between books > and articles?
By checking for the existence of \chapter, i.e. from within QDocumentDialog.C: + // check if the document class features chapter + LyXTextClass const & tclass = + form_->controller().params().getLyXTextClass(); + bool const hasChapter = tclass.hasLayout("Chapter"); It is sufficient to "shift" part one step up in my case (i.e., to the chapter position, when there is no chapter). tocdepth and secnumdepth are using the same values for section--subparagraph in both cases. Only part and chapter differ. That's the same in LaTeX. Maybe this is the reason for the different toclevel settings? OTOH I'm not sure I understood your question... Jürgen