\documentclass[12pt,a4paper]{article}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{tikz}
\begin{document}
\begin{figure}[hbt!]
\begin{center}
\begin{tikzpicture}[scale=0.40,
thick,
acteur/.style={
circle,
fill=black,
thick,
inner sep=2pt,
minimum size=0.cm,scale=0.65
}
]
\node (a1) at (0,0) [acteur,label=below:\scriptsize{1}]{};
\node (a6) at (1.5,0) [acteur,label=below:\scriptsize{6}]{};
\node (a7) at (3,1) [acteur,label=above:\scriptsize{7}]{};
\node (a8) at (4.5,2) [acteur,label=right:\scriptsize{8}]{};
\node (a9) at (3,-1) [acteur,label=below:\scriptsize{9}]{};
\node (a10) at (4.5,-2) [acteur,label=right:\scriptsize{10}]{};
\node (a2) at (-1.5,1) [acteur,label=above:\scriptsize{2}]{};
\node (a3) at (-3,2) [acteur,label=left:\scriptsize{3}]{};
\node (a4) at (-1.5,-1) [acteur,label=below:\scriptsize{4}]{};
\node (a5) at (-3,-2) [acteur,label=left:\scriptsize{5}]{};
\node at (-5.5,3) {\textit{$T$}};
\draw (a1) -- (a6);
\draw (a6) -- (a7);
\draw (a7) -- (a8);
\draw (a6) -- (a9);
\draw (a9) -- (a10);
\draw (a1) -- (a2);
\draw (a2) -- (a3);
\draw (a1) -- (a4);
\draw (a4) -- (a5);
\end{tikzpicture}
\caption{ A tree having property $\mathcal{R_E}$ with $a(T)=\dfrac{5-\small{\sqrt{21}}}{2}$ and $\rho(T)=\dfrac{5+\small{\sqrt{21}}}{2}$}\label{fig2}
\end{center}
\end{figure}
\end{document}
我正在尝试在 pstricks 中绘制此图形。我该如何绘制?
答案1
最简单的方法是使用pst-eucl
。无关:\small
在数学 maode 中不起作用,而且,它不是带有参数的命令,而是字体大小开关。我用 中的中等大小分数替换了它nccmath
。
\documentclass[12pt, a4paper, svgnames]{article}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath, nccmath}
\usepackage{pst-eucl}
\begin{document}
\begin{figure}[hbt!]
\centering
\begin{pspicture}(-2,-2)(2,2)
\psset{yunit=0.6cm, linecolor=LightSteelBlue}
\pstGeonode[PointName={1,2,3,4,5}, PosAngle={-90,-135,180,-90,180}](-0.5,0){A1}(-1.5,1){A2}(-2.5,2){A3}(-1.5,-1){A4}(-2.5,-2){A5}
\pstGeonode[PointName={6,7,8,9,10}, PosAngle={-90,-45,0,-90,0}](0.5,0){A6}(1.5,1){A7}(2.5,2){A8}(1.5,-1){A9}(2.5,-2){A10}
\psline(A3)(A1)(A6)(A10)
\psline(A5)(A1)
\psline(A8)(A6)
\end{pspicture}
\caption{A tree having property $\mathcal{R_E}$ with $a(T)=\mfrac{5-\sqrt{21}}{2}$ and $\rho(T)=\mfrac{5+\sqrt{21}}{2}$}\label{fig2}
\end{figure}
\end{document}