NAME
Text::Amuse::Compile::File - Object for file scheduled for compilation
SYNOPSIS
Everything here is pretty much private. It's used by Text::Amuse::Compile in a forked and chdir'ed environment.
ACCESSORS AND METHODS
new(name => $basename, suffix => $suffix, templates => $templates)
Constructor. Accepts the following named parameters:
- name
- virtual
-
If it's a virtual file which doesn't exit on the disk (a merged one)
- suffix
- ttdir
-
The directory with the custom templates.
- fileobj
-
An optional Text::Amuse::Compile::FileName object (for partials)
- standalone
-
When set to true, the tex output will obey bcor and twoside/oneside.
- options
-
An hashref with the options to pass to the templates.
- webfonts
-
The Text::Amuse::Compile::Webfonts object (or undef).
INTERNALS
- is_deleted
- status_file
- check_status
- purged_extensions
- muse_file
- document
-
The Text::Amuse object
- tt
-
The Template::Tiny object
- logger
-
The logger subroutine set in the constructor.
- cleanup
-
Remove auxiliary files (like the complete file and the status file)
- luatex
-
Use luatex instead of xetex
- fonts
-
The Text::Amuse::Compile::Fonts::Selected object (required).
- epub_embed_fonts
-
Boolean (default to true) which triggers the epub font embedding.
- coverpage_only_if_toc
-
Boolean (default to false). Activates the conditional article output.
Options which are looked up in the file headers first
See Text::Amuse::Compile::TemplateOptions for the explanation.
- cover
- coverwidth
- nocoverpage
- notoc
- nofinalpage
- impressum
- continuefootnotes
- centerchapter
- centersection
purge_all
Remove all the output files related to basename
purge_slides
Remove all the files produces by the slides
call, i.e. file.sl.pdf and file.sl.log and all the leftovers (.sl.toc, .sl.aux, etc.).
purge_latex
Remove files left by previous latex compilation, i.e. file.pdf and file.log and all the leftovers (toc, aux, etc.).
purge_latex_leftovers
Remove the latex leftover files (toc, aux, etc.).
purge_slides_leftovers
Remove the latex leftover files (.sl.toc, .sl.aux, etc.).
purge('.epub', ...)
Remove the files associated with this file, by extension.
METHODS
Formats
Emit the respective format, saving it in a file. Return value is meaningless, but exceptions could be raised.
- html
- bare_html
- epub
- lt_pdf
- a4_pdf
- zip
-
The zipped sources. Beware that if you don't call html or tex before this, the attachments (if any) are ignored if both html and tex files exist. Hence, the muse-compile.pl scripts forces the --tex and --html switches.
- tex
-
This method is a bit tricky, because it's called with arguments internally by
lt_pdf
anda4_pdf
, and with no arguments beforepdf
.With no arguments, this method enforces the options
twoside=true
andbcor=0mm
, effectively ignoring the global options which affect the imposed output, unlessstandalone
is set to true.This means that the twoside and binding correction options follow this logic: if you have some imposed format, they are ignored for the standalone PDF but applied for the imposed ones. If you have only the standalone PDF, they are applied to it.
- sl_tex
-
Produce a file with extension
.sl.tex
, a LaTeX Beamer source file. If the source muse file doesn't require slides, do nothing. - sl_pdf
-
Compiles the file produced by
sl_tex
(if any) and generate the slides with extension.sl.pdf
Logging
While the logger
accessor holds a reference to a sub, but could be very well be empty, the object uses these two methods: