I am inserting an image from Inkscape using the pdf + LaTeX option since I want the text to appear in the same font and size as in the rest of my document.

Can I change the color of the text?


Some text before the figure.


 \caption{Example Figure}

Some text after the figure.

The following is the content of the figure.pdf_tex file:

    \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%
    \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%
      \setlength{\unitlength}{\unitlength * \real{\svgscale}}%

The example figure as jpg

  • 1
    doesn't \color{red} work? If not please post a small example Feb 18, 2014 at 14:02
  • If the text is already in the image, no. Feb 18, 2014 at 14:27
  • @JohnKormylo well no of course but the pdf+latex option writes the image as an image with the text as a tex fragment to overlay the image. Feb 18, 2014 at 14:31
  • 1
    Huh. Can one then separate and edit the tex fragment? Feb 18, 2014 at 14:38
  • @DavidCarlisle: That only changes the text color of the text that comes after the figure.
    – Bettina
    Feb 18, 2014 at 14:52

1 Answer 1


The figure envirnoment always resets the color to the document default, normally black so you need the \color command inside the environment.


That will make any text in the environment including the caption go red.

Then inkscape has hardwired the colors of the text


so if you want it to pick up the current color you need to remove the


or alternatively redefine the command to do nothing after you have set your color so


will set red then disable any other \color commands in the figure so you don't need to edit the generated file.

  • Can I change the color that inkscape hardwires into the pdf_tex file? (This is not really a LaTeX question, but would also solve my problem)
    – Bettina
    Feb 18, 2014 at 15:16
  • Including ´\color{red}\renewcommand\color[2][]{}´in the figure solves my problem. Now, when I include the caption package it will even leave my caption black.
    – Bettina
    Feb 18, 2014 at 15:40
  • @Bettina possibly, I've never used inkscape though, so don't ask me:-) Feb 18, 2014 at 15:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .