On Wed, 2005-08-10 at 12:31, Martin Vermeer wrote: > On Wed, 2005-08-10 at 11:37, Juergen Spitzmueller wrote: > > Martin Vermeer wrote: > > > I have no clear explanation for this. There could be a deeper bug behind > > > this in the way layout files are read and overlayed. Ideas? > > > > My guess is that the counters mechanism first has to know what sections a > > class has (stdsections definitions), before the counters for them are being > > set (numreport.inc). > > I don't think so... the layout is defined the moment a > Style Section etc. statement appears first, i.e., in > numreport/numarticle. Even if most of the attributes ("layout tags") > still remain undefined at that point. > > But that brings up another question: inspecting lyxlayout.C's > LyXLayout::LyXLayout () (the constructor), it seems that a number of > layout tags are not initialized (or rather, assigned initial values.) > Isn't this mandatory? And will we not get into trouble if some of these > are initially filled with junk? > > Just wondering. > > - Martin
No. The explanation is VERRY simple. In numarticle, called from numreport, we have: --- Style Section LabelType Counter LabelCounter section LabelString "\arabic{section}" LabelStringAppendix "\Alph{section}" TocLevel 1 End Style Subsection LabelType Counter LabelCounter subsection LabelString "@[EMAIL PROTECTED]" LabelStringAppendix "@[EMAIL PROTECTED]" TocLevel 2 End --- Then, stdsections we have: --- Style Subsection CopyStyle Section <----------- NOTE THIS!!! LatexName subsection TopSep 0.9 BottomSep 0.5 ParSep 0.5 Font Series Bold Size Large EndFont End --- So, if we call numreport before stdsections, we have 1) in Subsection, define LabelString to be of type 1.2.3, based on Section's 1.2. Set TocLevel = 2. 2) in Subsection, COPY EVERYTHING from Section, including LabelString, and including TocLevel = 1. In other words, the settings made in numarticle are erased, and all Sub(sub...)sections are made to look like Section again. And TocLevel is getting nowhere. This is the reason stdsections should come before numreport. Generally, I suppose std* should come before everything else *because they contain these CopyStyles*. BTW the Customization manual doesn't say this, and could also otherwise do with a bit of work ;-) - Martin
signature.asc
Description: This is a digitally signed message part