我已遵循接受的答案这个问题使用该选项在没有 GUI 的环境中调用 Asymptote -offscreen
。但它在以下文件上失败:
texpreamble("
\newcommand{\definiteintegral}[4]{\int_{#1}^{#2}\,#3\,d#4}
\newcommand{\myequation}[2]{#1\amp =#2}
\newcommand{\indefiniteintegral}[2]{\int#1\,d#2}
\newcommand{\testingescapedpercent}{ \% }
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
");
// Riemann surface of z^{1/n}
import graph3;
import palette;
int n=3;
size(200,300,keepAspect=false);
currentprojection=orthographic(10,10,5);
currentlight=(10,10,5);
triple f(pair t) {return (t.x*cos(t.y),t.x*sin(t.y),t.x^(1/n)*sin(t.y/n));}
surface s=surface(f,(0,0),(1,2pi*n),8,16,Spline);
s.colors(palette(s.map(zpart),Rainbow()));
draw(s,meshpen=black,render(merge=true));
详细输出的最后两行是:
Offscreen context settings: Depth=0 Stencil=0 Accum=0
Error initializing offscreen context: Depth=0