Document Classes ⇒ Compatibility between "pstricks" and "color" packages
Compatibility between "pstricks" and "color" packages
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.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Compatibility between "pstricks" and "color" packages
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¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Compatibility between "pstricks" and "color" packages
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
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
\documentclass[12pt]{article}
\usepackage[dvipsnames]{pstricks}
\begin{document}
\colorbox[named]{GreenYellow}{\textcolor[named]{BrickRed}{\LARGE \bf Compatibility Issue}}
....