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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- 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
-
CrazyHorse
- 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}}
....