
我買了一台新電腦,最近在上面安裝了 Asymptote。我將它與 Texmaker 一起使用。我遇到的問題是,每當我使用 Asymptote 生成圖像時,它都會佔據整個頁面,而不是被裁剪以佔據圖像的空間。我該如何解決這個問題?
編輯:我發現當圖像有任何標籤時會發生這種情況,但是當圖表的任何部分都沒有標籤時圖像會調整為正常大小。
例如,
Sentence 2
\begin{asy}
unitsize(0.4 cm);
draw(circle((0,0), 2));
draw(circle((0,0), 4));
draw(circle((0,0), 6));
dot("$O$", (0,0));
\end{asy}
sentence 2
在 PDF 中建立完整頁面大小的圖像(圓圈大小正確,但圖像的其餘部分填充了空白),導致句子 1 和句子 2 位於不同的頁面上,並且
sentence 1
\begin{asy}
unitsize(0.4 cm);
draw(circle((0,0), 2));
draw(circle((0,0), 4));
draw(circle((0,0), 6));
dot((0,0));
\end{asy}
sentence 2
創建我想要的圖像,以便所有內容都在一個頁面上,只是缺少標籤。
完整的 .asy 檔案是
if(!settings.multipleView) settings.batchView=false;
settings.tex="pdflatex";
defaultfilename="fileNameHere";
if(settings.render < 0) settings.render=4;
settings.outformat="";
settings.inlineimage=true;
settings.embed=true;
settings.toolbar=false;
viewportmargin=(2,2);
unitsize(0.4 cm);
draw(circle((0,0), 2));
draw(circle((0,0), 4));
draw(circle((0,0), 6));
dot("$O$", (0,0));