# Creating LaTeX figures with Inkscape

December 17, 2018
By

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Updated 2019-07-15

# Motivation

Just to remember the (good?) days when I was TA at college.

# Supply-demand classic figure

For example, consider this classic supply-demand chart (right-click on the image to download the editable svg):

If you’d like to include it in a LaTeX document or presentation you can write the tex formulas in the figure, like this:

You can save the figure as svg and pdf with this options enabled (don’t forget to keep an svg copy):

Finally you can create a pdf like this:

\documentclass{article}

\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{transparent}
\usepackage{import}

\begin{document}

\begin{figure}[h]
\centering
\input{example2.pdf_tex}
\caption{Supply and demand.}
\end{figure}

\end{document}

Check the result here.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.