3

I am using the Tex Live 2013/Debian on my Ubuntu 14.04

I exported an image as PDF in Inkscape (and checked the PDF+Latex option). To include the image in my latex file, I used the following command

\begin{figure}
\centering
\input{2.pdf_tex}
\caption{Flowchart describing our approach.}
\end{figure}

However, on building the .tex in TexMaker, I get the following error

(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded

How can I resolve this issue?

  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Aug 4 '14 at 6:22
  • 2
    Being not familiar with inkscape exporting facilities I can't say something about that, but do you have a \usepackage{xcolor} statement in the preamble of your .tex file? – user31729 Aug 4 '14 at 6:24
  • @ChristianHupfer, thanks. It worked. You can add this as answer. Also, now I feel so dumb about asking such a trivial question. – Shobhit Aug 4 '14 at 6:27
  • In order to 'close' this question I will add it as answer, but do not mind about asking at all, especially for beginners of \LaTeX, we all forgot (and do forget even nowadays) \usepackage commands when being new to \LaTeX. – user31729 Aug 4 '14 at 6:31
2

Since inkscape can export figures as .tex file, it has to put all relevant drawing information as \LaTeX commands, such it needs additional packages as xcolor etc.

Since this exported figure can be included basically anywhere inside of a document via \input, the relevant packages must be loaded of course in the preamble of the document, not in the document body.

This particular question could be solved by stating

\usepackage{xcolor}

For other inkscape exports, there might be more \usepackage - commands necessary, sometimes even with options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.