Creating LaTeX figures with Inkscape

[This article was first published on Pachá, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
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):

Example 1: Upper-scripts made with inkscape options.

Example 1: Upper-scripts made with inkscape options.

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

Example 2: Upper-scripts made with LaTeX formulas in inkscape.

Example 2: Upper-scripts made with LaTeX formulas in inkscape.

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

PDF exporting options.

PDF exporting options.

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.

To leave a comment for the author, please follow the link and comment on their blog: Pachá.

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.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)