Saturday, November 22, 2008

Use inkscape and psfrag for including vector graphics in Latex

1. Draw your vector graphics on inkscape . Put text variables (using text tool, for example var_1, var_2, anything!) Save it as *.eps file (don't forget to UN-CHECK all the options of the EPS output).

2. A latex file example

\usepackage{psfrag}
\usepackage{graphicx}
\documentclass{article}

\begin{document}

\begin{figure}[h]
\begin{center}
\psfrag{var_1}{$var_1$}
\psfrag{var_2}{$var_2$}
\includegraphics[width=8cm]{images\your_vector_graphics.eps}
\caption{Test\label{fig:test}}
\end{center}
\end{figure}

\end{document}

3. Compile it!

No comments: