2

After updating Inkscape for the 1.0 version the svg package invocation of inkscape leads to the following message in the log file:

Package svg Info: Calling Inkscape on input line 19. runsystem(inkscape -z -C --export-latex --file="truss.svg" --export-pdf="truss _svg-tex.pdf" )...executed.

Package svg Warning: The export with Inkscape failed for file (svg)
`truss.svg' (svg) Troubleshooting: Please check in the log file how (svg) the invocation of Inkscape took place and try to (svg) execute it yourself in the terminal on input line 19.

and the files "truss_svg-tex.pdf" and "truss_svg-tex.pdf_tex" are not created. I tried to execute the command

inkscape -z -C --export-latex --file="truss.svg" --export-pdf="truss_svg-tex.pdf"

in the command prompt and the two files "truss_svg-tex.pdf" and "truss_svg-tex.pdf_tex" were not created and a strange message was issued: "OpAA". Of course, a workaround is to open Inkscape and do File->Save As->pdf and then choose the "Omit text in PDF and create LaTeX file" option. Finally "_svg-tex" has be added to name of both files created. However, this is very unpleasant.

3

In your "svg.sty" file (/usr/share/texmf-dist/tex/latex/svg/svg.sty for me), replace the lines


\newcommand*\svg@ink@cmd[2]{
  \svg@ink@exe\space-z\space\svg@ink@area\space%
  \ifx\svg@ink@dpi\relax\else--export-dpi=\svg@ink@dpi\space\fi%
  \if@svg@ink@latex--export-latex\space\fi%
  \svg@ink@opt\space%
  --file="#1.\svg@file@ext"\space%
  --export-\svg@ink@format="#2.\svg@ink@format"\space%
}

with


\newcommand*\svg@ink@cmd[2]{%
  \svg@ink@exe\space\svg@ink@area\space%
  \ifx\svg@ink@dpi\relax\else--export-dpi=\svg@ink@dpi\space\fi%
  \if@svg@ink@latex--export-latex\space\fi%
  \svg@ink@opt\space%
  "#1.\svg@file@ext"\space%
  --export-type="\svg@ink@format"\space%
  --export-filename="#2.\svg@ink@format"\space%
}

2
  • Thanks Rick, your solution works beautifully! I see that a change was incorporated yesterday (after I post this question) in the svg package to solve this problem. – Carlos Tiago May 8 '20 at 18:09
  • I've opened an issue on GitHub – LeO Jan 12 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.