On 09.08.2009, at 17:31, Pavel Sanda wrote:

Daniel Lohmann wrote:
Your  help is highly appreciated!

try to mimic http://www.lyx.org/trac/changeset/27914
and ask for inclusion if you succeed. you may also
want to comment on bug 4882.

Hi Pavel,

Thanks for your answer!

However, I have to admit that I don't really get what you suggest me to do. As I read 27914, this introduces "Dia" support via external_templates. Does that mean that it is *not possible* to achieve goal (1) (the preview in LyX, everything else works) via file formats and converters only? Do I have to go the external_templates route?




Even though I consider myself a "LyX master" in many respects, the exact usage of "File Formats", "Converters" and "External Material..." have always remained a mystery to me. Today I gave it another try (LyX 1.6.3-mac) -- and failed again.

So here is what I want to achieve:

I have some TikZ figures (which are actually stand-alone LaTeX- documents with the extension .tikz) that I want to embed (not the source, but the PDF/EPS via \includegraphics) into my LyX document in a way that (1) the LyX-Preview does work (2) PDF generation does work, and (3) the .tikz-file is opened in vim when I select "Edit externally..."

So far I got (2) and (3) working, but not (1):

-- Under [File Handling --> File formats] I have added a new file format "TikZ" as Vector graphics format, Short Name: "Tikz", Extension: "tikz", and Editor: "vim".

-- Under [File Handling --> Converters] I have added a Converter Definition "TikZ --> PDF (ps2pdf)" with Converter: "pdflatex $$i"

If I now embed a .tikz-file, external editing and PDF generation works fine, but LyX is not able to show a preview. As I interpret the output of "lyx -dbg graphics", LyX does not know how to generate a pixmap from the input format ("TikZ"). Do I have to define a converter to some pixmap format as well? How to do so?

This is pretty confusing. As I understand the manuals (don't remember where exactly I have read this) LyX should be able to deduce its route through conversion rules automatically, that is, to convert from TikZ to PDF first and then from PDF to the pixmap required for the preview functionality.

Reply via email to