Il 27/09/2011 15:51, Julien Rioux ha scritto:
On 20/09/2011 12:05 AM, Tommaso Cucinotta wrote:
Il 19/09/2011 23:15, Julien Rioux ha scritto:
Sorry, not much time. Don't you also get this behavior?
Not of course: for me, it works like a charm! I can insert dia files (as
graphics) and odg files (as graphics), and they show up on the screen,
are properly included in generated DVI, PS, PDF.
You have to click on the figure to open the graphics dialog. Then you
get these error messages. Hint: It occurs in readBB_from_PSFile.
Only now, I'm noticing that export to XHTML has problems: it says it
cannot convert from ODG to PNG.
Adding this line to my lyxrc.defaults, makes it work just fine:
\converter eps png "convert $$i $$o" ""
("convert" is the ImageMagick tool -- I thought LyX already knew all the
possible usages of that!)
LyX does uses convert by default, so it's a mystery that it didn't
work. What was the actual error message?
Here you go:
$ ./src/lyx -e xhtml ~/odg.lyx
convert: no decode delegate for this image format
`/tmp/lyx_tmpdir.TJ7598/lyx_tmpbuf0/0_home_tommaso_kk.odg' @
error/constitute.c/ReadImage/532.
convert: missing an image filename
`png:/tmp/lyx_tmpdir.TJ7598/lyx_tmpbuf0/0_home_tommaso_kk.png' @
error/convert.c/ConvertImageCommand/2970.
/home/tommaso/lyx-trunk-ws/lyx-trunk/lib/scripts/convertDefault.py ERROR
Execution of "convert" failed.
Systemcall.cpp(243): Systemcall: 'python -tt
"/home/tommaso/lyx-trunk-ws/lyx-trunk/lib/scripts/convertDefault.py"
"odg:/tmp/lyx_tmpdir.TJ7598/lyx_tmpbuf0/0_home_tommaso_kk.odg"
"png:/tmp/lyx_tmpdir.TJ7598/lyx_tmpbuf0/0_home_tommaso_kk.png"' finished
with exit code 1
Error: Cannot convert file
----------------------------------------
No information for converting odg format files to png.
Define a converter in the preferences.
insets/InsetGraphics.cpp(970): InsetGraphics::xhtml: Unable to prepare
file `/home/tommaso/kk.odg' for output. File missing?
and of course the included graphics is there:
$ ls -l ~/kk.odg
-rw-r--r-- 1 tommaso tommaso 9594 2011-07-26 19:45 /home/tommaso/kk.odg
Full log with -dbg any available here:
http://retis.sssup.it/~tommaso/log.txt.gz
Now, after adding the eps -> png line above in my
$HOME/.lyx-trunk/lyxrc.defaults, I get instead this:
$ ./src/lyx -e xhtml ~/odg.lyx
convert /tmp/lyx_tmpdir.TJ8392/lyx_tmpbuf0/0_home_tommaso_kk.odg ->
/tmp/tmpL0oTuI/0_home_tommaso_kk.eps using draw_eps_Export
Input files: /tmp/tmpL0oTuI/0_home_tommaso_kk.ps
Processing: /tmp/tmpL0oTuI/0_home_tommaso_kk.ps
Rendering with existing %%BoundingBox: 0 0 539 785
Calculating Bounding Box...ready. %%BoundingBox: 170 626 329 686
Creating output file /tmp/tmpL0oTuI/0_home_tommaso_kk.eps...ready.
I assume it may be quicker for you to understand what's going bad in the
invocation of converterDefault.py, looking at these logs.
AFAICS, it doesn't find a direct converter from ODG to PNG, so it gives
up. So, my big question:
*) Does LyX embed any (even naive) algorithm for automatically finding a
"conversion path" from a format to another,
*) or, does each and every possible conversion need to be explicitly
registered somewhere ?
Thanks,
T.