On Fri, 12 Feb 1999, Allan Rae wrote:

[snip - I think we're on the same track]
> Thus if I started with a book and Chapters and decided to switch to
> article I (the user) have a couple of simple options:
>       make Chapters into Parts and so on
> or 
>       make Chapters into Sections and so on

I'm not quite sure Parts should go in there (nor sure if they shouldn't ;)
There are Part in both book and article (and report), but no Chapter in
article.

> 
> Thus we'd have a logical section numbering scheme that could be applied
> irrespective of layout (including irrespective of SGML/LaTeX).
> And since the layouts are simply 's' + int we can easily decide which
> level we're at and how to move a particular paragraph up or down a level.
> (just add or subtract 1).

We have two situations:
1. The user switches layout on an entire document.
2. The user is pasting (or inserting a lyx-file) from another layout.  Here
        the user perhaps wants a Section  (from an old article of his) to remain
        a Section (in the book he's putting together, where the article becomes
        a chapter in the book).
(do we have a third?)

We could do like this:

Have a single algorithm (in each case anyway) for switching layouts and
pasting (perhaps have a setting in Options for which algorithm to use).
By sticking to one algortihm, we avoid annoying popups (asking the user
what he wants LyX to do with the headings) whenever he do a copy&paste or
tries out a different layout. 
This algorithm(s) should take advantage of the (not yet implemented)
categorification of Styles in the layout definitions.

And, introduce an editing command for changing heading depths, similar to
the environment depths [de|in]crease. (they have to be separate functions;
we can't just extend depth-[de|in]crease to involve headings as well or the
lists etc would become garbled).  Select a chunk of the document, and
change all the Sections to Subsections etc in one go, and keep the
selection in case the user wants to cut it and move it somewhere.  ...maybe
that should be the other way round: keep the selection on a paste.


In the case of switching layouts, we already have a popup when the headings
doesn't match; we could get rid of it entirely, or we could make it more
chatty (presenting two long lists of available environments in each layout,
and have the user specify how they should be matched).  There are pros and
cons with each method of course.

Joacim
-
With both feet on the ground, you won't get very far.
                -- Loesje

Reply via email to