4

I am using this piece of code

\documentclass{article}
\usepackage{pst-map2d}


\begin{document}

{\psset{xunit=0.5, yunit =0.5}
\begin{pspicture}*(-9,-9)(10 ,9)
\WorldMap[maillage = false]
\end{pspicture}}

\end{document}

to generate a simple map; however, when compiling an error regarding GLP Ghostscript says:

Unrecoverable error, exit code 1.

I tried to run the shown code on both PC and MAC but it seems the compilers need extra seetings, or I am not aware of something. Currently, I compile this using LaTeX->DVIPS->PS2PDF.

3isenHeim
  • 2,107
Hugo
  • 165

2 Answers2

2

you have to specify the path where the data files can be found, eg for TeXLive 2013/14 (XXXX) under Linux

\documentclass{article}
\usepackage{pst-map2d}
\begin{document}

\psset{unit=0.5}
\begin{pspicture*}(-9,-9)(10,9)
\WorldMap[path=/usr/local/texlive/XXXX/texmf-dist/tex/generic/pst-geo/data,
  maillage=false]
\end{pspicture*}

\end{document}

You can also use xelatex instead of the sequence latex->dvips->ps2pdf

enter image description here

If you are using Linux, then you can set a link from your documents directory to the data dir. Don't know if this is also possible on Windows and Mac. When using ps2pdf you have to use the optional argument -dNOSAFER otherwise ghostscript won't run external files (for some security reason)

  • Why is it the path needs to be specified explicitly in this case, For eg: PSTricks can access /usr/local/texlive/2012/texmf-dist/doc/generic/pstricks/images/tiger.pdf – texenthusiast May 01 '13 at 07:26
  • that one is used on pdftex level, the path for the data is used by PostScript, in this case by ghostscript for converting it to pdf. And it knows nothing about path setting in TeX –  May 01 '13 at 07:29
  • It is a cumbersome feature. – kiss my armpit May 01 '13 at 09:32
1

For all users who still have a problem with pst-map2d. I came to this page because I received the same error message and found no solution.

Solution: pst-map2d is no longer used. It is included in pst-geo. After deactivating the old package Ghostview does not cause any problems anymore.

Xetal
  • 11