1

I am trying to use pdflatex --shell-escape to compile a .tex file. But I need to use pstricks with the [pdf] option.

inside the .sty file it includes inside pst-all \RequirePackage{pst-all,pst-blur,multido}

How do I send pstricks the [pdf] option?

Of course you know this is the call inside pst-all.sty

...

%% Public License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
\ProvidesPackage{pst-all}[2008/01/01 the main pstricks tools]
\RequirePackage{pstricks}  % important
% this loads the xcolor package and pstricks in the right order
% and does some modification to the color handling. Look at the
% doc for the options. 

....

2

Before \documentclass you can say

\PassOptionsToPackage{options}{package}

or you can just say

\RequirePackage[options]{package}

But unless the package is being loaded by your document class, it is simpler to just say

\usepackage[options]{package}

earlier in the preamble i.e. load pstricks before pst-all.

\usepackage[pdf]{pstricks}
\usepackage{pst-all}

Since pst-all is not passing options to pstricks, you should not get complaints about conflicting options etc.

1

or use

\usepackage{auto-pst-pdf}
\usepackage{pst-all}
1

Much simpler:

\documentclass[…, pdf]{…}    
\usepackage{pst-all}

The document class proposes every option it doesn't know to all subsequently loaded packages, and similarly, pst-all will propose the pdf option to every package it loads, among which pstricks.

  • Ok thanks, the pdf option to the document worked. Now it's giving me odd behaviour but that's not the problem... – daemondave Nov 16 '14 at 6:49
  • @daemondave: Do you mean an odd behaviour with respect to what happens in the latex -> dvips -> pstopdf cycle? – Bernard Nov 16 '14 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.