mrpiggi / svg

Handling SVG pictures in LaTeX documents using Inkscape, ImageMagick and/or Ghostscript
Other
65 stars 12 forks source link

Compilation problem with TeX Live 2019 #13

Closed alessanderbotti closed 4 years ago

alessanderbotti commented 4 years ago

Minimal example:

\documentclass{article}

\usepackage{svg}

\begin{document}

\includesvg{MWE}

\end{document}

Test image: MWE.svg

Results:

TeX Live 2018 with "svg 2018/11/12 v2.02b"

OK

TeX Live 2018 with "svg 2019/09/10 v2.03 commit f93c7ca"

OK

TeX Live 2019 (updated up to revision 52317) with "svg 2018/11/12 v2.02b"

Problem with log:

Package svg Info: Calling Inkscape on input line 7.
runsystem(inkscape -z -D --export-latex  --file="MWE.svg.svg" --export-pdf="MWE
.svg_svg-tex.pdf" )...executed.

Package svg Warning: The export with Inkscape failed for file
(svg)                `MWE.svg.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 7.

! Package svg Error: File `MWE.svg_svg-tex.pdf' is missing.

See the svg package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.7 \includesvg{MWE}

TeX Live 2019 (updated up to revision 52317) with "svg 2019/09/10 v2.03 commit f93c7ca"

Problem with log:

runsystem(mkdir -p "./svg-inkscape/")...executed.

Package svg Info: Exporting `./MWE.svg' on input line 7.
runsystem(inkscape "./MWE.svg" --without-gui -D --export-latex --export-pdf="./
svg-inkscape/MWE_svg-latex.pdf" )...executed.

Package svg Info: Last page of `"./svg-inkscape/MWE_svg-latex.pdf"'
(svg)             is `1' on input line 7.
 (./svg-inkscape/MWE_svg-latex.pdf_tex

LaTeX Warning: File `{./svg-inkscape/MWE_svg-latex}.pdf' not found on input lin
e 56.

! Package pdftex.def Error: File `"{./svg-inkscape/""MWE_svg-latex}".pdf' not f
ound: using draft setting.

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.56 ...th=\unitlength,page=1]{MWE_svg-latex.pdf}}
mrpiggi commented 4 years ago

Well, the latest release 2019/10/01 of the LaTeXe kernel raised some issue regarding file name parsing, so this problem is probably related to ho-tex/oberdiek#73 but I'll have a look into svg.sty

As an urgent fix, you can use

\RequirePackage[2018/12/01]{latexrelease}
\documentclass{article}
\usepackage{svg}
\begin{document}
\includesvg{MWE}
\end{document}

but I will try to fix this within the svg package, if possible...

FYI: When using \IfFileExists, the found file is stored to the internal macro \@filef@und and the latest LaTeX kernel encloses the file path in quotes. The package svg relies on this internal command but did not expect quotes. I should be able to fix that...

alessanderbotti commented 4 years ago

Thank you very much for the quick response, I really needed this urgent fix! The following date worked for me:

\RequirePackage[2019/09/30]{latexrelease}

mrpiggi commented 4 years ago

The proposed solution is not a fix but just a workaround... fix pending

mrpiggi commented 4 years ago

The initial MWE should work with v2.02c without the need for package latexrelease. The update was send to CTAN and should be available soon.

alessanderbotti commented 4 years ago

I removed the line \RequirePackage[2019/09/30]{latexrelease} from my document, copied svg.sty version 2.02c (2019-10-10) and confirmed that it solves the problem. Thanks again.

mrpiggi commented 4 years ago

Version v2.02c is now provided to common distributions via CTAN so you should probably delete your local version of package svg in order to use future updates.