Graphics, Figures & Tablespst-eps | Basic Example fails

Information and discussion about graphics, figures & tables in LaTeX documents.
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

pst-eps | Basic Example fails

Post by Mini »

Hello,

pst-eps isn't working. Here is the error and the code. Could anyone please help me?

Thanks

Code: Select all

\documentclass{minimal}
\usepackage{pstricks}
\usepackage{pst-eps}
\begin{document}

\psset{checkfile=true}
\PSTtoEPS[bbllx=-1,bblly=-1,bburx=8,bbury=5,checkfile,headers=all,makeeps=all*]{frame.eps}{%
    \psaxes[linewidth=1.2pt, labels=none, ticks=none]{->}(0,0)(-1,-1)(8,5)[$x$,-90][$y$,180]
}
\includegraphics[scale=0.5]{frame}

\end{document} 

Code: Select all

This is pdfTeX, Version 3.1415926-1.40.11 (MiKTeX 2.9)
entering extended mode
(E:\Mini\latex\Test\diagram.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, 
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\minimal.cls"
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) ("C:\Program Files\MiKTeX 2.9\tex\latex\pstricks\pstricks.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks\pstricks.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\pst-xkey.tex"
("C:\Program Files\MiKTeX 2.9\tex\latex\xkeyval\xkeyval.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\xkeyval.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\keyval.tex"))))
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks\pst-fp.tex"
`pst-fp' v0.05, 2010/01/17 (hv))
`PSTricks' v2.13  <2010/11/01> (tvz)
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks\pstricks.con"))
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks\pst-fp.tex")
("C:\Program Files\MiKTeX 2.9\tex\latex\xcolor\xcolor.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvips.def")))
("C:\Program Files\MiKTeX 2.9\tex\latex\pst-eps\pst-eps.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\pst-eps\pst-eps.tex"
 v1.00, 2006/11/04))
No file diagram.aux.
pst-eps: check for file frame.eps
PSTricks error.  See User's Guide for further information.
                 Type  H <return>  for immediate help.
! File `pstricks.pro' not found.
\@pstrickserr ... immediate help.}\errmessage {#1}
                                                  \endgroup 
l.9 }
     
? 

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

pst-eps | Basic Example fails

Post by CrazyHorse »

Mini wrote: pst-eps isn't working. Here is the error and the code. Could anyone please help me?

Code: Select all

\documentclass{minimal}
\usepackage{pstricks}
\usepackage{pst-eps}
\begin{document}

\psset{checkfile=true}
\PSTtoEPS[bbllx=-1,bblly=-1,bburx=8,bbury=5,checkfile,headers=all,makeeps=all*]{frame.eps}{%
    \psaxes[linewidth=1.2pt, labels=none, ticks=none]{->}(0,0)(-1,-1)(8,5)[$x$,-90][$y$,180]
}
\includegraphics[scale=0.5]{frame}

\end{document} 
your code is missing the loading of the packages pst-plot and graphicx

Herbert
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

pst-eps | Basic Example fails

Post by Mini »

Hi,

Thanks for your reply. But it still isn't working (same error, missing pstricks.pro file) :(

Code: Select all

\documentclass{minimal}
\usepackage{pstricks}
\usepackage{pst-eps}
\usepackage{graphicx}
\usepackage{pst-plot}
\begin{document}

\psset{checkfile=true}
\PSTtoEPS[bbllx=-1,bblly=-1,bburx=8,bbury=5,checkfile,headers=all,makeeps=all*]{frame.eps}{%
    \psaxes[linewidth=1.2pt, labels=none, ticks=none]{->}(0,0)(-1,-1)(8,5)[$x$,-90][$y$,180]
}
\includegraphics[scale=0.5]{frame}

\end{document} 
EDIT: I think I fixed my installation (copied pstricks.pro and pst-algparser.pro to current tex file directory) and it compiled fine. But there is no text. Just graphics... Why is this happening and how could I fix it? Thanks a lot!
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

pst-eps | Basic Example fails

Post by CrazyHorse »

Mini wrote:Thanks for your reply. But it still isn't working (same error, missing pstricks.pro file) :(
try this one:

Code: Select all

\documentclass{minimal}
\usepackage{pstricks}
\usepackage{pst-eps}
\usepackage{graphicx}
\usepackage{pst-plot}
\begin{document}

\psset{checkfile=true}
\pstheader{pstricks.pro}
\PSTtoEPS[bbllx=-1,bblly=-1,bburx=8,bbury=5,checkfile,headers=all,makeeps=all*]{frame.eps}{%
    \psaxes[linewidth=1.2pt, labels=none, ticks=none]{->}(0,0)(-1,-1)(8,5)[$x$,-90][$y$,180]
}
\includegraphics[scale=0.5]{frame}

\end{document} 
however, using the apckage auto-pst-pdf and running "pdflatex -shell-escape" should make more sense

Herbert
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Re: pst-eps | Basic Example fails

Post by Mini »

Hi Herbert,

Still doesn't work :(

Any more suggestions?

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

pst-eps | Basic Example fails

Post by CrazyHorse »

Mini wrote: Still doesn't work :(

Any more suggestions?
run this with xelatex:

Code: Select all

\documentclass{minimal}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}(-1,-1)(8,5)
\psaxes[linewidth=1.2pt, labels=none, ticks=none]{->}(0,0)(-1,-1)(8,5)[$x$,-90][$y$,180]
\end{pspicture}

\end{document} 
Herbert
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Re: pst-eps | Basic Example fails

Post by Mini »

Not sure what xelatex is. But when I run that using Latex that I use, it works perfectly...

What I'm trying to do is to export the graphics in pstricks in good quality so I can use it in word.

I would be happy with high quality PNG files too if EPS doesn't work. Do you know how I could do that?

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

pst-eps | Basic Example fails

Post by CrazyHorse »

Mini wrote:Not sure what xelatex is. But when I run that using Latex that I use, it works perfectly...

What I'm trying to do is to export the graphics in pstricks in good quality so I can use it in word.

I would be happy with high quality PNG files too if EPS doesn't work. Do you know how I could do that?
xetex is just like latex, should also be available on your system.
To get a png, use \pagestyle{empty} to get rid of the page number.
What system are you running?

Herbert
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Re: pst-eps | Basic Example fails

Post by Mini »

I'm running Windows XP. Using MIKTEX. Using Winedt for the editor.

How would I get PNG? I want to just get the specific pstricks graphic (not the whole page).

I don't want to convert it to PDF and then PNG because then a lot of quality degradation occurs and it's the whole page (I only want the specific pstricks graphic only).

How would I do this?

Thanks
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

pst-eps | Basic Example fails

Post by frabjous »

Mini wrote:I'm running Windows XP. Using MIKTEX. Using Winedt for the editor.

How would I get PNG? I want to just get the specific pstricks graphic (not the whole page).

I don't want to convert it to PDF and then PNG because then a lot of quality degradation occurs and it's the whole page (I only want the specific pstricks graphic only).

How would I do this?

Thanks
You can convert DVI files to PNG with DVIPNG, which should have come with MiKTeX. (Don't ask me how to use it with Windows except via the command line, however.)

You can convert EPS, PS or PDF to PNG with Ghostscript. (Again, using the command line.) Or if you need a GUI, and want something free/open source, use the GIMP or Inkscape.

There should not be any quality degradation in converting EPS to PDF (-how are you doing it if you are seeing degration?) -- there will be in converting PDF to PNG, but no more so than in converting something else to PNG.

The nice thing about converting to PDF in the meantime is that you can then use pdfcrop to crop the image to just the figure, and don't need to resize the page. Of course if you need to resize the page instead you can do so with the geometry package, or else follow the instructions here.
Post Reply