On 13.08.2009, at 11:22, Pavel Sanda wrote:

Jürgen Spitzmüller wrote:
Pavel Sanda wrote:
- to make a python script which would take the parent document dumps the preamble, then inputs tikz, latex it and returns figure for both preview
and output.

Here is such a python script (although it is a bit too UNIX-centric):
http://kogs-www.informatik.uni-hamburg.de/~meine/tikz/process/

in a case some of the intersted people write and test the external template
we could include it with this script in a proper lyx release.

The real problem is to get the preamble right. Because TikZ is a huge package that has a noticeable impact on LaTeX compilation times (and memory consumption), it is pretty well modularized into multiple libraries. A typical preamble for a TikZ figure looks as follows:

\usepackage{tikz}
\usetikzlibrary{fit,positioning,shapes,shapes.multipart, <depends on what you actually use in the figure>}

With the external-template mechanism, as far as I understand it, the additional stuff for the preamble can only be hard-code in the template and not be examined (e.g. by invoking some script) for the actual TikZ figures to embed.


Daniel 

Reply via email to