muse-compile.pl - format your muse document using Text::Amuse
muse-compile.pl [ options ] file1.muse [ file2.muse , .... ]
This program uses Text::Amuse to produce usable output in HTML, EPUB, LaTeX and PDF format.
By default, all formats will be generated. You can specify which format you want using one or more of the following options:
Full HTML output.
Full EPUB output.
HTML body alone (wrapped in a
Pack the tex, the source and the html with the attachments in a zip file.
PDF output. Extension is .sl.pdf and it is a Beamer PDF. File .sl.tex is left in place.
Please note that the muse file must say that the slides are required. The header for that is
#slidesset to a value other than empty,
Produce the beamer LaTeX file, using the same rule above.
PDF imposed on A4 paper, with a variable signature in the range of 40-80
As above, but on Letter paper.
The directory with the templates. Optional and somehow discouraged for normal usage.
- --fontspec fontspec.json
A specification JSON file with the list of fonts. This permits you to use arbitrary fonts. To create one with the default list, you can use the command muse-create-font-file.pl, generate one, then pass it to this script together with --extra mainfont="Font Name".
If not provided, the main/sans/mono font options will be used. Please note that you can't build epub with embedded fonts without the fontspec file (because the location of the fonts is unknown) and that you will be bypassing any font name validation, so there is no guarantee that they are valid. Here the script assumes that you know what you are doing when setting a font name.
For EPUB output, embed the fonts in that directory.
This option is DEPRECATED now. The preferred way is to pass a fontspec file and pass --extra mainfont "Font Name", which ensure the consistency between the EPUB and the PDF.
In this directory the program expects to find 4 fonts, a regular, an italic, a bold and a bold italic one. Given that the names are arbitrary, we need an hint. For this you have to provide a file, in the very same directory, with the specifications. The file must be named
spec.txtand need the following content:
E.g., for Droid fonts:
family Droid Serif regular DroidSerif-Regular.ttf italic DroidSerif-Italic.ttf bold DroidSerif-Bold.ttf bolditalic DroidSerif-Bold.ttf size 10
The four TTF files must be placed in this directory as well. The formats supported are TTF, OTF and WOFF.
sizespecs are optional.
Option to populated the above directory with the built-in templates.
- --log <file>
A file where we can append the report failures
Prevent the removing of the status file. This is turned on if you use --recursive, to prevent multiple runs to compile everything again.
- --extra key:value
This option can be repeated at will. The key/value pairs will be passed to every template we process, regardless of the type, even if only the built-in LaTeX template support them.
The input is assumed to be UTF-8 (if you pass non-ascii characters). The values, before being passed to the templates, are interpreted as Text::Amuse strings. This normally doesn't have any side effects for simple strings, while for text this has the sane behaviour to escape special characters and to permit inline markup.
muse-compile.pl --extra site=http://anarhija.net \ --extra papersize=a6 --extra division=15 --extra twoside=true \ --extra bcor=10mm --extra mainfont="Charis SIL" \ --extra sitename="Testsite" \ --extra siteslogan="Anticopyright" \ --extra logo=mylogo \ --extra cover=mycover.pdf \ --extra opening=any \ file.muse
See muse-compile.pl --help --verbose for the full description of meaning of these options.
- --recursive <directory>
Using this options, the target directory and a recursive compiling is started, finding all the .muse files without a newer status file, and compiling them accordingly to the options.
No target files can be specified.
For recursive compile, you can pass this option to just list the files which would be compiled.
Use lualatex instead of xelatex.
Purge old files before compiling. Not supported for recursive compilation.
Create a coverpage only if there is a table of contents, otherwise use an article class.