TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.

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
up vote 3 down vote accepted

You can use svg data inside a tikzpicture:

\documentclass[tikz, border=4pt]{standalone}


    \draw svg "M150 0 L75 200 L225 200 Z";


tikz svg triangle

share|improve this answer

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