If a user starts writing a document as a `book', and then lowers his level
of ambition to just an article, the Chapter's will be turned into Standard,
he'll have to set them to Section by hand, and set all sections to
subsections etc.  If he goes from article to book, he'll get section 0.1 at
the top of the document, probably not what he wanted. (or?  ...it would be
a different matter if he was pasting from another file)

I've made Swedish versions of the *.inc-files and a few layouts, and if I
switch from book to "bok, svensk" or vice versa, about the whole document
is set to "Standard" (or "Brödtext").  So it would be a bit dangerous to try
out a different layout of the document... one slip in Layout->Document,
"class" and about all of the layout work is gone, and there's no "undo" for
mistakes in the document layout popup.

Let's say we have a file containing maps of which Styles are related, as:
####################
# The Style families
Siblings
  Style book Chapter
  Style article Section
  Style report Section
  .
  .
  .
  Style "bok, svensk" Kapitel
  Style "artikel, svensk" Avsnitt
End
Siblings
  Style book Section
  Style article Subsection
  .
  .
  .
End
#   ...or some other easily parsable format
#######################
(names for layouts should be same as in the \DeclareLaTeXClass statement in
the .layout files.  I put the "Style" keyword there in case the format will
be extended)

The ObsoletedBy-statement is inappropriate for the problem; if one adds one
new Style in one layout, every other layout would need an
ObsoletedBy-statement for that style (unless a Standard actually is
enough).

Apart from parsing the file, it would effect the classes LyXTextClass,
Buffer, maybe LyXView  ...any others?

I'm not sure what to do in the case when someone pastes from one layout to
another.

A different, or complimentary approach to a family file could be a popup,
asking the user what he wants style x in the old document to be in the new
one.

Joacim
-
All programmers are playwrights and all computers are lousy actors.

Reply via email to