Yes, there's a bug in the dblatex imagedata.py script, where the
SvgConverter class swaps the input/output arguments passed on to
inkscape.

Florian, for the MacPorts install, this is located under

  /opt/local//Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/dbtexmf/core/imagedata.py

(where 2.6 here is my particular version of Python, yours might
differ).  The patch is simply to swap order of the input and output
variables:

  $ diff -u imagedata.py.original imagedata.py
  --- imagedata.py.original       2011-03-23 15:15:30.000000000 -0700
  +++ imagedata.py        2011-03-23 15:15:41.000000000 -0700
  @@ -63,7 +63,7 @@

   class SvgConverter(ImageConverter):
      def convert(self, input, output, format, doexec=1):
  -        cmd = "inkscape -z -D \"--export-%s=%s\" %s" % (format,
input, output)
  +        cmd = "inkscape -z -D \"--export-%s=%s\" %s" % (format,
output, input)
          return self.system(cmd, doexec)

I've reported this to the maintainer of dblatex, so maybe they will
fix it.

On Jan 25, 5:00 am, Lex Trotman <[email protected]> wrote:
> On 25 January 2011 21:47, Florian <[email protected]> wrote:
>
>
>
> > On 24 Jan., 19:57, Stuart Rackham <[email protected]> wrote:
> >> On 20/01/11 00:20, Florian wrote:
>
> >> > Hi there,
>
> >> > I have a small problem concerning a2x calling inkscape with wrong
> >> > parameters. When generating pdf output, a2x will convertsvgto pdf
> >> > using inkscape, but:
>
> >> > inkscape -z -D "--export-pdf=graph.svg" fig0.pdf
> >> > Error: Couldn't open file 'fig0.pdf': No such file or directory.
>
> >> > in which
>
> >> > inkscape -z -D "--export-pdf=fig0.pdf" graph.svg
>
> >> > will produce the desired result. Does anyone know where the command
> >> > line is put together?
>
> >> I don't understand, a2x does not call inkscape.
>
> > Hi Stuart,
>
> > on my Mac I installed asciidoc via macports. I don't know if this
> > makes any difference.
> > Regardless, at some point inkscape is called in order to convert the
> >svginto pdf files. Maybe this is triggered not by a2x but by dblatex
> > or likewise.
>
> Yes the conversion is done by dblatex, but it doesn't document what
> tools it uses, Inkscape is possible choice forsvgto pdf but somewhat
> surprising.
>
> Cheers
> Lex
>
>
>
> > Thanks anyway for testing,
> > Florian
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "asciidoc" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/asciidoc?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to