On 31/05/2010 8:11 AM, Leo Antunes wrote:
[I'm not subscribed, please CC]
Hi,
When configuring converters, what's the priority Lyx will give when
trying to convert an included graphic? If I have more than one
converters set-up for a given input format, with various output formats,
which one will Lyx prefer?
The case in point is trying to create a converter for Dot files, which
automatically parses them through dot2tex. This means Lyx would end-up
including an automatically produced LaTeX snippet. Is that even
possible? Do I need to figure out a way to first export this LaTeX to
some graphic format?
It is possible to include the generated latex code via Insert > File >
External material, but it is generally a bit more complicated to set up
compared to just including the file as an graphic (Insert > Graphic).
Either way, when LyX is set up properly you should be able to include
your .dot file and LyX will process it before inclusion, and again each
time the file is updated.
As a follow-up to this question, I've noticed Lyx still manages to
export a document with an included Dot file, even when I remove the
configured Dot converter. Am I right to assume there's some hardcoded
fallback converter at work? I don't believe it to be a configuration
caching issue, since I removed my whole .lyx dir just to be sure, but it
might be a fallback configuration somewhere else, which isn't visible in
the GUI and I couldn't find by grepping.
The same fallback converter seems to be what's used to generate the
image preview inside Lyx itself, since there are visual differences
between the previewed image and the exported one. Is there a way to
configure this?
The preview in LyX uses .png format, while pdf or ps output will prefer
vector graphics formats (.eps for dvi or ps output, .pdf for pdf
output), although pdflatex can handle raster images as well. I would be
surprised if you can see a .dot file (either in LyX or in output)
without a converter. In that case there might be a file left over in
your conversion cache folder.
All-in-all I might have totally misunderstood the idea behind the
converters, so please let me know if that's the case.
I don't think you got it wrong. Converters are easy to use for graphic
inclusion, so I would recommend that. If you really want to include the
generated latex code, you will have to define a new type of external
material. It's not impossible at all, but it is less documented feature
of LyX.
Cheers
All the best,
Julien