7. Styling Your Documents

For each supported output format there exists a subfolder xslt/<format> below the installation folder. Inside this folder, the XSL stylesheets with the transformation rules for the given target format and a style definition file named style.xml are stored.

To modify the style definitions for a given target format, create and edit a copy of the corresponding style.xml file. Then use the -s command line switch to point the ecromedos Document Processor to the new style file. The format and contents of the style definition file differ depending on the output format.

7.1. Modifying the CSS-Stylesheet

The central style definition for XHTML is a CSS stylesheet wrapped inside an XML container. The CSS stylesheet is generated from a number of SCSS stylesheets located in the style/scss subfolder in the source distribution. SCSS is an extended syntax of CSS that needs to be translated to regular CSS with a special compiler.

In order to get started with with SCSS, read the SASS guide at http://sass-lang.com/guide. After installing one of the available SASS compilers call the make.sh script in the style folder:

./make.sh css

The resulting stylesheet will be written to the file style.css. Take the full contents of this file and paste them into the XML container inside your style.xml file.

7.2. Changing the Look of LaTeX-based Output

In the style definition file for LaTeX, you will find a separate section for each of the supported document classes, with each section containing a list of stylable elements for the corresponding document class. Some basic knowledge of LaTeX will be required to be able to edit these.

The following style elements exist:

caption-setup

The package options that are passed through to the LaTeX caption package. Please consult [CAPTION], pages 5 ff., for more information on the available options.

chapterpage-style

The page style to be used for pages starting a new chapter (see [KOMASCR] for details). Use emtpy for a page without any decorations, scrplain for a page that is undecorated but has a page number or scrheadings for a page with page number and column titles.

chapter-title

The font properties of a chapter title.

description-label

The font properties of a label marking up a term in a definition list.

document-font

Use this element to change the font settings. For instance, in order to set your document in a sans-serif font family, you could set this element to

\renewcommand{\rmdefault}{\sfdefault}\normalfont
document-options

The package options that are passed to the LaTeX macro package KOMA-Script. Please consult [KOMASCR] for more information on the available options.

document-subtitle

The font properties of the document subtitle.

document-title

The font properties of the document title.

footnote

The font properties of a footnote.

footnote-label

The font properties of a label in a footnote.

footnote-reference

The font properties of a footnote reference.

indexpage-style

The page style to be used for pages starting a keyword index (see [KOMASCR] for details). Use emtpy for a page without any decorations, scrplain for a page that is undecorated but has a page number, or scrheadings for a page with page number and column titles.

minitoc-chapter-title

Font properties of the title of a chapter overview.

minitoc-part-title

Font properties of the title of a part overview.

minitoc-section-title

Font properties of the title of a section overview.

page-head

Font properties of the column titles of a page of style scrheadings (see [KOMASCR] for details).

page-head-fields

This element is meant to contain the definitions of the column titles for pages of style scrplain and scrheadings. For a detailed description of the contained elements, consult [KOMASCR].

page-number

Font properties for page numbers.

page-style

Sets the default page style to one of empty, scrplain, scrheadings (see [KOMASCR] for details).

paragraph-title

Font properties of an inline paragraph title.

part-number

Font properties of a part number.

partpage-style

The page style to be used for pages starting a new part (see [KOMASCR] for details). Use emtpy for a page without any decorations, scrplain for a page that is undecorated but has a page number, or scrheadings for a page with page number and column titles.

part-title

Font properties of a part title.

sectioning-title

Default font properties for section titles. This affects, for example, the minisection titles, for which no separate style element exists.

section-title

Font properties of the title of a section element.

subsection-title

Font properties of the title of a subsection element.

subsubsection-title

Font properties of the title of a subsubsection element.

titlepage-style

The page style to be used for the title page (see [KOMASCR] for details). Use emtpy for a page without any decorations, scrplain for a page that is undecorated but has a page number, or scrheadings for a page with page number and column titles.