Asymptote 和 Latex 在 Windows 10 笔记本电脑上成功安装和配置,但在具有多个硬盘驱动器的 PC 上会抛出错误。由于用户的工作目录位于不同的驱动器上,因此为搜索路径创建了以下环境变量。已确认正在调用搜索路径。这里缺少什么?
操作系统和软件包:
OS: Windows 10
Miktex v22.10
Asymptote v2.83
Ghostscript v9.56.1
错误:
Error: /undefined in .setfillconstantalpha
搜索路径环境变量:
ASYMPTOTE_DIR C:\Program Files\Asymptote
ASYMPTOTE_HOME %USERPROFILE%\.asy
%用户配置文件%.asy\config.asy
import settings;
outformat="pdf";
Latex 文件test.tex
:
\documentclass{article}
\usepackage{asymptote}
\begin{document}
\begin{center}
\begin{asy}
settings.prc = false;
settings.render = 0;
import three;
size(4cm,0);
// Draw axes
draw(O--2X, blue);
draw(O--2Y, green);
draw(O--2Z, red);
\end{asy}
\end{center}
\end{document}
终端输出:
PS F:\working_dir\latex> pdflatex .\test.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.10) (preloaded format=pdflatex.fmt)
restricted \write18 enabled.
entering extended mode
(test.tex
LaTeX2e <2022-11-01>
L3 programming layer <2022-11-02>
(C:\Program Files\MiKTeX\tex/latex/base\article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(C:\Program Files\MiKTeX\tex/latex/base\size10.clo))
(C:\Users\user1\AppData\Roaming\MiKTeX\tex/latex/asymptote\asymptote.sty
(C:\Program Files\MiKTeX\tex/latex/graphics\keyval.sty)
(C:\Program Files\MiKTeX\tex/latex/base\ifthen.sty)
(C:\Program Files\MiKTeX\tex/latex/graphics\graphicx.sty
(C:\Program Files\MiKTeX\tex/latex/graphics\graphics.sty
(C:\Program Files\MiKTeX\tex/latex/graphics\trig.sty)
(C:\Program Files\MiKTeX\tex/latex/graphics-cfg\graphics.cfg)
(C:\Program Files\MiKTeX\tex/latex/graphics-def\pdftex.def)))
(C:\Program Files\MiKTeX\tex/generic/iftex\ifpdf.sty
(C:\Program Files\MiKTeX\tex/generic/iftex\iftex.sty))
(C:\Program Files\MiKTeX\tex/generic/iftex\ifxetex.sty)
(C:\Users\user1\AppData\Roaming\MiKTeX\tex/generic/catchfile\catchfile.sty
(C:\Users\user1\AppData\Roaming\MiKTeX\tex/generic/infwarerr\infwarerr.sty)
(C:\Users\user1\AppData\Roaming\MiKTeX\tex/generic/ltxcmds\ltxcmds.sty)
(C:\Users\user1\AppData\Roaming\MiKTeX\tex/generic/etexcmds\etexcmds.sty)))
(C:\Program Files\MiKTeX\tex/latex/l3backend\l3backend-pdftex.def)
No file test.aux.
(C:\Program Files\MiKTeX\tex/context/base/mkii\supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (C:\Program Files\MiKTeX\tex/latex/epstopdf-pkg\epstopdf-base.sty
(C:\Program Files\MiKTeX\tex/latex/00miktex\epstopdf-sys.cfg))
Package asymptote Warning: file `test-1.pdf' not found on input line 14.
[1{C:/Users/user1/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}] (test.aux
) )<C:/Program Files/MiKTeX/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on test.pdf (1 page, 9253 bytes).
Transcript written on test.log.
pdflatex: major issue: So far, you have not checked for updates as a MiKTeX user.
终端输出:
PS F:\working_dir\latex> asy -vvv .\test-1.asy
Using configuration directory C:/Users/user1/.asy
Loading config.asy from C:/Users/user1/.asy/config.asy
Using history C:/Users/user1/.asy/history
Welcome to miktex-asy version 2.81
cd \\?\F:\working_dir\latex
Processing test-1
Loading plain from C:/Program Files/Asymptote/plain.asy
Including plain_constants from C:/Program Files/Asymptote/plain_constants.asy
Loading version from C:/Program Files/Asymptote/version.asy
Including plain_strings from C:/Program Files/Asymptote/plain_strings.asy
Including plain_pens from C:/Program Files/Asymptote/plain_pens.asy
Including plain_paths from C:/Program Files/Asymptote/plain_paths.asy
Including plain_filldraw from C:/Program Files/Asymptote/plain_filldraw.asy
Including plain_margins from C:/Program Files/Asymptote/plain_margins.asy
Including plain_picture from C:/Program Files/Asymptote/plain_picture.asy
Loading plain_scaling from C:/Program Files/Asymptote/plain_scaling.asy
Loading simplex from C:/Program Files/Asymptote/simplex.asy
Loading plain_bounds from C:/Program Files/Asymptote/plain_bounds.asy
Including plain_scaling from C:/Program Files/Asymptote/plain_scaling.asy
Including plain_prethree from C:/Program Files/Asymptote/plain_prethree.asy
Including plain_Label from C:/Program Files/Asymptote/plain_Label.asy
Including plain_arcs from C:/Program Files/Asymptote/plain_arcs.asy
Including plain_boxes from C:/Program Files/Asymptote/plain_boxes.asy
Including plain_shipout from C:/Program Files/Asymptote/plain_shipout.asy
Including plain_markers from C:/Program Files/Asymptote/plain_markers.asy
Including plain_arrows from C:/Program Files/Asymptote/plain_arrows.asy
Including plain_debugger from C:/Program Files/Asymptote/plain_debugger.asy
warning [version]: using possibly incompatible version 2.83 of plain.asy
Loading .\test-1.asy from .\test-1.asy
Loading three from C:/Program Files/Asymptote/three.asy
Loading math from C:/Program Files/Asymptote/math.asy
Loading embed from C:/Program Files/Asymptote/embed.asy
Including three_light from C:/Program Files/Asymptote/three_light.asy
Including three_surface from C:/Program Files/Asymptote/three_surface.asy
Loading bezulate from C:/Program Files/Asymptote/bezulate.asy
Loading interpolate from C:/Program Files/Asymptote/interpolate.asy
Loading graph_splinetype from C:/Program Files/Asymptote/graph_splinetype.asy
Including three_margins from C:/Program Files/Asymptote/three_margins.asy
Including three_tube from C:/Program Files/Asymptote/three_tube.asy
Including three_arrows from C:/Program Files/Asymptote/three_arrows.asy
Error: /undefined in .setfillconstantalpha
Operand stack:
1
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false
1 %stopped_push 2015 1 3 %oparray_pop 2014 1 3 %oparray_pop --nostringval-- 1998 1 3 %oparray_pop 1884 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:979/1684(ro)(G)-- --dict:0/20(G)-- --dict:82/200(L)--
Current allocation mode is local
Current file position is 350
MiKTeX GPL Ghostscript 9.25: Unrecoverable error, exit code 1
_shipout(prefix,f,currentpatterns,format,wait,view,t);
^
C:/Program Files/Asymptote/plain_shipout.asy: 116.11: runtime: shipout failed
asy: major issue: So far, you have not checked for updates as a MiKTeX user.