答案1
你随时可以构建你自己的。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\tikzset{mystar/.cd,
color/.initial=red,
fill/.initial=blue!20,
style/.code={\tikzset{mystar style/.style={#1}}},
style={}}
\newcommand{\mystar}[1][]{\tikz{
\tikzset{mystar/.cd,#1}
\node [star, star point height=.15em, minimum size=.4em,
inner sep=0.1em, draw=\pgfkeysvalueof{/tikz/mystar/color},
fill=\pgfkeysvalueof{/tikz/mystar/fill},line width=0.05em,mystar style]
{};
\draw[\pgfkeysvalueof{/tikz/mystar/color},
line width=0.05em] circle[radius=.35em];}}
\begin{document}
ABC \mystar\ DEF
{\Huge ABC \mystar[color=orange]\mystar[style={rotate=36}]\ DEF}
\end{document}
答案2
可以很容易地用以下方法绘制它intersections
:
\documentclass[tikz,margin=3mm]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\def\radius{2};
\foreach \i [count=\j] in {90,18,...,-288} {
\coordinate (\j) at (\i:\radius);
}
\path[name path=13] (1)--(3);
\path[name path=35] (3)--(5);
\path[name path=52] (5)--(2);
\path[name path=24] (2)--(4);
\path[name path=41] (4)--(1);
\path[name intersections={of=13 and 52,by=x1}];
\path[name intersections={of=13 and 24,by=x2}];
\path[name intersections={of=35 and 24,by=x3}];
\path[name intersections={of=35 and 41,by=x4}];
\path[name intersections={of=52 and 41,by=x5}];
\draw[very thick,red,fill=blue!50,rounded corners=1pt] (1)--(x1)--(2)--(x2)--(3)--(x3)--(4)--(x4)--(5)--(x5)--cycle;
\draw[very thick, red] (0,0) circle[radius=\radius];
\end{tikzpicture}
\end{document}
当然,如果经过一些数学运算,代码会更短,但这种方法很直接。
编辑:
我刚刚看到您将在 中使用星号作为“项目符号” itemize
。我们可以为此定义一个新命令
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{intersections}
\newcommand{\tikzstar}{\tikz{
\def\radius{.3em};
\foreach \i [count=\j] in {90,18,...,-288} {
\coordinate (\j) at (\i:\radius);
}
\path[name path=13] (1)--(3);
\path[name path=35] (3)--(5);
\path[name path=52] (5)--(2);
\path[name path=24] (2)--(4);
\path[name path=41] (4)--(1);
\path[name intersections={of=13 and 52,by=x1}];
\path[name intersections={of=13 and 24,by=x2}];
\path[name intersections={of=35 and 24,by=x3}];
\path[name intersections={of=35 and 41,by=x4}];
\path[name intersections={of=52 and 41,by=x5}];
\draw[very thin,red,fill=blue!50] (1)--(x1)--(2)--(x2)--(3)--(x3)--(4)--(x4)--(5)--(x5)--cycle;
\draw[very thin,red] (0,0) circle[radius=\radius];
}}
\begin{document}
\begin{itemize}
\renewcommand\labelitemi{\tikzstar}
\item First item
\item Second item
\end{itemize}
\begin{huge}
\begin{itemize}
\renewcommand\labelitemi{\tikzstar}
\item First item
\item Second item
\end{itemize}
\end{huge}
\end{document}
答案3
只是为了好玩——一个非常简短的代码pstricks
:
\documentclass[svgnames]{article}
\usepackage{pst-poly}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{postscript}
\psset{linecolor=Tomato, linewidth=0.4pt}
A CIRCLED \makebox[1em]{\pscirclebox[framesep=-1.4pt]{\PstStarFive[fillstyle=solid, fillcolor=CornflowerBlue, linejoin=1, unit =0.115]}} STAR
\end{postscript}
\end{document}
答案4
没有 TikZ,有mnsymbol
和stackengine
:
\documentclass{article}
\usepackage{graphicx}
\usepackage{mnsymbol}
\usepackage{stackengine}
\usepackage{xcolor}
\newcommand{\mycircledstar}{%
\stackinset{c}{}{c}{}{%
\textcolor{red}{$\bigcircle$}%
}{%
\stackinset{c}{}{c}{}{%
\textcolor{red}{\scalebox{0.65}{$\largestar$}}%
}{%
\textcolor{cyan}{\scalebox{0.6}{$\bigstar$}}%
}%
}
}
\begin{document}
Little \mycircledstar and big \scalebox{10}{\mycircledstar}
\end{document}