PSTricks 在文档中不起作用,但在最小示例中不起作用

PSTricks 在文档中不起作用,但在最小示例中不起作用

我正在尝试使用 pstricks 在我的论文中获取图片。我尝试从 LatexDraw 运行一些代码,但当这不起作用时,我尝试从这里获取最小示例来运行: PSTricks 图片无法用 pdfLaTeX 编译

如果我仅将此代码放入文件中并运行,pdflatex --shell-escape test.tex它会按预期工作。但是,如果我将其复制到我的论文中,它会失败并显示以下错误消息:

  -------------------------------------------------
  auto-pst-pdf: Auxiliary LaTeX compilation
  -------------------------------------------------
  This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
  entering extended mode
  This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
  ' TeX output 2013.10.10:1955' -> gliederung-autopp.ps
  </usr/local/texlive/2012/texmf/dvips/base/tex.pro>
  </usr/local/texlive/2012/texmf/dvips/config/alt-rule.pro>
  </usr/local/texlive/2012/texmf-dist/dvips/pstricks/pstricks.pro>
  </usr/local/texlive/2012/texmf-dist/dvips/pstricks/pst-algparser.pro>
  </usr/local/texlive/2012/texmf-dist/dvips/pst-tools/pst-tools.pro>
  </usr/local/texlive/2012/texmf-dist/dvips/pstricks/pst-dots.pro>
  </usr/local/texlive/2012/texmf/dvips/base/special.pro>. [1]
  Error: /typecheck in --div--
  Operand stack:
     1   0   0.0   -0.0478856   a   65781.8
  Execution stack:
     %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1894   1   3   %oparray_pop   1893   1   3   %oparray_pop   1877   1   3   %oparray_pop   1771   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   --nostringval--   4   --nostringval--   %repeat_continue   --nostringval--
  Dictionary stack:
     --dict:1158/1684(ro)(G)--   --dict:0/20(G)--   --dict:117/200(L)--   --dict:99/300(L)--
  Current allocation mode is local
  Last OS error: 2
  Current file position is 84788
  GPL Ghostscript 9.05: Unrecoverable error, exit code 1
  PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.

  !!! 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.

有人知道该怎么做吗?我添加了序言,以防其中出现任何奇怪之处。

\documentclass[bigchapter,twoside,report,11pt,type=bsc,colorback,accentcolor=tud2c]{tudthesis}
\usepackage{ngerman}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{amsmath}

\usepackage{microtype}
\usepackage[ngerman,pdfview=FitH,pdfstartview=FitV]{hyperref}

%\usepackage{pgfplots}
%\pgfplotsset{compat=newest}

%\KOMAoptions{cleardoublepage=realempty}

\usepackage{bibgerm}
\usepackage{listings}
\usepackage{inconsolata}
%\usepackage[T1]{fontenc}
\lstset{framextopmargin=50pt,frame=bottomline}
\lstset{language=Matlab,
   %keywords={break,case,catch,continue,else,elseif,end,for,function,
      %global,if,otherwise,persistent,return,switch,try,while},
   basicstyle=\ttfamily,
   breaklines=true,
   keywordstyle=\color{tud1c},
   commentstyle=\color{tud9c},
   stringstyle=\color{tud4c},
   numbers=left,
   numberstyle=\tiny\color{tud0c},
   stepnumber=1,
   numbersep=5pt,
   backgroundcolor=\color{white},
   tabsize=4,
   showspaces=false,
   showstringspaces=false}

 \usepackage[pdf]{pstricks}

相关内容