pgf's and pstricks's opacity is not working
Clash Royale CLAN TAG#URR8PPP
up vote
9
down vote
favorite
I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf) and of pstricks pictures is not working in .ps and .pdf files after rendering (Latex to dvi to ps to pdf).
I've tried in Texstudio, Texmaker, and Kile and the problem occurred with all three editors. I've tried evince and okular and the problem occurred in both viewers. On the other hand in Qtikz and in Texstudio's preview, opacity is working fine for tikz.
I didn't had this problem with all previous TexLive versions.
Here is a minimal example with one tikz and one pstricks image:
documentclass[10pt]article
usepackage[english,greek]babel
usepackage[iso-8859-7]inputenc
usepackagepstricks, pstricks-add
usepackagegraphicx, color
usepackagepgf,tikz
begindocument
begintikzpicture[line cap=round,line join=round,x=0.5cm,y=0.5cm]
clip(-3.6008835336224467,-3.8322994902133702) rectangle (3.6645946388488806,2.9075908995685467);
draw [line width=1.2pt,color=gray,fill=gray,fill opacity=0.25] (0.,0.) circle (0.75cm);
fill[line width=1.6pt,color=blue,fill=blue,fill opacity=0.25] (0.,1.) -- (0.,-1.) -- (2.,-1.) -- (2.,1.) -- cycle;
draw [line width=1.6pt,color=blue] (0.,1.)-- (0.,-1.);
draw [line width=1.6pt,color=blue] (0.,-1.)-- (2.,-1.);
draw [line width=1.6pt,color=blue] (2.,-1.)-- (2.,1.);
draw [line width=1.6pt,color=blue] (2.,1.)-- (0.,1.);
endtikzpicture
bigskip
pssetxunit=0.5cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25
beginpspicture*(-3.6008835336224467,-3.8322994902133702)(3.6645946388488806,2.9075908995685467)
pscircle[linewidth=1.2pt,linecolor=gray,fillcolor=gray,fillstyle=solid,opacity=0.25](0.,0.)0.75
pspolygon[linewidth=1.6pt,linecolor=blue,fillcolor=blue,fillstyle=solid,opacity=0.25](0.,1.)(0.,-1.)(2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](0.,1.)(0.,-1.)
psline[linewidth=1.6pt,linecolor=blue](0.,-1.)(2.,-1.)
psline[linewidth=1.6pt,linecolor=blue](2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](2.,1.)(0.,1.)
endpspicture*
enddocument
The result (in both) should be
but I receive
Any ideas on how to handle this issue?
P.S. Because I have tikz and pstricks in the same document, pfdlatex isn't appropriate to compile.
tikz-pgf pstricks transparency ghostscript ps2pdf
New contributor
add a comment |Â
up vote
9
down vote
favorite
I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf) and of pstricks pictures is not working in .ps and .pdf files after rendering (Latex to dvi to ps to pdf).
I've tried in Texstudio, Texmaker, and Kile and the problem occurred with all three editors. I've tried evince and okular and the problem occurred in both viewers. On the other hand in Qtikz and in Texstudio's preview, opacity is working fine for tikz.
I didn't had this problem with all previous TexLive versions.
Here is a minimal example with one tikz and one pstricks image:
documentclass[10pt]article
usepackage[english,greek]babel
usepackage[iso-8859-7]inputenc
usepackagepstricks, pstricks-add
usepackagegraphicx, color
usepackagepgf,tikz
begindocument
begintikzpicture[line cap=round,line join=round,x=0.5cm,y=0.5cm]
clip(-3.6008835336224467,-3.8322994902133702) rectangle (3.6645946388488806,2.9075908995685467);
draw [line width=1.2pt,color=gray,fill=gray,fill opacity=0.25] (0.,0.) circle (0.75cm);
fill[line width=1.6pt,color=blue,fill=blue,fill opacity=0.25] (0.,1.) -- (0.,-1.) -- (2.,-1.) -- (2.,1.) -- cycle;
draw [line width=1.6pt,color=blue] (0.,1.)-- (0.,-1.);
draw [line width=1.6pt,color=blue] (0.,-1.)-- (2.,-1.);
draw [line width=1.6pt,color=blue] (2.,-1.)-- (2.,1.);
draw [line width=1.6pt,color=blue] (2.,1.)-- (0.,1.);
endtikzpicture
bigskip
pssetxunit=0.5cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25
beginpspicture*(-3.6008835336224467,-3.8322994902133702)(3.6645946388488806,2.9075908995685467)
pscircle[linewidth=1.2pt,linecolor=gray,fillcolor=gray,fillstyle=solid,opacity=0.25](0.,0.)0.75
pspolygon[linewidth=1.6pt,linecolor=blue,fillcolor=blue,fillstyle=solid,opacity=0.25](0.,1.)(0.,-1.)(2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](0.,1.)(0.,-1.)
psline[linewidth=1.6pt,linecolor=blue](0.,-1.)(2.,-1.)
psline[linewidth=1.6pt,linecolor=blue](2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](2.,1.)(0.,1.)
endpspicture*
enddocument
The result (in both) should be
but I receive
Any ideas on how to handle this issue?
P.S. Because I have tikz and pstricks in the same document, pfdlatex isn't appropriate to compile.
tikz-pgf pstricks transparency ghostscript ps2pdf
New contributor
If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
â AndréC
Oct 4 at 17:04
add a comment |Â
up vote
9
down vote
favorite
up vote
9
down vote
favorite
I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf) and of pstricks pictures is not working in .ps and .pdf files after rendering (Latex to dvi to ps to pdf).
I've tried in Texstudio, Texmaker, and Kile and the problem occurred with all three editors. I've tried evince and okular and the problem occurred in both viewers. On the other hand in Qtikz and in Texstudio's preview, opacity is working fine for tikz.
I didn't had this problem with all previous TexLive versions.
Here is a minimal example with one tikz and one pstricks image:
documentclass[10pt]article
usepackage[english,greek]babel
usepackage[iso-8859-7]inputenc
usepackagepstricks, pstricks-add
usepackagegraphicx, color
usepackagepgf,tikz
begindocument
begintikzpicture[line cap=round,line join=round,x=0.5cm,y=0.5cm]
clip(-3.6008835336224467,-3.8322994902133702) rectangle (3.6645946388488806,2.9075908995685467);
draw [line width=1.2pt,color=gray,fill=gray,fill opacity=0.25] (0.,0.) circle (0.75cm);
fill[line width=1.6pt,color=blue,fill=blue,fill opacity=0.25] (0.,1.) -- (0.,-1.) -- (2.,-1.) -- (2.,1.) -- cycle;
draw [line width=1.6pt,color=blue] (0.,1.)-- (0.,-1.);
draw [line width=1.6pt,color=blue] (0.,-1.)-- (2.,-1.);
draw [line width=1.6pt,color=blue] (2.,-1.)-- (2.,1.);
draw [line width=1.6pt,color=blue] (2.,1.)-- (0.,1.);
endtikzpicture
bigskip
pssetxunit=0.5cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25
beginpspicture*(-3.6008835336224467,-3.8322994902133702)(3.6645946388488806,2.9075908995685467)
pscircle[linewidth=1.2pt,linecolor=gray,fillcolor=gray,fillstyle=solid,opacity=0.25](0.,0.)0.75
pspolygon[linewidth=1.6pt,linecolor=blue,fillcolor=blue,fillstyle=solid,opacity=0.25](0.,1.)(0.,-1.)(2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](0.,1.)(0.,-1.)
psline[linewidth=1.6pt,linecolor=blue](0.,-1.)(2.,-1.)
psline[linewidth=1.6pt,linecolor=blue](2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](2.,1.)(0.,1.)
endpspicture*
enddocument
The result (in both) should be
but I receive
Any ideas on how to handle this issue?
P.S. Because I have tikz and pstricks in the same document, pfdlatex isn't appropriate to compile.
tikz-pgf pstricks transparency ghostscript ps2pdf
New contributor
I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf) and of pstricks pictures is not working in .ps and .pdf files after rendering (Latex to dvi to ps to pdf).
I've tried in Texstudio, Texmaker, and Kile and the problem occurred with all three editors. I've tried evince and okular and the problem occurred in both viewers. On the other hand in Qtikz and in Texstudio's preview, opacity is working fine for tikz.
I didn't had this problem with all previous TexLive versions.
Here is a minimal example with one tikz and one pstricks image:
documentclass[10pt]article
usepackage[english,greek]babel
usepackage[iso-8859-7]inputenc
usepackagepstricks, pstricks-add
usepackagegraphicx, color
usepackagepgf,tikz
begindocument
begintikzpicture[line cap=round,line join=round,x=0.5cm,y=0.5cm]
clip(-3.6008835336224467,-3.8322994902133702) rectangle (3.6645946388488806,2.9075908995685467);
draw [line width=1.2pt,color=gray,fill=gray,fill opacity=0.25] (0.,0.) circle (0.75cm);
fill[line width=1.6pt,color=blue,fill=blue,fill opacity=0.25] (0.,1.) -- (0.,-1.) -- (2.,-1.) -- (2.,1.) -- cycle;
draw [line width=1.6pt,color=blue] (0.,1.)-- (0.,-1.);
draw [line width=1.6pt,color=blue] (0.,-1.)-- (2.,-1.);
draw [line width=1.6pt,color=blue] (2.,-1.)-- (2.,1.);
draw [line width=1.6pt,color=blue] (2.,1.)-- (0.,1.);
endtikzpicture
bigskip
pssetxunit=0.5cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25
beginpspicture*(-3.6008835336224467,-3.8322994902133702)(3.6645946388488806,2.9075908995685467)
pscircle[linewidth=1.2pt,linecolor=gray,fillcolor=gray,fillstyle=solid,opacity=0.25](0.,0.)0.75
pspolygon[linewidth=1.6pt,linecolor=blue,fillcolor=blue,fillstyle=solid,opacity=0.25](0.,1.)(0.,-1.)(2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](0.,1.)(0.,-1.)
psline[linewidth=1.6pt,linecolor=blue](0.,-1.)(2.,-1.)
psline[linewidth=1.6pt,linecolor=blue](2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](2.,1.)(0.,1.)
endpspicture*
enddocument
The result (in both) should be
but I receive
Any ideas on how to handle this issue?
P.S. Because I have tikz and pstricks in the same document, pfdlatex isn't appropriate to compile.
tikz-pgf pstricks transparency ghostscript ps2pdf
tikz-pgf pstricks transparency ghostscript ps2pdf
New contributor
New contributor
edited Oct 4 at 12:25
AlexG
31.3k475139
31.3k475139
New contributor
asked Oct 4 at 10:33
Grigorios Kostakos
483
483
New contributor
New contributor
If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
â AndréC
Oct 4 at 17:04
add a comment |Â
If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
â AndréC
Oct 4 at 17:04
If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
â AndréC
Oct 4 at 17:04
If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
â AndréC
Oct 4 at 17:04
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
8
down vote
accepted
Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.
They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.
Enable unsafe mode with the -dNOSAFER
option:
ps2pdf -dNOSAFER myfile.ps myfile.pdf
Of course, this may not be done for PS files of untrusted origin.
Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
â Joseph Wrightâ¦
Oct 4 at 11:36
@joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
â AlexG
Oct 4 at 11:40
@AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
â Grigorios Kostakos
Oct 4 at 12:16
@GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex
,dvips
,ps2pdf
) on the command line.
â AlexG
Oct 4 at 12:20
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
accepted
Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.
They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.
Enable unsafe mode with the -dNOSAFER
option:
ps2pdf -dNOSAFER myfile.ps myfile.pdf
Of course, this may not be done for PS files of untrusted origin.
Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
â Joseph Wrightâ¦
Oct 4 at 11:36
@joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
â AlexG
Oct 4 at 11:40
@AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
â Grigorios Kostakos
Oct 4 at 12:16
@GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex
,dvips
,ps2pdf
) on the command line.
â AlexG
Oct 4 at 12:20
add a comment |Â
up vote
8
down vote
accepted
Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.
They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.
Enable unsafe mode with the -dNOSAFER
option:
ps2pdf -dNOSAFER myfile.ps myfile.pdf
Of course, this may not be done for PS files of untrusted origin.
Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
â Joseph Wrightâ¦
Oct 4 at 11:36
@joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
â AlexG
Oct 4 at 11:40
@AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
â Grigorios Kostakos
Oct 4 at 12:16
@GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex
,dvips
,ps2pdf
) on the command line.
â AlexG
Oct 4 at 12:20
add a comment |Â
up vote
8
down vote
accepted
up vote
8
down vote
accepted
Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.
They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.
Enable unsafe mode with the -dNOSAFER
option:
ps2pdf -dNOSAFER myfile.ps myfile.pdf
Of course, this may not be done for PS files of untrusted origin.
Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.
They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.
Enable unsafe mode with the -dNOSAFER
option:
ps2pdf -dNOSAFER myfile.ps myfile.pdf
Of course, this may not be done for PS files of untrusted origin.
edited Oct 4 at 12:01
answered Oct 4 at 11:25
AlexG
31.3k475139
31.3k475139
Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
â Joseph Wrightâ¦
Oct 4 at 11:36
@joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
â AlexG
Oct 4 at 11:40
@AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
â Grigorios Kostakos
Oct 4 at 12:16
@GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex
,dvips
,ps2pdf
) on the command line.
â AlexG
Oct 4 at 12:20
add a comment |Â
Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
â Joseph Wrightâ¦
Oct 4 at 11:36
@joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
â AlexG
Oct 4 at 11:40
@AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
â Grigorios Kostakos
Oct 4 at 12:16
@GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex
,dvips
,ps2pdf
) on the command line.
â AlexG
Oct 4 at 12:20
Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
â Joseph Wrightâ¦
Oct 4 at 11:36
Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
â Joseph Wrightâ¦
Oct 4 at 11:36
@joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
â AlexG
Oct 4 at 11:40
@joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
â AlexG
Oct 4 at 11:40
@AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
â Grigorios Kostakos
Oct 4 at 12:16
@AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
â Grigorios Kostakos
Oct 4 at 12:16
@GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (
latex
, dvips
, ps2pdf
) on the command line.â AlexG
Oct 4 at 12:20
@GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (
latex
, dvips
, ps2pdf
) on the command line.â AlexG
Oct 4 at 12:20
add a comment |Â
Grigorios Kostakos is a new contributor. Be nice, and check out our Code of Conduct.
Grigorios Kostakos is a new contributor. Be nice, and check out our Code of Conduct.
Grigorios Kostakos is a new contributor. Be nice, and check out our Code of Conduct.
Grigorios Kostakos is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f453780%2fpgfs-and-pstrickss-opacity-is-not-working%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
â AndréC
Oct 4 at 17:04