1

I have a Latex-file with some \psplots and \includegraphics commands. When I compile with LaTeX->PS->PDF the \psplots are okay but I get the error message

cannot determine the size of graphic in fig5.jpg 

And fig5 is much to big. And also some characters f.E \ding{46} are printed not correctly.

When I compile directly Latex->PDF I only get the right size of Fig5.jpg but no drawings from the plots. The \ding{46} is correct.

I use the latest versions of MikTeX, TexnicCenter and GhostScript (I updated the today)

What is wrong?

MWE:

\documentclass[a4paper,11pt]{article} 
\usepackage{graphicx} 
\usepackage{pstricks} 
\usepackage{pst-plot} 
\usepackage{pifont} 
\usepackage{marvosym} 
\begin{document} 
\begin{pspicture}(0,0)(6,6) 
\psset{xunit=30pt, yunit=3pt} 
\psgrid[Ox=0, Oy=0, xunit=1, yunit=10,subgriddiv=1,griddots=10,gridlabelcolor=white](0,0)(0,0)(6,6) 
\psaxes[Dx=1,Dy=10,linewidth=1pt,ticksize=4pt](0,0)(0,0)(6,60) \psplot[plotpoints=200, algebraic=true, linewidth=2pt]{0}{3}{3*x^2+4} 
\end{pspicture} 
\\ 
\\ 
\ding{46} 
\\ 
\includegraphics[width={\textwidth}]{fig5.jpg} 
\end{document}
6
  • 1
    Welcome to TeX.SX! JPG/PDF/PNG images and \psplot will not work together. Please convert the image to EPS and run LaTeX -> PS -> PDF. – Jagath Jul 27 '13 at 15:24
  • Does that \psplot command come from »PSTricks«? If so, try the »auto-pst-pdf« package and pay special attention to the remarks in its manual regarding -shell-escape. If that doesn't help, please prepare a self-contained and minimal example. – Thorsten Donig Jul 27 '13 at 15:43
  • Welcome to TeX.SX! Maybe tex.stackexchange.com/q/1072/21591 is helpful here. – mafp Jul 27 '13 at 15:44
  • \documentclass[a4paper,11pt]{article} \usepackage{graphicx} \usepackage{pstricks} \usepackage{pst-plot} \usepackage{pifont} \usepackage{marvosym} \begin{document} \begin{pspicture}(0,0)(6,6) \psset{xunit=30pt, yunit=3pt} \psgrid[Ox=0, Oy=0, xunit=1, yunit=10,subgriddiv=1,griddots=10,gridlabelcolor=white](0,0)(0,0)(6,6) \psaxes[Dx=1,Dy=10,linewidth=1pt,ticksize=4pt](0,0)(0,0)(6,60) \psplot[plotpoints=200, algebraic=true, linewidth=2pt]{0}{3}{3*x^2+4} \end{pspicture} \\\ding{46} \\includegraphics[width={\textwidth}]{fig5.jpg} \end{document} – Bert Booltink Jul 27 '13 at 16:38
  • I have found the solution. compile with xelatex->PDF and everything went alright Thanks – Bert Booltink Jul 27 '13 at 17:05

Browse other questions tagged or ask your own question.