I have LaTeX code which works well in Linux, but I need to make it work in Windows.
MWE:
\documentclass[a4paper,12pt]{book}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.svg}
\DeclareGraphicsRule{.svg}{pdf}{.pdf}%
{%
`inkscape -D -z --file=#1 --export-pdf=`dirname #1`/`basename #1 .svg`-svg-converted-to.pdf %
}
\begin{document}
\includegraphics{svg_example}
\end{document}
I found this question: Using macros in \DeclareGraphicsRule statement using shell command which seems to be the same, but commands from its answers don't work because there are not any filepath.
inkscapein your WindowsPATHvariable? Are you running LaTeX with-shell-escape? – schtandard May 01 '19 at 16:18svg. This package takes care of all that and also conveniently places all the generated files in a separate folder. – schtandard May 01 '19 at 17:41