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 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".

share|improve this question

marked as duplicate by Loop Space, Peter Jansson, Claudio Fiandrino, Stefan Kottwitz Dec 5 '13 at 13:24

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.

1  
Any reason for using the SVG code instead of including a SVG file? After all, a SVG file is just a XML file. –  Alexis Pigeon Dec 5 '13 at 12:38
add comment

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
add comment

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