Managing checkbox representation
Why not use the already available \boxtimes
?
\documentclass{article}
\usepackage{amssymb}
\begin{document}
$\boxtimes$
\end{document}
Here is another possibility:
\documentclass{article}
\usepackage{amssymb,tikz,pdftexcmds,xparse}
\tikzset{box/.style={
minimum size=0.225cm,
inner sep=0pt,
draw,
},
insert mark/.style={
append after command={%
node[inner sep=0pt,#1]
at (\tikzlastnode.center){$\checkmark$}
}
},
insert bad mark/.style={
append after command={%
[shorten <=\pgflinewidth,shorten >=\pgflinewidth]
(\tikzlastnode.north west)edge[#1](\tikzlastnode.south east)
(\tikzlastnode.south west)edge[#1](\tikzlastnode.north east)
}
},
}
\makeatletter
\NewDocumentCommand{\tikzcheckmark}{O{} m}{%
\ifnum\pdf@strcmp{#2}{mark}=\z@%
\tikz[baseline=-0.5ex]\node[box,insert mark={#1},#1]{};%
\fi%
\ifnum\pdf@strcmp{#2}{bad mark}=\z@%
\tikz[baseline=-0.5ex]\node[box,insert bad mark={#1},#1]{};%
\fi%
\ifnum\pdf@strcmp{#2}{no mark}=\z@%
\tikz[baseline=-0.5ex]\node[box,#1]{};%
\fi%
}
\makeatother
\begin{document}
\tikzcheckmark[scale=0.75]{mark}\quad\tikzcheckmark[scale=0.75]{no mark}\quad\tikzcheckmark[scale=0.75]{bad mark}
\vspace{1cm}
\tikzcheckmark{mark}\quad\tikzcheckmark{no mark}\quad\tikzcheckmark{bad mark}
\vspace{1cm}
\tikzcheckmark[scale=2,red]{mark}\quad\tikzcheckmark[scale=2,red]{no mark}\quad\tikzcheckmark[scale=2,red]{bad mark}
\end{document}
The result: