Dear All,
Recently I upgrated to MikTek 2.7 version, but have found that I now cannot use package "pstricks" and package "color" simutaneously. My LaTeX file is as follows:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt]{article}
\usepackage{epsfig}
\usepackage{pstricks}
\usepackage{color}
\begin{document}
\colorbox[named]{GreenYellow}{\textcolor[named]{BrickRed}{\LARGE \bf Compatibility Issue}}
\colorbox[named]{GreenYellow}{\textcolor[named]{MidnightBlue}{\LARGE \bf pstricks \& color}}
\begin{pspicture}[linewidth=1cm](4,4)
\psline[linecolor=red](0,0)(4,4)
\psline[linecolor=blue,strokeopacity=0.5](0,4)(4,0)
\psline[linecolor=green,strokeopacity=0.5](0,3.5)(4,3.5)
\psline[linecolor=yellow,strokeopacity=0.5](0,0.5)(4,0.5)
\end{pspicture}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Each time I get an error message when compiling. But I had no problems before I upgrated to MikTek 2.7.
Your help is appreciated.
Document Classes ⇒ Compatibility between "pstricks" and "color" packages
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Compatibility between "pstricks" and "color" packages
The first issue is that you didn't declare the colours you want to use. I don't know if they were predefined by the color package. The second is that the PSTricks package uses xcolor by default. So there may be a collision hence you can omit the color package. You should refer to the documentation of these packages. Instead of PSTricks you can use the pstricks-add package which contains enhancements and bug fixes.
Replace the obsolete epsfig package with the graphicx package. More information about packages and especially their documentations are available on the servers of the CTAN. If all these hints above don't help you should give the exact error message so we can find out more.
Best regards and welcome to the board
Thorsten¹
Replace the obsolete epsfig package with the graphicx package. More information about packages and especially their documentations are available on the servers of the CTAN. If all these hints above don't help you should give the exact error message so we can find out more.
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Compatibility between "pstricks" and "color" packages
Hi Thorsten,
Thnaks for your reply. Yes, you're right. I noticed the error message that the color package clashes with the PSTricks package. Now I use
\usepackage{pstcol}
\usepackage{pstricks-add}
to replace
\usepackage{pstricks}
\usepackage{color}
and it seems that the compatibility issue is resolved. But if I use \usepackage{pstricks-add} only (not together with \usepackage{pstcol}), then the problem remains. I don't why.
Also, thanks for your comment on the graphicx package.
Best regards,
John
Thnaks for your reply. Yes, you're right. I noticed the error message that the color package clashes with the PSTricks package. Now I use
\usepackage{pstcol}
\usepackage{pstricks-add}
to replace
\usepackage{pstricks}
\usepackage{color}
and it seems that the compatibility issue is resolved. But if I use \usepackage{pstricks-add} only (not together with \usepackage{pstcol}), then the problem remains. I don't why.
Also, thanks for your comment on the graphicx package.
Best regards,
John
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Compatibility between "pstricks" and "color" packages
Make sure that you have the latest version of the pstricks-add package (and the xcolor package). If necessary, provide a minimal working example (MWE) that reproduces the error together with the produced log file. To find out the version of the used package, insert a \listfiles command right at the beginning of the source file.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 351
- Joined: Sat Aug 02, 2008 8:47 am
Compatibility between "pstricks" and "color" packages
Code: Select all
Code, edit and compile here:
\documentclass[12pt]{article}\usepackage[dvipsnames]{pstricks}\begin{document}\colorbox[named]{GreenYellow}{\textcolor[named]{BrickRed}{\LARGE \bf Compatibility Issue}}....