NAME

Text::Amuse::Compile::Templates - Built-in templates for Text::Amuse::Compile

METHODS

new(ttdir => 'mytemplates')

Costructor. Options:

ttdir

The directory where to search for templates.

Disclaimer: some things are needed for a correct layout/compilation. It's strongly reccomended to use the existing one (known to work as expected) as starting point for a custom template.

TEMPLATES

The following methods return a reference to a scalar with the templates. It should be self-evident which kind of template they return.

html

css

The default CSS, with some minor templating.

bare_html

The HTML fragment with the body of the text (no HTML headers, no Muse headers).

minimal_html

Minimal (but valid) XHTML template, with a link to stylesheet.css. Meant to be used in the EPUB generation.

title_page_html

Minimal XHTML template for a title page in the EPUB generation.

bare_latex

Minimal and uncomplete LaTeX chunck, meant to be used when merging files.

latex

The LaTeX template.

The template itself uses two hashrefs with tokens: options and safe_options. The options contains tokens which are interpreted as Text::Amuse strings from the extra constructor. The safe_options ones contains validate copies of the options for places where it make sense, plus some internal things like the languages and additional strings to get the LaTeX code right.

We use only the safe_options tokens, while the options should be used only by custom templates which in this way can receive random stuff.

See Text::Amuse::Compile::TemplateOptions

Anyway, all the values from options and safe_options, because of the markup interpretation, are (hopefully) safely escaped (so you can pass even LaTeX commands, and they will be escaped).

slides

The Beamer template. It shares the same tokens (when it makes sense) with the LaTeX template.

Theme and color theme selection is done via the Text::Amuse::Compile::BeamerThemes class, calling as_latex on the object. The relevant token is options.beamer_theme, picked up from the beamertheme and beamercolortheme from the extra constructor.

INTERNALS

ttref($name)

Return the scalar ref associated to the given template file, if any.

names

Return the list of methods for template generation

EXPORT

None.