1

Is it possible to include SVG code into LaTex? If it's possible how can I do that ? Short Example:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
    <path d="M150 0 L75 200 L225 200 Z" />
</svg>

I do not have a file with extension .svg, and I have access only to its code. For result I want to display svg "image".

Alexis Pigeon
  • 1,519
  • 9
  • 14

1 Answers1

3

You can use svg data inside a tikzpicture:

\documentclass[tikz, border=4pt]{standalone}
\usepackage{amsmath,mathpazo}
\usetikzlibrary{svg.path}

\begin{document}

\begin{tikzpicture}
    \draw svg "M150 0 L75 200 L225 200 Z";
\end{tikzpicture}

\end{document}

tikz svg triangle

kmacinnis
  • 1,655