Vincent van Ravesteijn wrote:
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.)

I think it is worth pursuing this idea. There have been other times I've thought we needed something like this. See, for example, http://bugzilla.lyx.org/show_bug.cgi?id=3452. There are other uses I've thought of, too, but can't now recall.

These would be parameters that went with a sequence of similar layouts. Reading and writing them is easy enough, if we can figure out how to represent them. They don't really go with any particular paragraph---that's precisely the problem with the current representation---but there doesn't seem to be anywhere else to attach them.

One possibility might be to store these things in their own structure---just a list would do---and then each paragraph could have a pointer (or reference) to a LayoutGroupParameters. Paragraphs in a single LayoutGroup could have pointers to the same LGP, so no need to synchronize. The action would be when a sequence of paragraphs was split by a new layout---then we'd have to copy the old LGP and reset the pointers for some of the paragraphs---or when a sequence of paragraphs that used to be split got joined. It's less clear how to "merge" the LGPs in that case, but surely that could be figured out.

This doesn't solve all the problems, but it would solve a big one.

Now here's a different question. Suppose I set an earlier enumeration to suspend, but then never resume it. Is this OK by LaTeX? If so, then it looks to me as if all we'd really need to do in the LaTeX output is track which kind of enumeration(s?) had been suspended and resume them only under the right circumstances.

Richard

Reply via email to