Is there any way in the LaTeX style / class file to determine which output device is being used (or at least what features it has)? The reason is because I am writing a class file in which I want to use some PostScript-specific packages (for example pstricks) if Postscript is available, but if I just write
\RequirePackage{pstricks}
then, of course, bad things happen if I compile a document with pdflatex. Therefore, ideally, I am looking for something that I can use, for example
\if@postscriptokay\RequirePackage{pstricks}\fi
It seems that this should be possible because I know that packages like pgfcan change their behavior to use the appropriate graphic commands based on the output device, but I did some Google searches and checked in my LaTeX book and in the harbors , t found a way.
source
share