答案1
这与您的示例并不完全相同,但看看它是否有任何兴趣。这dash pattern
也是一种黑客行为,并非在所有情况下都能很好地发挥作用。
\documentclass{article}
\usepackage{tikz}
\newcommand\encircle[2]{%
\tikz[baseline=(X.base)]
\node (X) [draw,
line width=3pt,
draw=blue,
text=red,
postaction={draw=red,dash pattern=on 4.1pt off 4pt},
shape=circle,
inner sep=2,
label={[blue]above:#2}] {\strut #1};}
\begin{document}
$ \encircle{1}{A} $
\end{document}
答案2
\documentclass{article}
\usepackage{stackengine,xcolor}
\def\usestackanchor{T}%
\usepackage{ifthen}
\usepackage{fp}
\usepackage{graphicx}
\newcounter{index}
\def\dtheta{45}% degrees per dot
\def\dR{.44}% radius of circle in ex's
\def\dotsize{.55}% size of dots relative to period
\def\charwidth{3}% overall characterwidth in circle radii
\newlength\dRlen
\setlength\dRlen{\dR ex}
\def\basechar{\strut%
\rule[.5\ht\strutbox-.5\dp\strutbox]{\charwidth\dRlen}{0ex}}
\savestack{\dotcircle}{\basechar}
\setcounter{index}{0}
\whiledo{\theindex<360}{%
\FPdiv\thetaRad{\theindex}{57.29578}%
\FPcos\dx{\thetaRad}%
\FPmul\dx{\dR}{\dx}%
\FPsin\dy{\thetaRad}%
\FPmul\dy{\dR}{\dy}%
\savestack{\dotcircle}{\stackinset{c}{}{c}{\dy ex}{%
\kern\dx ex\kern\dx ex\scalebox{\dotsize}{.}}{\dotcircle}}
\addtocounter{index}{\dtheta}%
}
\newcommand\blivet{%
\stackon[-3pt]{\stackinset{c}{}{c}{}{\textcolor{red}{%
\scalebox{.25}{1}}}{\stackengine{-.27pt}{\textcolor{cyan}{%
\scalebox{1}[.95]{\textsf{o}}}}{\dotcircle}{O}{c}{F}{F}{L}}}{%
\textcolor{cyan}{\scalebox{.25}{A}}}%
}
\begin{document}
x\blivet y
\end{document}