LaTeX forum ⇒ GeneralTransparent Backgrounds Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
rich86

Transparent Backgrounds  Topic is solved

Postby rich86 » Mon Nov 26, 2007 4:14 pm

Hi, i am making a poster in LaTeX using the a0 class. I have made it using a few boxes that have to have a filled background colour, i was going to put a background image as a wallpaper but it doesn't look very good with the text boxes filled in. Does anyone know of a package to allow me to fill with semi-transparent boxes? I think it has something to do with the alpha channel but i cannot find any packages that can do it.

Thanks for any help in advance
Richard
Last edited by rich86 on Mon Nov 26, 2007 11:11 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Transparent Backgrounds

Postby localghost » Mon Nov 26, 2007 4:41 pm

You could do that either with PSTricks (Examples) or with PGF/TikZ (Examples).


Best regards and welcome on Board
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

rich86

Transparent Backgrounds

Postby rich86 » Mon Nov 26, 2007 7:29 pm

Hi thanks for your quick reply,
I tried compiling one of the examples and get these errors:
richard@richards:/tmp$ ls                                                                       
richard@richards:/tmp$ latex color7.tex
This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5)
entering extended mode
(./color7.tex
LaTeX2e <2003/12/01>
Babel <v3.8g> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, croatian, ukrainian, russian, bulgarian, czech, slovak, danish, dut
ch, finnish, french, basque, german, ngerman, greek, monogreek, ancientgreek, i
bycus, hungarian, italian, latin, mongolian, norsk, slovene, estonian, welsh, i
nterlingua, icelandic, uppersorbian, romanian, indonesian, coptic, turkish, ser
bian, polish, portuguese, spanish, catalan, swedish, ukenglish, loaded.
(/usr/share/texmf-texlive/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/share/texmf-texlive/tex/latex/pstricks-add/pstricks-add.sty
(/usr/share/texmf-texlive/tex/latex/pstricks/pstricks.sty
(/usr/share/texmf-texlive/tex/generic/pstricks/pstricks.tex
`PSTricks' v1.12  <2005/10/25> (tvz)
(/usr/share/texmf-texlive/tex/generic/pstricks/pstricks.con))
(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
(/usr/share/texmf-texlive/tex/latex/config/color.cfg)
(/usr/share/texmf-texlive/tex/latex/graphics/dvips.def)))
(/usr/share/texmf-texlive/tex/generic/pstricks-add/pstricks-add.tex
(/usr/share/texmf-texlive/tex/generic/pstricks/pst-plot.tex
 v97 patch 2, 1999/12/12
(/usr/share/texmf-texlive/tex/generic/multido/multido.tex
 v1.41, 2004/05/18 <tvz>))
(/usr/share/texmf-texlive/tex/generic/pstricks/pst-node.tex
 v97 patch 11, 2000/11/09)
(/usr/share/texmf-texlive/tex/latex/xkeyval/pst-xkey.tex
(/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.tex
(/usr/share/texmf-texlive/tex/latex/xkeyval/keyval.tex))))
`pstricks-add' v2.70, 2005/10/18 (hv)))
(/usr/share/texmf-texlive/tex/generic/multido/multido.sty) (./color7.aux)
PSTricks error.  See User's Guide for further information.
                 Type  H <return>  for immediate help.
! Undefined fill style: `transparent'.
\@pstrickserr ... immediate help.}\errmessage {#1}
                                                  \endgroup
l.10 \psset{fillstyle=transparent,linestyle=none}

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

! Package xkeyval Error: `transpalpha' undefined in families `,pstricks-add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.17 }

?

Underfull \hbox (badness 10000) in paragraph at lines 17--18


Underfull \vbox (badness 10000) has occurred while \output is active [1]
[2] (./color7.aux) )
Output written on color7.dvi (2 pages, 3056 bytes).
Transcript written on color7.log.
richard@richards:/tmp$  

Any idea what packages i am missing or what is wrong? it doesn't seem to recognise the transparent option.
I am using TexLive on Linux (ubuntu 7.04)

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Re: Transparent Backgrounds

Postby Juanjo » Mon Nov 26, 2007 9:31 pm

You are using an outdated version of PSTricks. Actualize it.

Just to test if there is other problem, try

\psset{fillstyle=solid,linestyle=none}

instead of

\psset{fillstyle=transparent,linestyle=none}

rich86

Transparent Backgrounds

Postby rich86 » Mon Nov 26, 2007 10:07 pm

i thought about versions after posting and now have PSTricks v1.15a and updated xkeyval PSTricks-add as well. They all seem to be the newest versions on CTAN, and yes i have run sudo texhash so it finds all the updates!
i still get the same output with the same errors something todo with transpalpha not being defined in pstricks-add. here is the specific error that i think it causing the problems:
! Package xkeyval Error: `transpalpha' undefined in families `,pst-3d,pstricks-
add'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.


i have tested pstricks-add and other packages on their own and they seem to work ok.
I am trying to run the 2nd and 3rd ones of the examples on this page

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Transparent Backgrounds

Postby Juanjo » Mon Nov 26, 2007 10:29 pm

It seems that transalpha is defined in the file pstricks-add.tex, located in my computer at

/usr/local/texlive/2007/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex

The relevant code in this file is

%--------------------------------------- small stuff -------------------------------
% transalpha needs a run through latex -> dvips -> ps2pdf14(!) 
% and view with Acrobat >= 5.0
% use transpalpha=<mumber> to the the opacity level
%
\define@key[psset]{pstricks-add}{transpalpha}{\pst@checknum{#1}\pstranspalpha }
%\psset[pstricks-add]{transpalpha=1}
\def\psfs@transparent{%
  \addto@pscode{/Normal .setblendmode \pstranspalpha .setshapealpha }%
  \psfs@solid}


I attach this file. Put it in the same directory as color7.tex and try again.
Attachments
pstricks-add.tex
(98.76 KiB) Downloaded 453 times

rich86

Re: Transparent Backgrounds

Postby rich86 » Mon Nov 26, 2007 10:54 pm

That's sorted thanks very much, seems pstricks-add wasn't being updated to the newest version.
Thanks again

User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Transparent Backgrounds

Postby localghost » Mon Nov 26, 2007 10:55 pm

The current version (v2.91) of pstricks-add defines those transparent colours in another way than older versions did. Unfortunately, the examples on the homepage of PSTricks seem not to be updated. Refer to the documentation of pstricks-add (Section 10 - Color, p. 33ff). There are mentioned some predefined transparent colours. Note that the effect of transparency won't appear until the code is compiled via PS to PDF.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1


Return to “General”

Who is online

Users browsing this forum: No registered users and 10 guests