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).
bare_latex
Minimal and uncomplete LaTeX chunck, meant to be used when merging files.
Globals
- options.papersize
-
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. It expects a TeX dimension like 10mm or 1in or 1.2cm.Please note that this has no effect on the plain PDF output, as we, opinionately, force BCOR=0mm and oneside=true for this kind of output. But, of course, it does affect the imposed output.
- options.fontsize
-
The font size in point (should be an integer). Defaults to 10.
- options.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 is true.
- options.twoside
-
Set it to a true value to have a twosided document. Default is false.
Please note that this has no effect on the plain PDF output, as we, opinionately, force BCOR=0mm and oneside=true for this kind of output. But, of course, it does affect the imposed output.
Cover
- options.cover
-
When this option is set to a true value, skip the creation of the title page with \maketitle, and instead build a custome one, with the cover placed in the middle of the page.
- options.coverwidth
-
Option to control the cover width, when is set (ignored otherwise). Defaults to the full text width (i.e., 1). You have to pass a float here with the ratio to the text width, like
0.5
,1
.
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.