这是一个由这个问题引发的技术问题:使用 xy-pic 弯曲蛇以及关于这个问题的公认答案: 如何在 pdfLaTeX 中使用 PSTricks?
\documentclass{article}
\usepackage[pdf]{pstricks}
\usepackage{pst-node}
\begin{document}
\psset{xunit=1.75cm,yunit=1cm,nodesep=3pt}
\begin{pspicture}(-1,-1)(5,6)
%\psgrid % useful during construction
% put the nodes in- working from the bottom upwards
% bottom row
\psnode(1,0){10}{$0$}
\psnode(2,0){20}{$0$}
\psnode(3,0){30}{$0$}
% second row
\psnode(1,1){cokerl}{coker $\lambda$}
\psnode(2,1){cokerm}{coker $\mu$}
\psnode(3,1){cokern}{coker $\nu$}
% third row
\psnode(0,2){02}{$0$}
\psnode(1,2){L0}{$L_0$}
\psnode(2,2){M0}{$M_0$}
\psnode(3,2){N0}{$N_0$}
\psnode(4,2){42}{$0$}
% fourth row
\psnode(0,3){03}{$0$}
\psnode(1,3){L1}{$L_1$}
\psnode(2,3){M1}{$M_1$}
\psnode(3,3){N1}{$N_1$}
\psnode(4,3){43}{$0$}
% fifth row
\psnode(0,4){04}{$0$}
\psnode(1,4){kerl}{ker $\lambda$}
\psnode(2,4){kerm}{ker $\mu$}
\psnode(3,4){kern}{ker $\nu$}
% sixth row
\psnode(1,5){15}{$0$}
\psnode(2,5){25}{$0$}
\psnode(3,5){35}{$0$}
% horizontal arrows
% 2nd row
\ncline{->}{cokerl}{cokerm}
\ncline{->}{cokerm}{cokern}
% 3rd row
\ncline{->}{02}{L0}
\ncline{->}{L0}{M0}
\nbput{$\alpha_0$}
\ncline{->}{M0}{N0}
\nbput{$\beta_0$}
\ncline{->}{N0}{42}
% 4th row
\ncline{->}{03}{L1}
\ncline{->}{L1}{M1}
\naput{$\alpha_1$}
\ncline{->}{M1}{N1}
\naput{$\beta_1$}
\ncline{->}{N1}{43}
% 5th row
\ncline{->}{04}{kerl}
\ncline{->}{kerl}{kerm}
\ncline{->}{kerm}{kern}
% vertical arrows
\ncline{->}{cokerl}{10}
\ncline{->}{cokerm}{20}
\ncline{->}{cokern}{30}
\ncline{->}{L0}{cokerl}
\ncline{->}{M0}{cokerm}
\ncline{->}{N0}{cokern}
\ncline{->}{L1}{L0}
\nbput{$\lambda$}
\ncline{->}{M1}{M0}
\nbput{$\mu$}
\ncline{->}{N1}{N0}
\nbput{$\nu$}
\ncline{->}{kerl}{L1}
\ncline{->}{kerm}{M1}
\ncline{->}{kern}{N1}
\ncline{->}{15}{kerl}
\ncline{->}{25}{kerm}
\ncline{->}{35}{kern}
\nccurve[angleA=0,angleB=180]{->}{kern}{cokerl}
% npos takes a value between 0 and 1 for \nccurve
\naput[npos=0.1]{$\delta$}
\end{pspicture}
\end{document}
我正在运行 Linux。使用命令进行编译时,pdflatex -shell-escape FILE
我得到以下内容:
[Loading MPS to PDF converter (version 2006.09.02).]
)
! LaTeX Error: Cannot determine size of graphic in a1p7-2011.snake-pics.pdf (no
BoundingBox).
这是我的文件列表:
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
pstricks.sty 2011/04/23 v0.50 LaTeX wrapper for `PSTricks' (RN,HV)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
pstricks.tex 2011/04/23 v2.20 `PSTricks' (tvz,hv)
pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
xkeyval.sty 2008/08/13 v2.6a package option processing (HA)
xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
pst-fp.tex 2011/04/23 v2.20 `PST-fp' (hv)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/message (HO)
ltxcmds.sty 2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
pst-node.sty 2010/04/22 package wrapper for pst-node.tex
pst-node.tex 2011/05/05 1.16 `pst-node' (tvz)
auto-pst-pdf.sty 2009/04/26 v0.6 Wrapper for pst-pdf
ifplatform.sty 2010/10/22 v0.4 Testing for the operating system
pdftexcmds.sty 2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)
catchfile.sty 2011/03/01 v1.6 Catches the contents of a file (HO)
etexcmds.sty 2011/02/16 v1.5 Prefix for e-TeX command names (HO)
a.w18
pst-pdf.sty 2008/10/09 v1.1v PS graphics for pdfLaTeX (RN,HjG)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
preview.sty 2010/02/14 11.86 (AUCTeX/preview-latex)
dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
environ.sty 2008/06/18 v0.2 A new way to define environments
supp-pdf.mkii
a-pics.pdf Graphic file (type pdf)
答案1
我能够使用从您的错误代码中获得的文件名重新创建您的问题:
a1p7-2011.snake-pics.tex
我认为问题在于文件名中有一个句号。尝试将其更改为
a1p72011snakepics.tex
按照注释,确保您的软件包是最新的。\listfiles
在您的前面添加\begin{document}
,并将其与以下输出进行比较。如果不同,那么第一步就是更新您的发行版。
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
pstricks.sty 2011/08/201 v0.51 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex 2011/09/04 v2.23 `PSTricks' (tvz,hv)
pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
xkeyval.sty 2008/08/13 v2.6a package option processing (HA)
xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
pst-fp.tex 2011/09/04 v2.23 `PST-fp' (hv)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/message (HO)
ltxcmds.sty 2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
pst-node.sty 2010/04/22 package wrapper for pst-node.tex
pst-node.tex 2011/08/20 1.20 `pst-node' (tvz)
auto-pst-pdf.sty 2009/04/26 v0.6 Wrapper for pst-pdf
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifplatform.sty 2010/10/22 v0.4 Testing for the operating system
pdftexcmds.sty 2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
catchfile.sty 2011/03/01 v1.6 Catches the contents of a file (HO)
etexcmds.sty 2011/02/16 v1.5 Prefix for e-TeX command names (HO)
myfile.w18
pst-pdf.sty 2008/10/09 v1.1v PS graphics for pdfLaTeX (RN,HjG)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
preview.sty 2010/02/14 11.86 (AUCTeX/preview-latex)
dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
environ.sty 2008/06/18 v0.2 A new way to define environments
supp-pdf.mkii
myfile-pics.pdf Graphic file (type pdf)
编辑:\usepackage[multidot]{grffile}
是一个更简单的解决方案,不需要重命名文件。
答案2
如果文件名确实是罪魁祸首,\usepackage[multidot]{grffile}
应该会有所帮助。无需重命名文件。