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
(not actually a template, it's the default CSS).
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.
latex
The LaTeX template, with dimension conditional.
The built-in LaTeX template supports the following options (they are passed verbatim and unescaped, so it's your responsibility to filter out garbage in an exposed environment (such a web interface).
Globals
- options.size
-
Paper size, like a4, a5 or 210mm:11in. The width and heigth are swapped in some komascript version. Just keep this in mind and do some trial and error if you need custom dimensions.
- options.division
-
The DIV of the
typearea
package. Defaults to 12. Go and read the doc. - options.bcor
-
The BCOR of the
typearea
package. Defaults to 0mm. Go and read the doc. Expected a TeX dimension like 10mm or 1in or 1.2cm - options.fontsize
-
The font size in point (should be an integer). Defaults to 10.
- mainfont
-
The system font name, such as
Linux Libertine O
orCharis SIL
. This implementation uses XeLaTeX, so we can use system fonts. Defaults toLinux Libertine O
. - options.oneside
-
Set it to a true value to have a oneside document. Default true
- options.twoside
-
Set it to a true value to have a twosided document.
Colophon
In the last page the built in template supports the following options
- options.sitename
-
At the top of the page
- options.siteslogan
-
At the top, under sitename
- options.logo
-
At the top, under siteslogan
- options.site
-
At the bottom of the page
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.