On Mon, Mar 22, 1999 at 12:40:10PM +0100, Andre' Poenitz wrote:
> John Weiss wrote:
> > The problem here is that LyX will then either:
> > 1. generate LaTeX code that won't LaTeX.
>
> It could give a warning that it is not able to produce 1:1 LateX and
> can offer a workaround.
>
> > 2. will have to mangle the document to get the nesting correct
> > for LaTeX-ing.
My problem here is that the user's doc mysteriously loses information
"someplace". It doesn't matter if it's transparent, behind-the-scenes
loss or loss guided by a popup. It's still stripping information
from the file *after* the user's gone and written it.
We make all of this noise about "with LyX, you focus on what you
write, not how to format it." Stripping nesting information forces
the user to re-focus on formatting. Instead, the nest-level limit
should be something tweakable from the *.layout files. For HTML, go
ahead and set it to 100 if you like. For LaTeX, nesting comes in two flavors:
1) Global: These may only nest 6-deep. That's the global LaTeX
limit, kiddies: no more than 6 levels.
2) List-specific: Itemize and Enumerated only. These
also obey the global nesting limit, but have an additional
constraint. A given list can only nest to 4 levels. That means
you can only have 1.a.ii.C for an Enumerated, and similarly for an
Itemized.
Lyx Adds:
3) Plain Paragraph: You can nest these under any nestable
environment, but you cannot nest anything under them. Furthermore,
they are not counted by LaTeX as being nested, only by LyX. Equations,
Standard, and Fig/Table-Floats are examples.
We therefore need 4 counters:
#1: screen depth. Can always go to 1+global.
#2: global document depth.
#3: Itemized depth. == how many Itemized are inside one another.
#4: Enumerated depth. == how many Enumerated are inside one another.
Only #2-#4 would have an upper limit set in a *.layout
For LaTeX the limits on these , #2 == 6, #3 == #4 == 4. For HTML,
#2 == #3 == #4 == 1000 or however big you want it.
Nevertheless, we *need* to check these limits in the case of LaTeX
documents. Better that the user discover that they can't create a
3.c.iv.B.1 before there's anything in it than after.
--
John Weiss
On a train, someplace between Pawling and White Plains...