fontspec 包和 asymptote 之间的兼容性问题

fontspec 包和 asymptote 之间的兼容性问题

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}

相关内容