参照这个问题,我怎样才能在实心圆圈内画一个复选标记,如图所示?
问候
答案1
没有tikz
\documentclass{article}
%\usepackage{dingbat}
\usepackage{amssymb}
\usepackage{graphicx,xcolor}
\newcommand\circledmark[1][red]{%
\ooalign{%
\hidewidth
\kern0.65ex\raisebox{-0.9ex}{\scalebox{3}{\textcolor{#1}{\textbullet}}}
\hidewidth\cr
$\checkmark$\cr
}%
}
\newcommand\circled[1][red]{%
\raisebox{-0.9ex}{\scalebox{3}{\textcolor{#1}{\textbullet}}}
}%
\begin{document}
This is circled \circledmark\quad\circledmark[cyan] and filled \circled[cyan]
\end{document}
答案2
一种选择:
\documentclass{article}
\usepackage{amssymb}
\begin{document}
\textcircled{$\checkmark$}
\end{document}
或者,使用颜色:
\documentclass{article}
\usepackage{amssymb}
\usepackage{xcolor}
\newcommand\circledmark[1][red]{%
\textcolor{#1}{\textcircled{\normalcolor$\checkmark$}}%
}
\begin{document}
\circledmark\quad\circledmark[cyan]
\end{document}
\normalcolor
如果颜色也适用于复选标记,则抑制该颜色。
或者,使用 TikZ 和实心圆,有两个选项:
\documentclass{article}
\usepackage{amssymb}
\usepackage{tikz}
\newcommand\circledmark[1][red!50]{%
\tikz\node[circle,fill=#1,inner sep=0pt]{$\checkmark$};%
}
\newcommand\circledmarki[1][red!50]{%
\tikz[baseline=(A.south)]{
\node[circle,fill=#1,inner sep=0.75ex] (A) {};
\node at (A) {$\checkmark$};
}%
}
\begin{document}
\circledmark\quad\circledmark[cyan!60]\quad\circledmarki\quad\circledmarki[cyan!60]
\end{document}
并且,根据评论中的请求:
\documentclass{article}
\usepackage{amssymb}
\usepackage{tikz}
\newcommand\circledmark[1][red!50]{%
\tikz\node[circle,fill=#1,inner sep=0pt]{$\checkmark$};%
}
\newcommand\circledmarki[1][red!50]{%
\tikz[baseline=(A.south)]{
\node[circle,fill=#1,inner sep=0.75ex] (A) {};
\node at (A) {$\checkmark$};
}%
}
\newcommand\mycircle[1][red!50]{%
\tikz[baseline=(A.south)]{
\node[circle,fill=#1,inner sep=0.75ex] {};
}%
}
\begin{document}
\circledmark\quad\circledmark[cyan!60]\quad
\circledmarki\mycircle\quad\circledmarki[cyan!60]\mycircle[cyan!60]
\end{document}