mrpiggi / svg

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

Including files with "double extensions" or dots in their path #27

Closed LeCyberDucky closed 4 years ago

LeCyberDucky commented 4 years ago

Hi,

so, I'm having some trouble trying to include files with a bit of a funky extension. Specifically, I'm trying to include svg files ending in drawio.svg. I'm trying to do that like this:

\begin{figure}[H]
    \centering
    \includesvg[width=0.8\linewidth]{"Figures/Chapter 3/Software structure.drawio"}
    \caption[Overall software structure of the solution]{Software structure}
    \label{fig:3_Software_structure}
\end{figure}

This gives me this error: Package pdftex.def: File `{./svg-inkscape/Software structure.drawio_svg-tex}.pdf' not found: using draft setting.

The files shown below are created, however:

image

I have tried doing this in a lot of different ways, like using " or {} in different places or removing and adding extensions in different places, but nothing works. I have also tried specifying svgextension like this:

\begin{figure}[H]
    \centering
    \includesvg[width=0.8\linewidth, svgextension=drawio.svg]{"Figures/Chapter 3/Software structure"}
    \caption[Overall software structure of the solution]{Software structure}
    \label{fig:3_Software_structure}
\end{figure}

But this gives me these errors: Package svg: File `Software structure.drawio.svg_drawio.svg-tex.pdf' is missing.

Package svg: File `Software structure.drawio.svg_drawio.svg-tex.pdf_tex' is missing.

I'm not sure why this causes it to seemingly look for a double (quadruple?) extension.

Is there any good way to solve this, except for renaming the files in question?

mrpiggi commented 4 years ago

Actually, this issue has been addressed by a commit long time ago (https://github.com/mrpiggi/svg/commit/fa84fbde2b67ed31e13ad65ad5acd27d88ba2a7f). But the LaTeX-Kernel had some updates afterwards, which were discussed under https://github.com/ho-tex/grffile/issues/1#issuecomment-539082437 and https://github.com/latex3/latex2e/issues/204 but obviously, these changes have broken package svg. Seems, that I missed something, probably these changes: https://github.com/latex3/latex2e/commit/a62aa124b4a792118b7e8af39a484f504b8253fa#diff-5569b5624d56ea5e7833abeff10e9704L1055-R1106

A hotfix is on it's way to CTAN.