Creating LaTeX figures with Inkscape

Latex
Inkscape
Searching keywords and patterns in the TV show.
Author

Mauricio “Pachá” Vargas S.

Published

December 18, 2018

Updated 2022-05-28: I moved the blog to Quarto, so I had to update the paths.

Motivation

Just to remember the (good?) days when I was TA in undegrad.

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.

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.

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

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.