Inkscape figures for LaTeX documents

A nice way to create figures for LaTeX documents is the open source program Inkscape. In this quick tutorial I’ll show you how I created most of the figures of my master’s thesis. Inkscape is a powerful program and there are probably more ways to achieve nice figures for LaTeX documents, but I’ll be using the PDF+LaTeX output feature. With this feature, the text in the figure will have the same font as your LaTeX document, and you’re also able to include LaTeX formulas and symbols easily.

The Inkscape file (an FBMC transmitter)

Notice that the text in my Inkscape figure is not centered, it even looks rather unordered. This text will be converted to LaTeX afterwards and centering it is rather a trial and error process. It’s difficult to determine the ideal placement of your text at this stage.

After creating your Inkscape figure (with your LaTeX formulas), you should resize the page: File > Document Properties > Resize page to content… You can set all margins on 5 px for example.

InkscapeSave your document as a pdf: File > Save As, choose a name and set the file type to Portable Document Format (*.pdf). In the next box that pops up, enable the PDF+LaTeX feature.

InkscapeInkscape will save two files: a pdf file and a pdf_tex file. The pdf file contains your drawings, whereas the pdf_tex file contains your LaTeX text. To see what the result looks like, you can use a short LaTeX document. Remember to include all packages you need for the text in the pdf_tex file. In my case, I need to include amssymb because I used \mathbb{C} in my Inkscape figure. For example:

\documentclass[10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{amssymb}
\usepackage{graphicx}
 
\begin{document}
\begin{center}
\input{fbmc_transmitter.pdf_tex} %your pdf_tex file
\end{center}
\end{document}

InkscapeIf you’re creating a presentation, you should use \documentclass[10pt]{beamer} to look at the result. In this case another font is used. The font size is also up to you. Personally, I like to crop the generated pdf file from this example and use this file instead of the pdf_tex and pdf files exported by Inkscape. You can crop pdf files in Adobe Acrobat.

Discuss - No Comments

No comments yet. Why not add one below?

Add a Comment

Your email address will not be published. Note marked required (*) fields.

*


*

Categories