3

I'm creating some slides and want to integrate a (pixel) graphic in a TikZ picture with opacity less than 1. I expect this code to work:

\documentclass{beamer}
\usepackage{tikz,graphicx}

\begin{document}
  \begin{frame}{test}
    \begin{tikzpicture}
      \node[opacity=0.7] at (0,0) 
        {\includegraphics[width=2cm]{example-image.png}};
      \node at (4,0) {Some text};
    \end{tikzpicture}
  \end{frame}
\end{document}

Unfortunately, the whole picture vanishes:

enter image description here

Note that the same TikZ code works as expected with article. If I use opacity=0.7 on a text node, not the image, it also works.

What to do?

I use Evince and pdflatex from TeXlive 2013 on GNU/Linux in case that's relevant.

  • Here, the result of your MWE is correct! (the transparent image on the left of "some text"). Have you tried to update your distribution? – Paul Gaborit Jul 18 '14 at 11:42
  • I have beamer 3.33 and tikz 3.0.0. Will run an upgrade... – Raphael Jul 18 '14 at 12:50
  • @PaulGaborit Ah, turns out I lied; I'm still on 2013. I'll have to perform a full reinstall which is inopportune right now. I'll check back when I've upgraded. – Raphael Jul 18 '14 at 13:17
  • @PaulGaborit Unless I forget: thanks for checking! – Raphael Jul 18 '14 at 13:22
2

Not exactly the same as the minimum example, but it turns out this can also happen if the transparent package is loaded.

Removing the transparent package from my document caused the opacity setting for tikz nodes to work as expected.

1

Upgrading to TeXlive 2014 (with the latest packages as of today) solved the problem.

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.