Hi Oliver,
[ Oliver Smith, 2023-03-27 ]
> dblatex uses Inkscape to convert svgs to pdfs. The options
> --without-gui and --export-pdf it uses for this are deprecated. This
> generates a lot of unrelated warnings that make the output hard to
> read, and Inkscape may stop supporting these options altogether in the
> future.
>
> Fedora ships a patch that replaces inkscape with rsvg-convert, maybe
> that makes sense for Debian too:
> https://src.fedoraproject.org/rpms/dblatex/blob/rawhide/f/dblatex-0.3.11-replace-inkscape-by-rsvg.patch
IMO a simple change would fix the options issue. (The -z option has been
a shortcut for the deprecated --without-gui option):
--- a/lib/dbtexmf/core/imagedata.py
+++ b/lib/dbtexmf/core/imagedata.py
@@ -181,7 +181,7 @@ class FigConverter(ImageConverter):
class SvgConverter(ImageConverter):
def __init__(self, imgsrc, imgdst="", docformat="", backend=""):
ImageConverter.__init__(self, imgsrc="svg", imgdst=imgdst)
- self.add_command(["inkscape", "-z", "-D", "--export-%(dst)s=%(output)s",
+ self.add_command(["inkscape", "-D", "--export-filename=%(output)s",
"%(input)s"])
This works for me in case the output file is PNG. Could you test the PDF
case?
Related information concerning Inkscape changes:
https://wiki.inkscape.org/wiki/Using_the_Command_Line#Deprecations_and_Replacements
and the recent man page:
https://inkscape.org/doc/inkscape-man.html
To also fix the dblatex docs, two more patches would be needed; all
three patches are attached.
Wolfgang
Author: Wolfgang Schweer <wschweer@arcor.de>
Description: Adjust Inkscape options for SVG conversion
Inkscape removed the -z option (--without-gui shortcut) and deprecated the
--without-gui, --export-png and --export-pdf options (among others).
Now, --export-filename and/or --export-type are needed, --without-gui is the
default for commandline usage.
Bug-Debian: https://bugs.debian.org/1033547
--- a/lib/dbtexmf/core/imagedata.py
+++ b/lib/dbtexmf/core/imagedata.py
@@ -181,7 +181,7 @@ class FigConverter(ImageConverter):
class SvgConverter(ImageConverter):
def __init__(self, imgsrc, imgdst="", docformat="", backend=""):
ImageConverter.__init__(self, imgsrc="svg", imgdst=imgdst)
- self.add_command(["inkscape", "-z", "-D", "--export-%(dst)s=%(output)s",
+ self.add_command(["inkscape", "-D", "--export-filename=%(output)s",
"%(input)s"])
Author: Wolfgang Schweer <wschweer@arcor.de>
Description: Adjust custom dblatex conf file after Inkscape changes
--- a/docs/custom/dblatex.xconf
+++ b/docs/custom/dblatex.xconf
@@ -18,7 +18,7 @@
<imagedata>
<converter src="svg" dst="*" docformat="pdf">
<command>
- inkscape -z -D --export-dpi=600 --export-%(dst)s=%(output)s %(input)s
+ inkscape -D --export-dpi=600 --export-filename=%(output)s %(input)s
</command>
</converter>
</imagedata>
Author: Wolfgang Schweer <wschweer@arcor.de>
Description: Adjust manual after Inkscape command line option changes
--- a/docs/xhtml/manual/sec-specs.html
+++ b/docs/xhtml/manual/sec-specs.html
@@ -35,7 +35,7 @@
<imagedata>
<converter src="svg" dst="*" docformat="pdf">
<command>
- inkscape -z -D --export-dpi=600 --export-%(dst)s=%(output)s %(input)s
+ inkscape -D --export-dpi=600 --export-filename=%(output)s %(input)s
</command>
</converter>
</imagedata>
@@ -225,4 +225,4 @@ options specified by the parameter are d
following paths, in respect of the order:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The current directory</p></li><li class="listitem"><p><code class="filename">$HOME/.dblatex</code></p></li><li class="listitem"><p><code class="filename">/etc/dblatex</code></p></li><li class="listitem"><p>The dblatex package configuration directories.</p></li></ol></div><p>You can add some extra paths where to look for by setting the
<code class="envar">DBLATEX_CONFIG_FILES</code> environment variable. The paths are
separated by ":" in Unix like systems, and by ";" on Windows. These paths
- are used only when nothing is found in the default paths.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-texpost.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="sec-custom.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04s08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Latex post process script </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Customization Precedence</td></tr></table></div></body></html>
\ No newline at end of file
+ are used only when nothing is found in the default paths.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-texpost.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="sec-custom.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04s08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Latex post process script </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Customization Precedence</td></tr></table></div></body></html>
Attachment:
signature.asc
Description: PGP signature