On Sun, Apr 02, 2006 at 09:24:27AM +0200, Abdelrazak Younes wrote: > Abdelrazak Younes a écrit : > >Martin Vermeer a écrit :
... > >>Did you test that it is functionally identical (esp. with enum counters > >>inside insets etc.)? If it is, I am in favour of this. > > > >Yes. > > Hum no, not when the inset was following an enum list. I was calling > needEnumCounterReset with "buf.paragraphs()" instead of "it.plist". The > following patch is fixing this. If you want me to commit it, please > SHOUT. IMHO setCounter should be split up into self contained functions. Hmmm, about the needEnumCounterReset stuff, I don't know. Is this really saner? I find it somewhat more legible. About exiting setCounter for LABEL_NO_LABEL, I know that I proposed this, but if you say it doesn't produce any noticable speedup, then don't do this. Premature optimization attempt. About correcting the for loop test, I'm pretty sure it is a simple mistake. You should commit this if Jean-Marc agrees. > Side notes: > > 1) When inside an enum with depth greater than 0, enter at the end of > the paragraph resets the depth to 0. I always was very annoyed by this > feature (bug IMHO), anyone knows how to fix this? If you want to spend an entertaining sunday afternoon ;-), look at breakParagraph in text.C, its "preserve_layout" variable, and how it is transferred to breakParagraph in paragraph_funcs.C under the name "flag". Note in particular its lack of documentation and its "int" nature rather than a more legible enum (or even strings: "keep", "env", "no") I suspect you should look at the stuff underneath the comment // layout stays the same with latex-environments in paragraph_funcs.C. This code could certainly do with some sanitization/clarification... > 2) At depth 4, weird thing are happening (with or without my patch): > there's a message at the console "step: Counter does not exist: enum" > and the counters following are sometimes reset. Which document class is this? > Abdel. - Martin
pgpP7psSLDlF7.pgp
Description: PGP signature