1

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.

BowPark
  • 1,213

0 Answers0