On 05/03/2013 03:25 PM, Scott Kostyshak wrote:
On Fri, May 3, 2013 at 2:28 PM, Scott Kostyshak <skost...@lyx.org> wrote:
On Fri, May 3, 2013 at 1:48 PM, José Matos <jama...@lyx.org> wrote:
The problem is that the section counter is not reset when the appendix starts 
in the lyx view but it is reset in the output. Honestly I am not sure if we 
have changed anything here recently, so I am not sure if this a bug or a 
missing feature. :-)
This is a regression. I will do a bisect.
The bisect led me to the following commit:

commit 894569e601ea1e0acb1adf92a0f168c10d6577dc
Author: Richard Heck <rgh...@lyx.org>
Date:   Sat Jul 21 14:14:12 2012 -0400

     Fix a long-standing FIXME by resetting only the counter for top-level
     sectioning when we see an appendix. This fixes bug #8271, whose root
     cause was the fact that we were resetting all the counters inside ERT.

Note that this commit is also in branch, at ecb65e70

I see this with articles, but not with books, as long as the appendix is a chapter (which it should be).

Here is the relevant question: Shouldn't Part have toclevel -1? We seem to handle this inconsistently in the layout files. I test for toclevel >= 0 in the getTOCLayout() routine to try to ignore the Part counter, but it seems to have toclevel 0 in many layouts. Same as Chapter. So we find it first and reset that. So again: Shouldn't Parts be -1?

There's another potential bug here involving unnumbered sections. Probably I should also test whether the thing has an associated counter.

Richard

Reply via email to