mrpiggi / svg

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

Issue using svg together with tikzscale #5

Closed namezulang closed 6 years ago

namezulang commented 6 years ago

Since the latest release, a problem occured using the svg package together with the tikzscale package.

MWE:

\documentclass{scrreprt}

\usepackage{tikz}
\usepackage{tikzscale}

\usepackage[]{svg}                                 
\svgpath{figures/}      

\begin{document}

\begin{figure}[tb]
    \centering
    \includesvg[width=0.7\linewidth]{figures/test}
\end{figure}

\end{document} 

Compiling the above code fails with following error message:

! LaTeX Error: File `{./svg-inkscape/test_svg-tex}.pdf' not found.

However, the files 'test_svg-tex.pdf' and 'test_svg-tex.pdf_tex' in the 'svg-inkscape' folder are correctly generated.

When commenting out the line '\usepackage{tikzscale}', the error vanishes and the document compiles correctly. The test system used pdfLaTex on Windows and Inkscape 0.92.3.

mrpiggi commented 6 years ago

Well, actually it's an error caused by package tikzscale as it changes the definition of \includegraphics globally. In fact, the whole thing just worked by chance. Nevertheless, I'm going to provide a bugfix release.