Previous: Style Elements, Up: Extending Muse

10.6 Deriving a new style from an existing one

To create a new style from an existing one, use muse-derive-style as follows. This is a good way to fix something you don't like about a particular publishing style, or to personalize it.

— Function: muse-derive-style new-name base-name &rest elements

The derived name is a string defining the new style, such as "my-html". The base name must identify an existing style, such as "html" – if you have loaded muse-html. The style parameters are the same as those used to create a style, except that they override whatever definitions exist in the base style. However, some definitions only partially override. The following parameters support partial overriding.

See Style Elements, for a complete list of all parameters.

If a markup function is not found in the derived style's function list, the base style's function list will be queried.
All regexps in the current style and the base style(s) will be used.
If a markup string is not found in the derived style's string list, the base style's string list will be queried.