![fontspec 包和 asymptote 之间的兼容性问题](https://linux22.com/image/295632/fontspec%20%E5%8C%85%E5%92%8C%20asymptote%20%E4%B9%8B%E9%97%B4%E7%9A%84%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98.png)
fontspec
有人遇到过该包和之间的兼容性问题吗asymptote
?
在下面的 MWE 中,注释掉允许\usepackage{fontspec}
正确编译和嵌入 3D 渐近线操作。
如果不注释掉 fontspec 包,我会收到如下错误
"Latex Error: ./untitled-1.tex:1 LaTeX Error: Can be used only in preamble.
Latex Error: ./untitled-1.tex:9 Undefined control sequence."
当操作符嵌入在输出中时,也会有everypage
嵌入这个词。
\documentclass{article}
\usepackage{fontspec}
%\setmainfont[ItalicFont={Calibri Italic}]{Cambria}
\usepackage{asymptote}
\begin{document}
\section{Basic Definitions}
We start with the real numbers
\begin{center}
\begin{asy}
import solids;
import three;
import graph3;
size(14cm,0);
currentlight=Viewport;
currentprojection=perspective(4,-4,3);
material Gray=material(heavygray+opacity(0.75),emissivepen=heavygray,ambientpen=heavygray);
material Blue=material(blue+opacity(0.75),emissivepen=blue);
surface y=shift((-.5,0,0))*unitplane;
draw(scale3(6)*y,Gray);
draw((0,3,2)--(2,3,0),linewidth(2));
surface r=shift((0,3,1))*unitsphere;
draw(surface(r),Blue,render(merge=true));
\end{asy}
\end{center}
\end{document}