# Export inkscape formatted figure in a separate pdf

I am using input of pdf_tex files created by Inkscape as recommended, i.e.

\begin{figure}[t]
\centering
\def\svgwidth{0.5\linewidth}
\input{name.pdf_tex}
\caption{Some text.}
\label{name}
\end{figure}


And everything works fine. Now, when all the fonts, equations etc. are correctly in place I need to extract these figures into separate pdf files.

I am aware of preview package but I can't figure out how to handle the code.

You could use the standalone document class:

\documentclass{standalone}
\usepackage{graphicx}

% if you are loading any special fonts / fontsizes in your main document repeat this here

\begin{document}

\def\svgwidth{0.5\linewidth}
\input{filename.pdf_tex}

\end{document}