1

This question already has an answer here:

When using the package transparent for some elements in text, it has a huge side effect: it alters the colors also in any TikZ image of the document.

This is the result without using the package:

\documentclass[border=1cm]{standalone}
%\usepackage{transparent}
\usepackage{tikz}


\begin{document}

Some transparent text.

\begin{tikzpicture}

\draw[fill=yellow,opacity=0.2] (0,0) -- (0,2) -- (2,2) -- (2,0) -- cycle;

\end{tikzpicture}

\end{document}

enter image description here

And this is the result using the package:

\documentclass[border=1cm]{standalone}
\usepackage{transparent}
\usepackage{tikz}

\begin{document}

Some \texttransparent{0.5}{transparent} text.

\begin{tikzpicture}

\draw[fill=yellow,opacity=0.2] (0,0) -- (0,2) -- (2,2) -- (2,0) -- cycle;

\end{tikzpicture}

\end{document}

enter image description here

The correct color for the square is the fist one; the correct transparency for the text is the second one. How to avoid this, having both features at the same time? (Not necessarily using transparent).


This error generates using TeXstudio 2.10.8 (hg 5802:5ee1d048e556), Qt Version 5.5.1, in Ubuntu 16.04 (all packages are up-to-date), with pdflatex -synctex=1 -interaction=nonstopmode %.tex. Here is the logfile.

marked as duplicate by Stefan Pinnow, TeXnician, Community Dec 6 '18 at 19:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    can't reproduce with pdflatex from texlive 2018 – book Dec 6 '18 at 11:54
  • 1
    Which tex distribution do you have? Which engine do you use? – book Dec 6 '18 at 11:55
  • @book I can reproduce this result using pdftex with MikTeX's latest distribution. – Raaja Dec 6 '18 at 11:56
  • 1
    Check the transparent version in the log-file. You need version 2018/11/18 v1.3 for this to work. We just added the necessary compability code. See github.com/ho-tex/oberdiek/issues/19 @Raaja this is for you too. – Ulrike Fischer Dec 6 '18 at 12:22
  • 1
    I'm voting to close this question because it is solved by updating the package. – Stefan Pinnow Dec 6 '18 at 16:02