NAME
frundis
—
exporting tool for the frundis markup
language
SYNOPSIS
frundis |
-T format
[-a ] [-s ]
[-t ] [-x ]
[-z ] [-o
output-file] path |
DESCRIPTION
The frundis
program reads an UTF-8 encoded
file given by path, written in the
frundis
language as documented in
frundis_syntax(5), and exports it to LaTeX, XHTML, EPUB,
markdown or groff mom. The markdown and groff mom exports are second-class,
and they only handle a subset of the language: see the FORMATS section of
frundis_syntax(5) for more details.
The options are as follows:
-T
format- Specify the format in which to export. The format
argument can be
latex
,xhtml
,epub
,markdown
ormom
. -a
- When exporting to XHTML, output only one file, instead of a directory with
one file per part or chapter, and implies also that
-s
is no longer the default. -o
output-file- Specify the name of an output file, instead of printing to stdout. In the
case of exporting to EPUB, and XHTML unless
-a
is specified, this option is mandatory and specifies the name of a new directory that will contain all the necessary files. For EPUB, zipping has to be done manually after, or by using the-z
option. -s
- Specify that a standalone document should be produced. This is the default for XHTML and EPUB output formats.
-t
- Use template-like restricted mode (experimental).
-x
- Allow #run macro and external filters. Use this option only for trusted sources.
-z
- When exporting to EPUB, produce a finalized compressed EPUB file with the name suffix ‘.epub’.
ENVIRONMENT
frundis
uses the following environment
variables:
FRUNDISLIB
- This variable can be used to specify a colon separated list of directories
in which to search for
frundis
included source files.
FILES
- examples/
- This directory available in the root of the distribution contains examples for easy customization of output.
- examples/stylesheet.css
- Example stylesheet for easy customization of XHTML and EPUB output formats.
- examples/preamble.tex
- Example of preamble for LaTeX for easy customization.
EXAMPLES
To print simple XHTML without headers:
$ frundis -a -T xhtml input.frundis
> output.html
To print a standalone XHTML:
$ frundis -a -s -T xhtml
input.frundis > output.html
To create a directory with XHTML files and an index:
$ frundis -T xhtml -o output-dir
input.frundis
The following command will create an EPUB, both the uncompressed directory with the contents, named ‘output’, and the compressed, ready-to-use EPUB file ‘output.epub’:
$ frundis -T epub -o output -z
input.frundis
If the -z
option is ommited, compression
can be done manually. Assuming the zip program from
http://infozip.sourceforge.net/
is installed:
$ frundis -T epub -o output-dir
input.frundis
$ cd output-dir
$ zip -X0 ../my-epub.epub
mimetype
$ zip -Xur9D ../my-epub.epub
*
To produce a LaTeX document without a preamble:
$ frundis -T latex input.frundis >
output.tex
To produce a complete LaTeX document:
$ frundis -s -T latex input.frundis
> output.tex
To produce a pdf document using groff mom output format:
$ frundis -s -T mom input.frundis
> output.mom
$ pdfmom -k -t output.mom >
output.pdf
DIAGNOSTICS
Standard error messages have the following form:
frundis
:
file:lnum:macro:
messageThe file field specifies the name of the
source file in which an error was encountered. It can be
stdin
when reading from standard input. The
lnum field specifies the number of the line in the
source file where the error has been detected. The
macro field is the name of the macro being called (if
any). One or more message fields provide further
details on the nature of the error.
The file, lnum and macro fields appear only when it makes sense.