不同的对勾和叉号/十字标记彼此非常匹配

不同的对勾和叉号/十字标记彼此非常匹配

最近自己写一些资料的时候,checkmark 和 crossmark/xmark 很有用,但是我发现很难让 checkmark 和 crossmark/xmark 很好地匹配。经过努力,我找到了一些完美的解决方案,其中大部分在网站上找不到,而且有些帖子中很少出现,例如这里

这里我们收集不同的解决方案,因此欢迎任何解决方案!

答案1

我定义了一组对勾和十字/十字标记,并选择了 TeX 系统中已经存在的 16 组。第 1-14 组是衬线​​字体,第 15-17 组是无衬线字体。由于它们在形状和线条粗细,您可以根据自己的喜好或与所用字体的匹配程度选择任意一种。以下是总结。

\documentclass{article}
\usepackage[papersize={300mm,300mm},top=20mm,bottom=20mm,left=20mm,right=20mm]{geometry}
\usepackage{caption,multirow}
\usepackage[T1]{fontenc}%make \texttt work on \textbraceleft
\usepackage{amssymb}
\usepackage{graphics}

%\checked from wasysym
\makeatletter
\def\wasyfamily{\fontencoding{U}\fontfamily{wasy}\selectfont}
\def\checked{\mbox{\wasyfamily\char8}}
\makeatother

%\checkmark from MnSymbol
\makeatletter
\DeclareFontFamily{U}{MnSymbolC}{}
\DeclareFontShape{U}{MnSymbolC}{m}{n}{
    <-6>  MnSymbolC5
   <6-7>  MnSymbolC6
   <7-8>  MnSymbolC7
   <8-9>  MnSymbolC8
   <9-10> MnSymbolC9
  <10-12> MnSymbolC10
  <12->   MnSymbolC12}{}
\DeclareFontShape{U}{MnSymbolC}{b}{n}{
    <-6>  MnSymbolC-Bold5
   <6-7>  MnSymbolC-Bold6
   <7-8>  MnSymbolC-Bold7
   <8-9>  MnSymbolC-Bold8
   <9-10> MnSymbolC-Bold9
  <10-12> MnSymbolC-Bold10
  <12->   MnSymbolC-Bold12}{}
\DeclareSymbolFont{MnSyC}{U}{MnSymbolC}{m}{n}
\DeclareMathSymbol{\mncheckmark}{\mathord}{MnSyC}{160}
\makeatother

%\checkmark from fdsymbol
\makeatletter
\DeclareFontFamily{U}{FdSymbolA}{}
\DeclareFontShape{U}{FdSymbolA}{m}{n}{<-> s * FdSymbolA-Book}{}
\DeclareSymbolFont{fdsymbols}{U}{FdSymbolA}{m}{n}
\DeclareMathSymbol{\fdcheckmark}{\mathord}{fdsymbols}{"B3}
\makeatother

%checkmark and crossmark from arevmath
%\usepackage{graphics}
\makeatletter
\DeclareSymbolFont{extraup}{U}{zavm}{m}{n}
\DeclareMathSymbol{\ballotcheck}{\mathalpha}{extraup}{128}%uni2713
\DeclareMathSymbol{\ballotx}{\mathalpha}{extraup}{129}%uni2717
\makeatother

%\checkmark from boisik
%\usepackage[OT1]{fontenc}%to use xelatex and also permits to use latex
\makeatletter
\DeclareFontEncoding{LBM}{}{}
\DeclareFontFamily{LBM}{bskms}{\skewchar\font130 }
\DeclareFontShape{LBM}{bskms}{m}{n} {<-> bskms10}{}
\DeclareSymbolFont{bsksymbols}{LBM}{bskms}{m}{n}
\DeclareMathSymbol{\bskcheckmark}{\mathord}{bsksymbols}{"EF}
\makeatother

\usepackage{pifont}

\usepackage{utfsym}

%\checkmark from stix
\makeatletter
\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{arrows3}{LS2}{stixtt}{m}{n}
\SetSymbolFont{arrows3}{bold}{LS2}{stixtt}{b}{n}
\DeclareMathSymbol{\stcheckmark}{\mathord}{arrows3}{"82}
\makeatother

\usepackage{bbding}

\usepackage{twemojis}

\usepackage{fontawesome}
%https://tex.stackexchange.com/a/369089/140814 for a solution to use xelatex

%\checkmark from dingbat
\makeatletter
\DeclareFontFamily{U}{dingbat}{}
\DeclareFontShape{U}{dingbat}{m}{n}{<-> dingbat}{}
\newcommand{\dingbatfamily}{\fontencoding{U}\fontfamily{dingbat}\selectfont}
\newcommand{\dingbat@sym}[1]{{\dingbatfamily\symbol{#1}}}
\newcommand{\dbcheckmark}{\dingbat@sym{'104}}
\makeatother

\begin{document}
\begin{table}\centering
\renewcommand{\arraystretch}{2}
\caption*{Different Checkmarks and Crossmarks/Xmarks}
\begin{tabular}{l|lc|cl|l}
\hline
\multirow{2}{*}{No}&\multicolumn{2}{c|}{Checkmarks}&\multicolumn{2}{c|}{Crossmarks/Xmarks}&\multirow{2}{*}{Packages}\\\cline{2-5}
&Code&Output&Output&Code& \\\hline
1&\verb|\raisebox{0.6ex}{\scalebox{0.7}{$\sqrt{}$}}|&\raisebox{0.6ex}{\scalebox{0.7}{$\sqrt{}$}}&\scalebox{0.85}[1]{$\times$}&\verb|\scalebox{0.85}[1]{$\times$}|&\verb|amssymb|/\verb|amsmath|, \verb|graphics|\\\hline%\multirow{5}{*}{}
2&\verb|$\checked$|&$\checked$&\multirow{5}{*}{\scalebox{0.75}{\usym{2613}}}&\multirow{5}{*}{\texttt{\textbackslash scalebox\{0.75\}\{\textbackslash usym\{2613\}\}}}&\verb|wasysym|, \verb|utfsym|\\\cline{1-3}\cline{6-6}
3&\verb|$\checkmark$|&$\mncheckmark$&&&\verb|MnSymbol|, \verb|utfsym|\\\cline{1-3}\cline{6-6}
4&\verb|$\checkmark$|&\checkmark&&&\verb|amssymb|/\verb|amsmath|, \verb|utfsym|\\\cline{1-3}\cline{6-6}
5&\verb|$\checkmark$|&$\fdcheckmark$&&&\verb|fdsymbol|, \verb|utfsym|\\\cline{1-3}\cline{6-6}
6&\verb|\usym{1F5F8}|&\usym{1F5F8}&&&\verb|utfsym|\\\hline
7&\verb|$\ballotcheck$|&$\ballotcheck$&\multirow{2}{*}{\scalebox{0.75}{$\ballotx$}}&\multirow{2}{*}{\texttt{\textbackslash scalebox\{0.75\}\{\$\textbackslash ballotx\$\}}}&\verb|arevmath|\\\cline{1-3}\cline{6-6}
8&\verb|$\checkmark$|&$\bskcheckmark$&&&\verb|fontenc|, \verb|boisik|, \verb|arevmath|\\\hline
9&\verb|\ding{51}|&\ding{51}&\ding{55}&\verb|\ding{55}|&\verb|pifont|\\\hline
10&\verb|\usym{2713}|&\usym{2713}&\multirow{2}{*}{\usym{2717}}&\multirow{2}{*}{\texttt{\textbackslash usym\{2717\}}}&\verb|utfsym|\\\cline{1-3}\cline{6-6}
11&\verb|$\checkmark$|&$\stcheckmark$&&&\verb|stix|, \verb|utfsym|\\\hline
12&\verb|\ding{52}|&\ding{52}&\ding{56}&\verb|\ding{56}|&\verb|pifont|\\\hline
13&\verb|\usym{2714}|&\usym{2714}&\usym{2718}&\verb|\usym{2718}|&\verb|utfsym|\\\hline
14&\verb|\CheckmarkBold|&\CheckmarkBold&\XSolidBrush&\verb|\XSolidBrush|&\verb|bbding|\\\hline
15&\verb|\twemoji{check mark}|&\twemoji{check mark}&\twemoji{multiply}&\verb|\twemoji{multiply}|&\verb|twemojis|\\\hline
16&\verb|\twemoji{\faCheck}|&\faCheck&\faTimes&\verb|\faTimes|&\verb|fontawesome|\\\hline
17&\verb|\checkmark|&\dbcheckmark&\raisebox{0.2ex}{\usym{1F5F4}}&\verb|\raisebox{0.2ex}{\usym{1F5F4}}|&\verb|dingbat|, \verb|utfsym|\\\hline
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

为了方便使用,我们可以为所需的对勾和十字标记/横线标记定义一些简短而直接的命令。以下是按照表中编号列出的命令和输出。

1号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb}
\usepackage{graphics}
\newcommand{\newcheckmark}{\raisebox{0.6ex}{\scalebox{0.7}{$\sqrt{}$}}}
\newcommand{\newcrossmark}{\scalebox{0.85}[1]{$\times$}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

2号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark from wasysym
\makeatletter
\def\wasyfamily{\fontencoding{U}\fontfamily{wasy}\selectfont}
\def\newcheckmark{\mbox{\wasyfamily\char8}}
\makeatother
%crossmark from utfsym
\usepackage{utfsym}
\newcommand{\newcrossmark}{\scalebox{0.75}{\usym{2613}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

3号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark from MnSymbol
\makeatletter
\DeclareFontFamily{U}{MnSymbolC}{}
\DeclareFontShape{U}{MnSymbolC}{m}{n}{
    <-6>  MnSymbolC5
   <6-7>  MnSymbolC6
   <7-8>  MnSymbolC7
   <8-9>  MnSymbolC8
   <9-10> MnSymbolC9
  <10-12> MnSymbolC10
  <12->   MnSymbolC12}{}
\DeclareFontShape{U}{MnSymbolC}{b}{n}{
    <-6>  MnSymbolC-Bold5
   <6-7>  MnSymbolC-Bold6
   <7-8>  MnSymbolC-Bold7
   <8-9>  MnSymbolC-Bold8
   <9-10> MnSymbolC-Bold9
  <10-12> MnSymbolC-Bold10
  <12->   MnSymbolC-Bold12}{}
\DeclareSymbolFont{MnSyC}{U}{MnSymbolC}{m}{n}
\DeclareMathSymbol{\newcheckmark}{\mathord}{MnSyC}{160}
\makeatother
%crossmark from utfsym
\usepackage{utfsym}
\newcommand{\newcrossmark}{\scalebox{0.75}{\usym{2613}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

4号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb}
%\checkmark has been defined in amssymb
%crossmark from utfsym
\usepackage{utfsym}
\newcommand{\crossmark}{\scalebox{0.75}{\usym{2613}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\checkmark|&$\checkmark$&$\crossmark$&\verb|\crossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

5号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark from fdsymbol
\makeatletter
\DeclareFontFamily{U}{FdSymbolA}{}
\DeclareFontShape{U}{FdSymbolA}{m}{n}{<-> s * FdSymbolA-Book}{}
\DeclareSymbolFont{fdsymbols}{U}{FdSymbolA}{m}{n}
\DeclareMathSymbol{\newcheckmark}{\mathord}{fdsymbols}{"B3}
\makeatother
%crossmark from utfsym
\usepackage{utfsym}
\newcommand{\newcrossmark}{\scalebox{0.75}{\usym{2613}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

6号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark and crossmark from utfsym
\usepackage{utfsym}
%https://tex.stackexchange.com/q/640986/140814 for a solution to use xelatex
\newcommand{\newcheckmark}{\usym{1F5F8}}
\newcommand{\newcrossmark}{\scalebox{0.75}{\usym{2613}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第7号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark and crossmark from arevmath
%\usepackage{graphics}
\makeatletter
\DeclareSymbolFont{extraup}{U}{zavm}{m}{n}
\DeclareMathSymbol{\newcheckmark}{\mathalpha}{extraup}{128}%uni2713
\DeclareMathSymbol{\newcrossmark}{\mathalpha}{extraup}{129}%uni2717
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第8号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark from boisik
%\usepackage[OT1]{fontenc}%to use xelatex and also permits to use latex
\makeatletter
\DeclareFontEncoding{LBM}{}{}
\DeclareFontFamily{LBM}{bskms}{\skewchar\font130 }
\DeclareFontShape{LBM}{bskms}{m}{n} {<-> bskms10}{}
\DeclareSymbolFont{bsksymbols}{LBM}{bskms}{m}{n}
\DeclareMathSymbol{\newcheckmark}{\mathord}{bsksymbols}{"EF}
\makeatother
%crossmark from arevmath
\makeatletter
\DeclareSymbolFont{extraup}{U}{zavm}{m}{n}
\DeclareMathSymbol{\newcrossmark}{\mathalpha}{extraup}{129}%uni2717
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

9号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark and crossmark from pifont
\usepackage{pifont}
\newcommand{\newcheckmark}{\textrm{\ding{51}}}%
\newcommand{\newcrossmark}{\textrm{\ding{55}}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第 10 号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\checkmark and crossmark from utfsym
\usepackage{utfsym}
\newcommand{\newcheckmark}{\usym{2713}}
\newcommand{\newcrossmark}{\usym{2717}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第 11 号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark from stix
\makeatletter
\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{arrows3}{LS2}{stixtt}{m}{n}
\SetSymbolFont{arrows3}{bold}{LS2}{stixtt}{b}{n}
\DeclareMathSymbol{\newcheckmark}{\mathord}{arrows3}{"82}
\makeatother
%crossmark from utfsym
\usepackage{utfsym}
\makeatletter
\newcommand{\newcrossmark}{\usym{2717}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第 12 号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark and crossmark from pifont
\usepackage{pifont}
\newcommand{\newcheckmark}{\textrm{\ding{52}}}%
\newcommand{\newcrossmark}{\textrm{\ding{56}}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第 13 号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark and crossmark from utfsym
\usepackage{utfsym}
\newcommand{\newcheckmark}{\usym{2714}}
\newcommand{\newcrossmark}{\usym{2718}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第 14 号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark and crossmark from bbding
\usepackage{bbding}
\newcommand{\newcheckmark}{\textrm{\CheckmarkBold}}
\newcommand{\newcrossmark}{\textrm{\XSolidBrush}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第 15 号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark and crossmark from twemojis
\usepackage{twemojis}
\newcommand{\newcheckmark}{\twemoji{check mark}}
\newcommand{\newcrossmark}{\twemoji{multiply}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第 16 号。在 PDFLaTeX 中

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%checkmark and crossmark from fontawesome
\usepackage{fontawesome}
%https://tex.stackexchange.com/a/369089/140814 for a solution to use xelatex
\newcommand{\newcheckmark}{\textrm{\faCheck}}
\newcommand{\newcrossmark}{\textrm{\faTimes}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

第 17 号。

\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\checkmark from dingbat
\makeatletter
\DeclareFontFamily{U}{dingbat}{}
\DeclareFontShape{U}{dingbat}{m}{n}{<-> dingbat}{}
\newcommand{\dingbatfamily}{\fontencoding{U}\fontfamily{dingbat}\selectfont}
\newcommand{\dingbat@sym}[1]{{\dingbatfamily\symbol{#1}}}
\newcommand{\newcheckmark}{\textrm{\dingbat@sym{'104}}}
\makeatother
%crossmark from utfsym
\usepackage{utfsym}
\newcommand{\newcrossmark}{\raisebox{0.2ex}{\usym{1F5F4}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{table}
\begin{tabular}{lccl}
\verb|\newcheckmark|&$\newcheckmark$&$\newcrossmark$&\verb|\newcrossmark|\\
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

相关内容