On 18/04/2011 2:29 AM, Yang Zhang wrote:
I'm interested in adding a new graphics format (Xournal) to LyX that
can be displayed on-screen and rendered in PDF outputs.  Just to get
started, I've been trying to figure out how to add a dummy graphics
format.  The input is actually a .tex file (but named .foo), and I
tried adding a converter to PDF, but not luck.  Details follow.

In Tools>  Preferences, I added a new format with:

Format: foo
Short Name: foo
Extension: foo
Editor: gedit
Viewer: gedit

I also added a new converter to PDF (ps2pdf) with:

pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foo&&  cp /tmp/blah.pdf $$o

Note I'm ignoring $$i, just for the sake of getting *something* working.


At least for the export to pdf, it should be sufficient to use:
pdflatex $$i

For the display in the LyX buffer, you might have to define a converter to .png, but imagemagick will be attempted if you don't define a converter.

Now I tried inserting a simple hello world latex file named .foo into
my document as a graphic.  With lyx -dbg graphics, I see the following
output, and in the main window I get the error "Error converting to
loadable format."  Any hints?  Thanks in advance.



--
Julien

Reply via email to