org 中的 asymptote 代码块的运行问题

我在org文件中绘制 png 文件时,生成的图片很大(我说的不是文件大小,是显示的范围),似乎用了A4的页面,但是生成 pdf、jpg、eps 等其他格式的图片是却是正常的。

例如我在下面代码片段上 C-c C-c

 #+begin_src asymptote :file test.png :exports results
 size(7cm,0);
 pair A=(0,0);
 pair B=(1,0);
 draw("$x$",A--B,PenMargins);
 #+end_src

生成的图片是下面这样的,可以看到有大片的空白,绘制的线段显示在页的左下角(似乎是A4页面):

Asymptote文档中说默认的 papertype 是letter,图会显示在页码布局中部。

By default, Asymptote attempts to center the figure on the page, assuming that the paper type is letter.

但是即使我加上显式设置,绘制出的png页码布局依然是A4的:

 #+begin_src asymptote :file test.png :exports results
 import settings;
 papertype="letter";
 size(7cm,0);
 pair A=(0,0);
 pair B=(1,0);
 draw("$x$",A--B,PenMargins);
 #+end_src

Org-mode 中有两个使用 Asymptote 绘图的例子, 我运行是能正常显示的,没有页面布局的问题。 不知道是不是我上面写的 asymptote 代码片段还缺少什么配置?但其他格式的图片显示又是正常的, 我感到很困惑,请问有谁知道是怎么回事吗?不知道是不是 org-babel-asymptote.el 的 bug!

我还想补充一下,我以前在 org 中用过 asymptote。
以前正常显示的 .png,现在重新运行一边就不正常了 :joy:
我新装了 asymptote , 难道是它的BUG :rofl:

遇到这种不稳定的问题,不能愉快地干活了…

找到把 Org 调用的 Asymptote 的命令(好像 *Messages* 有写),然后自己在命令行执行,应该能确认跟 Org mode 有没有关系。

果然跟 org mode 没关