简体   繁体   English

渐近线无法创建 label

[英]Asymptote can not create label

I am making my first steps with the vector program asymptote ( https://asymptote.sourceforge.io ).我正在使用向量程序渐近线( https://asymptote.sourceforge.io )迈出第一步。 During my first tutorials I already encounter an error: I can't put any labels.在我的第一个教程中,我已经遇到了一个错误:我不能放置任何标签。 The following code works fine:以下代码工作正常:

draw((0,0) -- (2,2));

however, if I add a label:但是,如果我添加 label:

draw((0,0) -- (2,2));
label("x", (1,1));

the following error message occurs:出现以下错误消息:

asy -globalwrite -f pdf -o "test.pdf" "test.asy"
    pic.addBox(position,position,min(f),max(f));
              ^
C:\Program Files\MiKTeX/asymptote/plain_Label.asy: 321.15: runtime:

As you can see I am using a Windows (10) operating system with a MiKTeX installation.如您所见,我正在使用带有 MiKTeX 安装的 Windows (10) 操作系统。 The version of Asymptote included in it is:其中包含的 Asymptote 版本为:

asy --version
miktex-asy version 2.69 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]

ENABLED OPTIONS:
WebGL    3D HTML rendering
OpenGL   3D OpenGL rendering
CURL     URL support

DISABLED OPTIONS:
GSL      GNU Scientific Library (special functions)
FFTW3    Fast Fourier transforms
XDR      external data representation (portable binary file format)
Readline interactive history and editing
Editline interactive editing (if Readline is unavailable)
Sigsegv  distinguish stack overflows from segmentation faults
GC       Boehm garbage collector

Can someone help me to fix the error?有人可以帮我解决错误吗? The error message is rather useless.错误消息相当无用。 Any help would be appreciated!任何帮助,将不胜感激!

After some research I found out that the version of Asymptote provided by MiKTeX is not compatible with their own packages.经过一番研究,我发现 MiKTeX 提供的 Asymptote 版本与他们自己的包不兼容。 The solution is actually quite simple: Get an official standalone from https://asymptote.sourceforge.io , then it will work.解决方法其实很简单:从https://asymptote.sourceforge.io获取一个官方的standalone,然后就可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM