rgheck schreef:
Just some random thoughts looking quickly. Suppose resumeEnumeration is on, and then I change the layout to, say, LyX list. What happens? I guess, in the abstract, I have general worries about how this will behave under such changes.
Yes, these are valid worries. See below.

Jürgen Spitzmüller schreef:
Yes. Furthermore, this is a file format change.

Yes, I don't think I can do this without a file format change. Now we have at least another year to solve any related issues. [disappointed_smiley]

Jean-Marc Lasgouttes schreef:
Would it make sense to have a single enumerationStatus() enum for these
two things [suspend and resume, vfr](and also in file format)?
Yes, that would make sense.
+pit_type Text::getFirstParInEnv(Cursor const & cur, pit_type pit_) const

Did you look at those functions in paragraph_funcx.cpp
No, I didn't. Thank you for pointing them out.

The biggest problem I have with this is that, since you add the suspend
flag automatically, the mechanism is very fragile. What if you copy the
second enumeration in front of the other? What if the last element of
the list is removed? All these actions will likely give us a broken file.
Currently I added the resume AND suspend bools to the first paragraph of an environment. In principle, all paragraphs within an environment should have these parameters set. Now, cutting an enumeration (that is resumed later) in half would result in the first one being suspended and the second one being ended, which is obviously wrong. What is obviously missing here is some sort of LayoutGroupParameters or something like that (which could also be used for the title/appendices/etc.)

Another possibility is to remove the suspend variable completely, making it more robust. But then, we should search for a resuming enumeration in the document everytime we generate the latex code, which won't be fun working on a large document with View Complete Source. Anyway, would that be better ?

Further, would it be possible to add some sort of Label / Reference mechanism. Then we could have some sort of EnumerationCache().. and do some magic in Buffer::updateLabels()..

Thank you for your responses. As this is the first time I'm working on this kind of problem in LyX, any hints, worries, ideas or advice is welcome.

Vincent

Reply via email to