zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #00602
LaTeX export and some questions
Hi everybody,
I am working on LaTeX export. If someone is interested in testing and
providing feedback, the bzr branch can be found here:
https://code.launchpad.net/~johannes-reinhardt/+junk/zim-latex
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
possibilities:
* 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
documentclass.
Greetings,
Johannes Reinhardt
--
Johannes Reinhardt <jreinhardt@xxxxxxxxxxxxxxxxxx>
Follow ups