I'm trying to take a given figure, make it a little whiter and put the result in the middle of the page under the text, using the package background.
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{background}
\begin{document}
\SetBgContents{
\begin{tikzpicture}
\node(0,0) {\includegraphics[scale=.1]{logo}};
\node(0,0)[fill opacity=.5,fill=black]
{\phantom{\includegraphics[scale=.1]{logo}}};
\end{tikzpicture}
}
\SetBgOpacity{1}\SetBgAngle{0}\SetBgScale{1}\SetBgPosition{current page.north}\SetBgAnchor{below}
text
\phantom{
\begin{tikzpicture}
\node(0,0)[fill opacity=.5,fill=black]{a};
\end{tikzpicture}}
\end{document}
Works for me and produces
What's all that stuff with \phantom
? I hear you. But that's MY question! (the first phantom is to make my life easy so that the box will cover the image) If I remove the second phantom (and its argument of course) the transparency no longer works. I get the following:
That's right, no longer transparent! I have no idea why this is...Any help??
(As if things are not strange enough, the fill opacity have to be the same for the this to work, i.e. even with the \phantom, if the fill opacity is different, the image is hidden!)
\SetBgColor{black}\SetBgOpacity{1}\SetBgAngle{0}\SetBgScale{1}
then the backgrounded version is exactly the same as the non-backgrounded version (to my eyes).\SetBgContents
(instead of\SetBgContent
, which isn't defined for me).\SetBgContent(s)
. @Yossi: Maybe you could post the full document and the image?