Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

Is there a way to include svg figures directly into LaTeX? I have only mySVG.svg file and myTex.tex file. The big question is how to include this svg into my file with extension tex. I tried all examples in this forum, but without any results for me.

Important! I have only .svg and .tex file, not .pdf_tex or my svg in pdf format. Is it possible to generate them with latex syntaxis.

Maybe i need something like this (BUT THIS NOT WORKING FOR ME)

 \newcommand{\includesvg}[1]{%
 \executeiffilenewer{MYSVG.svg}{MYSVG.pdf}%
 {inkscape -z -D --file=MYSVG.svg %
 --export-pdf=MYSVG.pdf --export-latex}%

and if this code generate PDF inside in \begin{document}

\begin{figure}
\centering
  \executeiffilenewer{MYSVG.svg}{MYSVG.pdf}{inkscape -z -D --file=MYSVG.svg --export-pdf=MYSVG.pdf}
  \includegraphics[width=\columnwidth]{MYSVG.pdf}
  \caption{FIRST SVG}
  \label{fig:normal} 
\end{figure}
share|improve this question

marked as duplicate by Masroor, Jesse, doncherry, Peter Jansson, Thorsten Jan 17 at 13:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
I suspect the issue is that you don't have inkscape. Or that you're on windows and need to add it to your path. If it's neither of these be sure to run pdflatex --shell-escape myfile.tex so that pdflatex to allow pdflatex to call inkscape. LaTeX CANNOT READ SVG, so you need to convert it somehow, transparently inline using the code you have posted or the SVG package. –  Chris H Jan 17 at 15:28

1 Answer 1

Use the svg package. It requires Inkscape and PDFLatex as well.

SVG package description

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

    
I'll keep silent next time or comment under the question. –  EJG89 Jan 20 at 12:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.