I was working with the online version of overleaf and the below code to include svg images worked perfectly fine.
\begin{figure}
\centering
\includesvg[width = 5cm]{FIGURES/Example.svg}
\caption{Example}
\label{fig:Example}
\end{figure}
But now I switched to a local version of overleaf. I have installed the complete version of texlive as suggested here. After the installation when I try to compile my latex file I had errors such as:
Package svg Error: File `Example_svg-tex.pdf' is missing.
and some warnings:
Package svg Warning: You didn't enable `shell escape' (or `write18') so it wasn't possible to launch the Inkscape export for `FIGURES/Example.svg' on input line 127.
I suppressed these errors and warnings by using a latexmkrc
file containing $pdflatex = 'pdflatex --shell-escape %O %S';
as suggested elsewhere. But now I have new warnings:
Package svg Warning: No version of Inkscape was detected by invoking `inkscape -V' so the Inkscape export will fail quite sure as the command is probably unknown to your OS. You could set `inkscapeversion=<version>' manually but this is very unlikely to work on input line 8.
I am sure I have to set up the path of my Inkscape version somewhere, but I am just not sure where.
And I am working on ubuntu.
Best Answer
You must install
inkscape
in theoverleaf
container.In your
overleaf
directory, run./bin/shell
to connect to the container.At the
root
prompt (#
), run:apt update
apt install inkscape
.