我想创建一个右箭头,箭头尾部有一个圆圈,箭头尾部有一个菱形。如何实现?请帮忙。
答案1
我是这样理解这个问题的:一支箭的尾部应该有一个圆圈和一个菱形。
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows}
\pgfarrowsdeclarecombine*{ring and diamond}{ring and diamond}{open diamond}{open diamond}{o}{o}
\DeclareMathOperator{\ringdiamondarrow}{\raisebox{0.5ex}{\tikz[baseline]{\draw[ring and diamond->](0,0)--(2em,0);}}}
\begin{document}
\(a\ringdiamondarrow b\)
\end{document}
答案2
\documentclass{article}
\usepackage{stackengine}
\usepackage{scalerel}
\newcommand*\circarrow{%
\stackengine{0pt}{\hspace{.81ex}$\rightarrow$}{$\circ$}{O}{l}{F}{F}{L}}
\newcommand*\diamondarrow{%
\stackengine{0pt}{\hspace{.83ex}$\rightarrow$}{$\diamond$}{O}{l}{F}{F}{L}}
\newcommand*\diamondcircarrow{%
\stackengine{0pt}{\hspace{.88ex}$\circarrow$}{$\diamond$}{O}{l}{F}{F}{L}}
\newcommand*\circdiamondarrow{%
\stackengine{0pt}{\hspace{.86ex}$\diamondarrow$}{$\circ$}{O}{l}{F}{F}{L}}
\begin{document}
\( A \mathrel{\circarrow}B \quad C\mathrel{\diamondarrow} E \)
\( A\mathrel{\circdiamondarrow}B \quad C\mathrel{\diamondcircarrow}E\)
\end{document}