pst-map3d 编译失败:ghostscript 问题?

pst-map3d 编译失败:ghostscript 问题?

受到这篇文章的启发使用 Tikz 包绘制天球(参见最底部的解决方案,编译成功)我尝试编译一些基于 ps-map3d 的类似图(参见ps-map3d带代码的示例)。特别是,我使用了书中的 MWE:Herbert Voss,PSTricks,2016,第 538 页,我将其粘贴在这里:

\documentclass{standalone}
\usepackage{auto-pst-pdf,pst-map3d}

\begin{document}

\definecolor{BlueDark}{cmyk}{1,1,0,0.5}
%
\newpsstyle{Globe}{circles=true,gridmap=true,daynight=false}
\newpsstyle{night}{fillstyle=solid,fillcolor=BlueDark,linecolor=BlueDark,
opacity=0.8}
\psset{Radius=5,Decran=100,Dobs=100,unit=0.5,path=pst-geo/data}
%
\begin{pspicture}(-7,-7)(7,7)
\psframe*[linecolor=BlueDark](-7,-7)(7,7)
%
\psRandomStar[linecolor=yellow!50,randomPoints=100](-7,-7)(7,7){\psframe(-7,-7)(7,7)}
%
\psGlobeTellure[hour=10,Day=1,Month=10,Year=2010](13.297,52.5222){Berlin}
\end{pspicture}
\end{document} 

来自这篇文章pst 新闻 2019,第 4 页:错误消息我知道我必须将 添加到 MWE\usepackage{auto-pst-pdf}以避免出现错误消息。此外,MWE 应该使用 进行编译pdflatex --shell-escape file.tex。编译完成,但没有生成任何输出。日志文件显示 ghostscript (???) 存在问题。

Error: /undefined in .setopacityalpha
....
GPL Ghostscript 9.54.0: Unrecoverable error, exit code 1
system returned with code 256
PDFCROP 1.40, 2020/06/06 - Copyright (c) 2002-2020 by Heiko Oberdiek, Oberdiek Package Support Group.

!!! Warning: Empty Bounding Box is returned by Ghostscript!
!!!   Page 1: 0 0 0 0
!!! Either there is a problem with the page or with Ghostscript.
!!! Recovery is tried by embedding the page in its original size.

同一本书中的另一个较小的 MWE(也是第 538 页)给出了同样的错误:

\documentclass{standalone}
\usepackage{auto-pst-pdf,pst-map3d}

\begin{document}
\psset{unit=0.5,path=pst-geo/data}
\begin{pspicture}(-7,-7)(7,7) \WorldMapThreeD \end{pspicture}\quad
\begin{pspicture}(-7,-7)(7,7) \WorldMapThreeD[RotX=10,RotY=-40] \end{pspicture}
\end{document}

我在 Ubuntu 21.10 上使用 TeX Live 2020/Debian。

不幸的是,我没有能力弄清楚问题是什么。但考虑到它生成的数字非常漂亮,我真的很想使用这个软件包。

非常感谢你的帮助。

答案1

我自己可以提供解决方案:使用以下方法进行编译xelatex file.tex

直接使用就可以了\usepackage{pst-geo},不需要auto-pst-pdf和shell escape。

我无法让第一个 MWE 中的命令\psRandomStar工作,我猜想它不在 pst-geo 包中。除此之外,数字非常漂亮。

相关内容