tikz-checkmarker节点线宽与十字标记不匹配

tikz-checkmarker节点线宽与十字标记不匹配

我尝试使用下面的代码来创建复选标记和叉号,但是复选标记的大小与叉号不匹配!

\documentclass{standalone}
\usepackage{tikz}
\usepackage{amssymb}
\usetikzlibrary{calc,chains,positioning}
\begin{document}
\begin{tikzpicture}
    \newcommand{\cross}{$\mathbin{\tikz [red,line width=4pt,line cap=round] \draw (-0.5,-0.5) -- (0.5,0.5) (-0.5,0.5) -- (0.5,-0.5);}$}%
    \node[red] (A) {\checkmark};
    \node[red,right=of A,minimum width=1,minimum height=1] {\cross};
    %\draw[red] (0,0) circle (1);
\end{tikzpicture}
\end{document}

如何使两个标记大小相同? 在此处输入图片描述

答案1

在此处输入图片描述

\documentclass{standalone}
\usepackage{tikz}
\usepackage{amssymb}
\usetikzlibrary{calc,chains,positioning}
\begin{document}
    \begin{tikzpicture}
        \newcommand{\cross}{$\mathbin{\tikz [red,line width=2pt,line cap=round,scale=0.2] \draw (-0.5,-0.5) -- (0.5,0.5) (-0.5,0.5) -- (0.5,-0.5);}$}%
        \node[red] (A) {\checkmark};
        \node[red,right=of A,minimum width=1,minimum height=1] {\cross};
        %\draw[red] (0,0) circle (1);
    \end{tikzpicture}
\end{document}

相关内容