TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using LyX (at Windows) and I'm trying to get pdf file output while I have PSTricks code (I put as \ERT.
I Try to write at the preamble things like: \usepackage[off]{auto-pst-pdf} and \usepackage[pdf]{pstricks}, but it still don't compile to pdf file output. (also ps4pdf doesn't help...).

Can you tell me how can I do it?

Thank you!

Here is the code:

 % Preview source code

%% LyX created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
    \global \@firstcolumnfalse
    \global \setbox\@leftcolumn \box\@outputbox
    \global \@firstcolumntrue
    \setbox\@outputbox \vbox {%
      \hb@xt@\textwidth {%
      \kern\textwidth \kern-\columnwidth %**
      \hb@xt@\columnwidth {%
         \box\@leftcolumn \hss}%
      \kern-\textwidth %**
      {\normalcolor\vrule \@width\columnseprule}%
      \kern-\textwidth  %**
      \hb@xt@\columnwidth {%
         \box\@outputbox \hss}%
      \kern-\columnwidth \kern\textwidth %**
  \@whilesw\if@fcolmade \fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.


share|improve this question

the problem is the missing optional argument -shell-escape for pdflatex. You can add it with Tools->Setup->File->Converter->LaTeX (pdflatex)

enter image description here

Then you need only in the preamble


and, of course, but the PSTricks stuff into the pspicture environment:


However, using xelatex instead makes it easier, no need for package auto-pst-pdf

share|improve this answer
It's still doesn't work.... – Yoar Jan 9 '14 at 12:00
maybe that it doesn't save the option. Reconfigure and restart LyX and have a look. If the option is not present, then there is a problem with LyX. Under Linux the option is saved in ~/lyx/lyxrc.default You can edit also this file. – Herbert Jan 9 '14 at 12:04
see also the answer to tex.stackexchange.com/questions/144427/… – Herbert Jan 9 '14 at 12:11
Still, id doesn't work...:-( – Yoar Jan 9 '14 at 13:28
ok, then try \usepackage[crop=off]{auto-pst-pdf}. Maybe you have no Perl installed. – Herbert Jan 9 '14 at 14:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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