Next: , Previous: Markup Tags, Up: Extending Muse


10.5 Parameters used for defining styles

Style elements are tags that define a style. Use either muse-define-style or muse-derive-style (see Deriving Styles) to create a new style.

— Function: muse-define-style name &rest elements

Usable elements

:suffix
File extension to use for publishing files with this style.
:link-suffix
File extension to use for publishing links to Muse files with this style.
:osuffix
File extension to use for publishing second-stage files with this style.

For example, PDF publishing generates a LaTeX file first, then a PDF from that LaTeX file.

:regexps
List of markup rules for publishing a page with Muse. See muse-publish-markup-regexps.
:functions
An alist of style types to custom functions for that kind of text. See muse-publish-markup-functions.
:strings
Strings used for marking up text with this style.

These cover the most basic kinds of markup, the handling of which differs little between the various styles.

:tags
A list of tag specifications, used for handling extra tags. See muse-publish-markup-tags.
:specials
A table of characters which must be represented specially.
:before
A function that is to be executed on the newly-created publishing buffer (or the current region) before any publishing occurs.

This is used to set extra parameters that direct the publishing process.

:before-end
A function that is to be executed on the publishing buffer (or the current region) immediately after applying all of the markup regexps.

This is used to fix the order of table elements (header, footer, body) in XML-ish styles.

:after
A function that is to be executed on the publishing buffer after :before-end, and immediately after inserting the header and footer.

This is used for generating the table of contents as well as setting the file coding system.

:final
A function that is to be executed after saving the published file, but while still in its buffer.

This is used for generating second-stage documents like PDF files from just-published LaTeX files.

The function must accept three arguments: the name of the muse source file, the name of the just-published file, and the name of the second-stage target file. The name of the second-stage target file is the same as that of the just-published file if no second-stage publishing is required.

:header
Header used for publishing files of this style.

This may be a variable, text, or a filename. It is inserted at the beginning of a file, after evaluating the publishing markup.

:footer
Footer used for publishing files of this style.

This may be a variable, text, or a filename. It is inserted at the end of a file, after evaluating the publishing markup.

:style-sheet
Style sheet used for publishing files of this style.

This may be a variable or text. It is used in the header of HTML and XHTML based publishing styles.

:browser
The function used to browse the published result of files of this style.