Text::Amuse::Compile::Templates - Built-in templates for Text::Amuse::Compile
Costructor. Options:
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.
If passed, a template named ${format_id}-${name}.tt will be loaded if exists in the ttdir directory. This gives you as much flexibility as you need for output.
${format_id}-${name}.tt
ttdir
The following methods return a reference to a scalar with the templates. It should be self-evident which kind of template they return.
The default CSS, with some minor templating.
The HTML fragment with the body of the text (no HTML headers, no Muse headers).
Minimal (but valid) XHTML template, with a link to stylesheet.css. Meant to be used in the EPUB generation.
stylesheet.css
Minimal XHTML template for a title page in the EPUB generation.
Minimal and uncomplete LaTeX chunck, meant to be used when merging files.
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.
options
safe_options
extra
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).
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.
as_latex
options.beamer_theme
beamertheme
beamercolortheme
Return the scalar ref associated to the given template file, if any.
Return the list of methods for template generation
None.
To install Text::Amuse::Compile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Amuse::Compile
CPAN shell
perl -MCPAN -e shell install Text::Amuse::Compile
For more information on module installation, please visit the detailed CPAN module installation guide.