1

I'm trying to include SVG images with dots/periods in the file name.

\documentclass{article}
\usepackage{svg}
\begin{document}

\includesvg[width=\textwidth]{xgb.clf.output/Images/no.missing.data.Deceased.excluded.max_multiples.10zzDeceasedzz0.5zz0zz0.65zz3_ROC.svg}

\end{document}

I'm compiling thus:

pdflatex -halt-on-error -shell-escape --draftmode tmp.tex

this gives a file not found error, which is obviously not working correctly (after conversion with Inkscape):

! Package pdftex.def Error: File `{./svg-inkscape/no.missing.data.Deceased.excl
uded.max_multiples.10zzDeceasedzz0.5zz0zz0.65zz3_ROC_svg-tex}.pdf' not found: u
sing draft setting.

I've tried

\includesvg[width=\textwidth]{{xgb.clf.output/Images/no.missing.data.Deceased.excluded.max_multiples.10zzDeceasedzz0.5zz0zz0.65zz3_ROC}.svg}

as suggested by

\includegraphics: Dots in filename & https://stackoverflow.com/questions/4344066/allowing-includegraphics-in-latex-to-include-files-with-arbitrary-filenames to no avail, because \includesvg seems to work differently than \includegraphics

I've also tried removing the svg extension, but the error persists.

Using grffile also fails:

\documentclass{article}
\usepackage{svg}
\usepackage{grffile}
\begin{document}

\includesvg[width=\textwidth]{xgb.clf.output/Images/no.missing.data.Deceased.excluded.max_multiples.10zzDeceasedzz0.5zz0zz0.65zz3_ROC.svg}

\end{document}

How can I include SVG with dots in the filename?

con
  • 351
  • 1
  • 3
  • 15

2 Answers2

1

The option inkscapename=outFilename seems tho solve the problem for me.

See svg package documentation in Chapter B.1.3. Setting output folder and file.

\includesvg[width=\textwidth,inkscapename=outFilename]{...}
0

Please update package svg as this issue (https://github.com/mrpiggi/svg/issues/27) was resolved some time ago and I can't replicate your problem with the current version 2020/11/26 v2.02k

mrpiggi
  • 645