zim-wiki team mailing list archive
Mailing list archive
LaTeX export and some questions
I am working on LaTeX export. If someone is interested in testing and
providing feedback, the bzr branch can be found here:
I've run into a problem, where I am not sure what the best soltion is.
The sectioning levels depend on the documentclass (article, report,
book, presentation, ...). For example, there are no chapters in
articles. To make the dumper do the right thing, (i.e provide the five
correct sectioning levels for the documentclass), I see several
* A custom dumper class for each documentclass. This pollutes
the output format menu with lots of LaTeX-variant.
* The dumper class has to know which documentclass the chosen
template is. So the exporter has to tell the dumper which
template is targeted. Also either the template has to be
parsed or some convention for the template name has to be
established so that the documentclass for a template
can be determined.
* The dumper writes sectioning indirect commands (like \hone,
\htwo, \hthree, ...), and these are mapped to the right
sectioning commands within the template with \newcommand.
This is ugly, as the resulting LaTeX Code is obfuscated.
* Sacrifice the flexibility and lock LaTeX export to a certain
Johannes Reinhardt <jreinhardt@xxxxxxxxxxxxxxxxxx>