0

I try to insert a SVG file into my LaTeX document with this code:

In my main file:

\documentclass[12pt, twoside]{book}
\usepackage{multicol}
\usepackage{svg}
\svgsetup{
    inkscape=pdf,
    inkscapeexe={/usr/bin/inkscape -z -C}
}
\chapter{Additional Informations}

\subfile{../chapters/10/chapter-title/content.tex}

\end{document}

In my subfile:

\documentclass[../../../../book/main.tex]{subfiles}
\pagebreak

\begin{document} \section*{Exchange rates} \begin{multicols}{2} ...

\begin{figure}[H]
    \includesvg[width=136mm]{chart.svg}
\end{figure}

...

\end{multicols} \end{document}

I get this result:

includesvg

You didn't enable shell escape' (orwrite18') (svg) so it wasn't possible to launch the Inkscape export (svg) for ../chapters/10/chapter-title/chart.svg'. LaTeX Package svg: Filechart_svg-tex.pdf' is missing. LaTeX Package svg: File `chart_svg-tex.pdf_tex' is missing. LaTeX

I checked this question, but none of these answers helped.

I see other soultions for convert SVG files into PDF online or other tools, but it seems to a little dirty solutions for me. I want to use a clean and simle way.

Basically I don't have any settings.json file in my project, but if it's need I can create it.

Any idea how can I use SVG files into my LaTeX project?

netdjw
  • 143

1 Answers1

0

Click the gear icon on the left button side to open the setting page.

click the tab "working space" and search the word "latex-workshop.latex.tools".

There will show the only option start with sentance "Define LaTeX compiling tools to be used in recipes. Each tool is labeled by its name.".

click the link "editing in setting.json", and your vscode will open a json that you expect.