Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 2.0.5.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[twocolumn,english,hebrew]{article}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[T1]{fontenc}
\usepackage[cp1255]{inputenc}
\setlength{\parindent}{0bp}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\def\@outputdblcol{%
  \if@firstcolumn
    \global \@firstcolumnfalse
    \global \setbox\@leftcolumn \box\@outputbox
  \else
    \global \@firstcolumntrue
    \setbox\@outputbox \vbox {%
      \hb@xt@\textwidth {%
      \kern\textwidth \kern-\columnwidth %**
      \hb@xt@\columnwidth {%
         \box\@leftcolumn \hss}%
      \kern-\textwidth %**
      \hfil
      {\normalcolor\vrule \@width\columnseprule}%
      \hfil
      \kern-\textwidth  %**
      \hb@xt@\columnwidth {%
         \box\@outputbox \hss}%
      \kern-\columnwidth \kern\textwidth %**
    }%
  }%
  \@combinedblfloats
  \@outputpage
  \begingroup
  \@dblfloatplacement
  \@startdblcolumn
  \@whilesw\if@fcolmade \fi
  {\@outputpage
    \@startdblcolumn}%
  \endgroup
  \fi
}
\@mparswitchtrue

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[crop=off]{auto-pst-pdf}
\usepackage{pstricks}

\makeatother

\usepackage{babel}
\begin{document}
\pscircle(0,0){1}
\end{document}
share|improve this question

1 Answer 1

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

\usepackage{auto-pst-pdf}
\usepackage{pstricks}

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

\begin{pspicture}(-1,-1)(1,1)
\pscircle(0,0){1}
\end{pspicture}

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 at 12:00
1  
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 at 12:04
1  
see also the answer to tex.stackexchange.com/questions/144427/… –  Herbert Jan 9 at 12:11
    
Still, id doesn't work...:-( –  Yoar Jan 9 at 13:28
1  
ok, then try \usepackage[crop=off]{auto-pst-pdf}. Maybe you have no Perl installed. –  Herbert Jan 9 at 14:48

Your Answer

 
discard

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.