我正在尝试使用以下命令导出 sagemath 图表:
sage: M = Matrix ([ [0, 1, 1], [1, 0, 1], [1, 1, 0] ])
sage: # (the order is the number of edges)
sage: G = Graph(M); G.order()
sage: G.show();
sage: latex.engine();
sage: latex(G);
我的输出是:
\begin{tikzpicture}
%
\useasboundingbox (0,0) rectangle (5.0cm,5.0cm);
%
\definecolor{cv0}{rgb}{0.0,0.0,0.0}
\definecolor{cfv0}{rgb}{1.0,1.0,1.0}
\definecolor{clv0}{rgb}{0.0,0.0,0.0}
\definecolor{cv1}{rgb}{0.0,0.0,0.0}
\definecolor{cfv1}{rgb}{1.0,1.0,1.0}
\definecolor{clv1}{rgb}{0.0,0.0,0.0}
\definecolor{cv2}{rgb}{0.0,0.0,0.0}
\definecolor{cfv2}{rgb}{1.0,1.0,1.0}
\definecolor{clv2}{rgb}{0.0,0.0,0.0}
\definecolor{cv0v1}{rgb}{0.0,0.0,0.0}
\definecolor{cv0v2}{rgb}{0.0,0.0,0.0}
\definecolor{cv1v2}{rgb}{0.0,0.0,0.0}
%
\Vertex[style={minimum
size=1.0cm,draw=cv0,fill=cfv0,text=clv0,shape=circle},LabelOut=false,L=\\
hbox{$0$},x=3.6292cm,y=0.0cm]{v0}
\Vertex[style={minimum
size=1.0cm,draw=cv1,fill=cfv1,text=clv1,shape=circle},LabelOut=false,L=\\
hbox{$1$},x=5.0cm,y=5.0cm]{v1}
\Vertex[style={minimum
size=1.0cm,draw=cv2,fill=cfv2,text=clv2,shape=circle},LabelOut=false,L=\\
hbox{$2$},x=0.0cm,y=3.6915cm]{v2}
%
\Edge[lw=0.1cm,style={color=cv0v1,},](v0)(v1)
\Edge[lw=0.1cm,style={color=cv0v2,},](v0)(v2)
\Edge[lw=0.1cm,style={color=cv1v2,},](v1)(v2)
%
\end{tikzpicture}
但我肯定缺少一些可以导入 TeXstudio 的包,因为它无法识别\useasboundingbox
、\definecolor
或\Vertex
或\Edge
我必须使用什么包?