On  8.02.05, Andreas Vox wrote:
> Luke Simon <[EMAIL PROTECTED]> writes:
 
> I don't think a so-called Über-Documentclass would be very helpful. The
> difficult part is to define the mapping from one environment to another.
> Once you have that, you could as well switch between classes directly.

We already have the "ObsoletedBy" directive, that can take care of some of
this cases. E.g. converting from article to article(scr) will map LyX-List
to Labeling:

# List style definition
Style List
  ObsoletedBy           Labeling
End

My version of dinbrief.layout (http://wiki.lyx.org/Layouts/Dinbrief) has
29 ObsoletedBy declarations not only to make it backwards compatible, but
also to facilitate conversions of documents from other letter classes.

However, it doesnot work backwards. 

For backwards compatibility (scr to standard classes) one could

  * use an ObsoletedBy clause in every non-scr layout file, or
  
  * rename the Labeling style to List (and add a Labeling ObsoletedBy
    List to the new scr-layout). (Only sensible if both Styles are
    100% compatible.
    
  * have something like a "DegradesTo" directive, that gives the best
    approximation for cases where a Style is not available (together
    with a warning to the user as currently).
    
The last option would also be of wider use: e.g. I have defined a
"CondensedItemize" list that has less vertical spacing than the
standard Itemize. If I pass my *.lyx file to someone (who doesnot have
my gm-extensions.inc layout file) CondensedItemize will be converted to
Standard. With 

Style CondensedItemize
  # my definitions
  DegradesTo Itemize
End

it would at least approximately work as expected.

 
> BTW, any volunteers who want to enhance this error dialog to allow
> userdefined mappings? :-)

The DegradesTo directive would do exacly this (replacing the "converted
to Standard" with whatever Style is given as approximation.

Günter

-- 
G.Milde web.de

Reply via email to