PStricks (Pst-node) 的问题

PStricks (Pst-node) 的问题

我在使用 PStricks 时遇到了问题。当我从此处下载示例文件时

https://tug.org/PSTricks/pst-node/Examples/fnode.tex

然后用Xelatex编译,奇怪的是,在Miktex 2.9版本(通过basic-miktex-20.11-x64.exe安装)下无法得到预期的输出,但旧版本可以。第一张图是正确的,但第二张不正常。

第一张图片

输出不正确

如何在新版本的 Miktex 中修复此问题?

随着最新升级,出现了更多最糟糕的输出(作者:xelatex):

收集输出 错误版本

当然,我们可以使用 pdflatex --shell -escape *.tex +loading自动 pst pdf以获得预期的输出。

[已添加日志文件] 抱歉,我不知道如何附加日志文件。

我尝试在 4 台 PC 和 NB 上运行示例文件,其中两台(PC)可以运行,但其余的(NB)不行。这是日志文件。

This is XeTeX, Version 3.14159265-2.6-0.999992 (MiKTeX 20.12) (preloaded format=xelatex 2020.12.13)  13 DEC 2020 22:21
entering extended mode
**./fnode.tex
(fnode.tex
LaTeX2e <2020-10-01> patch level 2
L3 programming layer <2020-12-07> xparse <2020-03-03>
("C:\Program Files\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex/latex/base\size10.clo"
File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
)
\c@part=\count173
\c@section=\count174
\c@subsection=\count175
\c@subsubsection=\count176
\c@paragraph=\count177
\c@subparagraph=\count178
\c@figure=\count179
\c@table=\count180
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
("C:\Program Files\MiKTeX 2.9\tex/latex/pstricks\pstricks.sty"
Package: pstricks 2020/06/11 v0.70 LaTeX wrapper for `PSTricks' (RN,HV)

("C:\Program Files\MiKTeX 2.9\tex/generic/iftex\iftex.sty"
Package: iftex 2020/03/06 v1.0d TeX engine tests
)
("C:\Program Files\MiKTeX 2.9\tex/latex/xcolor\xcolor.sty"
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)

("C:\Program Files\MiKTeX 2.9\tex/latex/graphics-cfg\color.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: xetex.def on input line 225.

("C:\Program Files\MiKTeX 2.9\tex/latex/graphics-def\xetex.def"
File: xetex.def 2020/08/26 v5.0i Graphics/color driver for xetex
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\pst-xkey.tex"
File: pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)

("C:\Program Files\MiKTeX 2.9\tex/latex/xkeyval\xkeyval.sty"
Package: xkeyval 2014/12/03 v2.7a package option processing (HA)

("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkeyval.tex"
("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkvutils.tex"
\XKV@toks=\toks15
\XKV@tempa@toks=\toks16

("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\keyval.tex"))
\XKV@depth=\count181
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
)))
("C:\Program Files\MiKTeX 2.9\tex/generic/pstricks\pstricks.tex"
("C:\Program Files\MiKTeX 2.9\tex/generic/pstricks\pst-fp.tex"
`pst-fp' v0.05, 2010/01/17 (hv)
\pstFP@xs=\count182
\pstFP@xia=\count183
\pstFP@xib=\count184
\pstFP@xfa=\count185
\pstFP@xfb=\count186
\pstFP@rega=\count187
\pstFP@regb=\count188
\pstFP@regs=\count189
\pstFP@times=\count190
)
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/utilities\pgfutil-common.tex"
\pgfutil@everybye=\toks17
\pgfutil@tempdima=\dimen139
\pgfutil@tempdimb=\dimen140

("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/utilities\pgfutil-common-lists.te
x")) ("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/utilities\pgfkeys.code.tex"
\pgfkeys@pathtoks=\toks18
\pgfkeys@temptoks=\toks19

("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/utilities\pgfkeysfiltered.code.te
x"
\pgfkeys@tmptoks=\toks20
)) ("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/utilities\pgffor.code.tex"
Loading pgffor.code.tex
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmath.code.tex"
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathcalc.code.tex"
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathutil.code.tex"
\pgf@x=\dimen141
\pgf@xa=\dimen142
\pgf@xb=\dimen143
\pgf@xc=\dimen144
\pgf@y=\dimen145
\pgf@ya=\dimen146
\pgf@yb=\dimen147
\pgf@yc=\dimen148
\c@pgf@counta=\count191
\c@pgf@countb=\count192
\c@pgf@countc=\count193
\c@pgf@countd=\count194
\pgfutil@tempcnta=\count195
\pgfutil@tempcntb=\count196
)
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathparser.code.tex"
\pgfmath@dimen=\dimen149
\pgfmath@count=\count197
\pgfmath@box=\box47
\pgfmath@toks=\toks21
\pgfmath@stack@operand=\toks22
\pgfmath@stack@operation=\toks23
)
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfunctions.code.tex"
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfunctions.basic.code.
tex")
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfunctions.trigonometr
ic.code.tex")
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfunctions.random.code
.tex")
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfunctions.comparison.
code.tex")
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfunctions.base.code.t
ex")
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfunctions.round.code.
tex")
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfunctions.misc.code.t
ex")
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfunctions.integerarit
hmetics.code.tex")))
("C:\Program Files\MiKTeX 2.9\tex/generic/pgf/math\pgfmathfloat.code.tex"
\c@pgfmathroundto@lastzeros=\count198
))
\pgffor@iter=\dimen150
\pgffor@skip=\dimen151
\pgffor@stack=\toks24
\pgffor@toks=\toks25
)
\psLoopIndex=\count199

`PSTricks' v3.01  <2020/09/18> (tvz,hv)
\pst@dima=\dimen152
\pst@dimb=\dimen153
\pst@dimc=\dimen154
\pst@dimd=\dimen155
\pst@dimg=\dimen156
\pst@dimh=\dimen157
\pst@dimm=\dimen158
\pst@dimn=\dimen159
\pst@dimo=\dimen160
\pst@dimp=\dimen161
\pst@hbox=\box48
\pst@ibox=\box49
\pst@boxg=\box50
\pst@cnta=\count266
\pst@cntb=\count267
\pst@cntc=\count268
\pst@cntd=\count269
\pst@cntg=\count270
\pst@cnth=\count271
\pst@cntm=\count272
\pst@cntn=\count273
\pst@cnto=\count274
\pst@cntp=\count275
\@zero=\count276
\pst@toks=\toks26
("C:\Program Files\MiKTeX 2.9\tex/xelatex/xetex-pstricks\pstricks.con"
("C:\Program Files\MiKTeX 2.9\tex/generic/pstricks\xdvipdfmx.cfg"))
\psunit=\dimen162
\psxunit=\dimen163
\psyunit=\dimen164
\pst@C@@rType=\count277
\pslinewidth=\dimen165
\psk@startLW=\dimen166
\psk@endLW=\dimen167
\pst@customdefs=\toks27
\pslinearc=\dimen168
\pst@symbolStep=\dimen169
\pst@symbolWidth=\dimen170
\pst@symbolLinewidth=\dimen171
\everypsbox=\toks28
\psframesep=\dimen172
\pslabelsep=\dimen173
\sh@wgridXunit=\dimen174
\sh@wgridYunit=\dimen175
\pst@shift=\dimen176

("C:\Program Files\MiKTeX 2.9\tex/xelatex/xetex-pstricks\pstricks.con"
("C:\Program Files\MiKTeX 2.9\tex/generic/pstricks\xdvipdfmx.cfg"
Using PSTricks configuration for XeTeX+xdvipdfmx
)))
File: pstricks.tex 2020/09/18 v3.01 `PSTricks' (tvz,hv)
 ("C:\Program Files\MiKTeX 2.9\tex/generic/pstricks\pst-fp.tex")
File: pst-fp.tex 2020/09/18 v3.01 `PST-fp' (hv)

>>> Loading XeTeX special macros
("C:\Program Files\MiKTeX 2.9\tex/generic/pstricks\pstricks-xetex.def"))
("C:\Program Files\MiKTeX 2.9\tex/latex/pst-node\pst-node.sty"
Package: pst-node 2012/09/18 v1.01 LaTeX wrapper for `pst-node' (HV)
Package: pst-node 2010/04/22 package wrapper for pst-node.tex

("C:\Program Files\MiKTeX 2.9\tex/generic/pst-node\pst-node.tex"
 v1.42a, 2020/04/01
\psrow=\count278
\pscol=\count279
\psmatrixcnt=\count280
\psrowsep=\skip49
\pscolsep=\skip50
\pst@args=\count281
\num@pts=\count282
\pst@argcnt=\count283
)
File: pst-node.tex 2020/04/01 1.42a `pst-node' (tvz,hv)
)
("C:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-xetex.def"
File: l3backend-xetex.def 2020-09-24 L3 backend support: XeTeX
\g__graphics_track_int=\count284
\l__pdf_internal_box=\box51
\g__pdf_backend_object_int=\count285
\g__pdf_backend_annotation_int=\count286
)
(fnode.aux)
\openout1 = `fnode.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 5.
LaTeX Font Info:    Trying to load font information for TS1+cmr on input line 5
.
 ("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1cmr.fd"
File: ts1cmr.fd 2019/12/16 v2.5j Standard LaTeX font definitions
)
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <17.28> on input line 23.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <12> on input line 23.
 [1

]
(fnode.aux) ) 
Here is how much of TeX's memory you used:
 8446 strings out of 413970
 150807 string characters out of 2878318
 435728 words of memory out of 90161446
 27917 multiletter control sequences out of 15000+200000
 405273 words of font info for 35 fonts, out of 3000000 for 9000
 36 hyphenation exceptions out of 8191
 58i,5n,64p,559b,255s stack positions out of 5000i,500n,10000p,200000b,80000s

Output written on fnode.pdf (1 page).

答案1

该示例不适用于xelatex当前版本xdvipdfmx。它与节点存在一些问题。请使用序列latex-> dvips->ps2pdfpdflatex --shell-escape <file>改为运行:

\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-node}
\usepackage{auto-pst-pdf}
\pagestyle{empty}
\begin{document}
\psset{dimen=middle,subgriddiv=0,griddots=5}
\begin{pspicture}(7,7)\psgrid
  [...]

相关内容