数学符号“一箭穿心”

数学符号“一箭穿心”

谁能帮我创建一个像下图这样的新数学符号? 在此处输入图片描述

我想用它作为二元关系符号:一颗被从左到右的箭刺穿的心代表着“A爱上”。

谢谢你!

答案1

\documentclass{article}
\usepackage{amsmath}

\newcommand{\piercedheart}{%
  \relbar
  \mathrel{\mspace{-3.5mu}}
  \mathrel{\loweredheartsuit}
  \mathrel{\mspace{-7mu}}
  \rightarrow
}
\makeatletter
\newcommand{\loweredheartsuit}{\mathpalette\loweredheartsuit@\relax}
\newcommand{\loweredheartsuit@}[2]{%
  \vcenter{%
    \sbox\z@{$\m@th#1\mspace{3mu}$}%
    \vskip\wd\z@
    \hbox{$\m@th#1\heartsuit$}%
  }%
}
\makeatother

\begin{document}

$A\piercedheart B_{A\piercedheart B}$

\end{document}

在此处输入图片描述

答案2

第一种方法(我想如果您想使用其他字体,则需要进行调整):

\documentclass{article}

\newcommand\isinlovewith{\mathchoice
    {\relbar\mkern-8mu\raisebox{-1.2pt}{$\heartsuit$}\mkern-14mu\rightarrow}
    {\relbar\mkern-8mu\raisebox{-1.2pt}{$\heartsuit$}\mkern-14mu\rightarrow}
    {\relbar\mkern-4mu\raisebox{-0.9pt}{$\scriptstyle\heartsuit$}\mkern-9mu\rightarrow}
    {\relbar\mkern-4mu\raisebox{-0.6pt}{$\scriptscriptstyle\heartsuit$}\mkern-9mu\rightarrow}
}

\begin{document}

$\displaystyle A \isinlovewith B$\smallskip

$A \isinlovewith B$\smallskip

$\scriptstyle A \isinlovewith B$\smallskip

$\scriptscriptstyle A \isinlovewith B$

\end{document}

在此处输入图片描述

答案3

只是为了好玩,一个 TiZ 版本:

\documentclass{article}
\usepackage{tikz}

\newcommand{\auxheart}[1]
{%
\mathrel{\begin{tikzpicture}[line cap=round,scale=#1,line width=0.3*#1ex,baseline=0.5*#1ex]
\draw        (0,0) -- (135:2ex) arc  (225:45:1ex) arc (135:-45:1ex) -- cycle;
\draw    (135:2ex) ++  (45:1ex)   ++ (-1ex,0) --++ (-1.75ex,0);
\draw[->] (45:2ex) ++ (135:1ex) --++ (2.75ex,0);
\end{tikzpicture}}%
}

\newcommand{\heart}{\mathchoice{\auxheart{0.5}}{\auxheart{0.5}}{\auxheart{0.35}}{\auxheart{0.3}}}


\begin{document}
Normal:

$A\heart B_{A\heart B}$

$\scriptstyle A\heart B_{A\heart B}$

\bigskip

\large Large (\verb|\large|):

$A\heart B_{A\heart B}$

$\scriptstyle A\heart B_{A\heart B}$

\bigskip

\huge Huge (\verb|\huge|):

$A\heart B_{A\heart B}$

$\scriptstyle A\heart B_{A\heart B}$
\end{document}

在此处输入图片描述

相关内容