LyXlyx and pst-circ, pdf output

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
aot
Posts: 1
Joined: Tue Sep 14, 2010 10:24 am

lyx and pst-circ, pdf output

Post by aot »

Hi,

I'm trying to use pst-circ in lyx to produce some circuit diagrams for my thesis, but running into some difficulties.

just as a test I have inserted the following ERT into my document:

Code: Select all

\begin{pspicture}(0,0)(4,5)
  %node definitions
  \pnode(0,0){A}
  \pnode(4,0){B}
  \pnode(4,4){C}
  \pnode(0,4){D}
  \capacitor(B)(C){$C$}
  \wire(A)(B)
  \wire(C)(D)
  \wire(D)(A)
\end{pspicture}
I can get it to work as post script output, but this messes up the rest of my thesis as there are a lot of eps images that only seem to work with the pdf output so I would like to be able to use that.

I've tried ps4pdf (despite it saying it's deprecated), with

Code: Select all

\usepackage{ps4pdf}
\PSforPDF{\usepackage{pstricks,pst-circ}}
in the preamble and the pspicture code above inside the \PSforPDF macro wrapper, in the generated pdf where the picture is meant to be it says:
Can’t show picture #1 because thesis-pics.pdf not found. Create it from thesis.dvi using dvips and
ps2pdf!
I get a similar result when running the modified example shown here: http://wiki.lyx.org/Examples/PSTricks

There must be something really simple I'm missing out on, any help would be really appreciated? Or is there a way of using pst-pdf with pstricks/pst-circ? To reiterate I need to use pdfLatex for the output as the dvi/postscript output completely messes up all the other figures.

Many Thanks,

Aaron

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

lyx and pst-circ, pdf output

Post by CrazyHorse »

aot wrote: I'm trying to use pst-circ in lyx to produce some circuit diagrams for my thesis, but running into some difficulties.

I can get it to work as post script output, but this messes up the rest of my thesis as there are a lot of eps images that only seem to work with the pdf output so I would like to be able to use that.
you meant pdf images, right?
Load package auto-pst-pdf and then run
pdflatex -shell-escape <file>

The conversion is then done automatically in the background.

The option -shell-escape has to be inserted in your prefences
dialog of LyX

see also: http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput

Herbert
Post Reply