答案1
类似这样的功能?tikz-cd
允许您使用字形作为箭头尖。(我必须定义一个稍宽的版本,以避免符号被剪裁。)
\documentclass{article}
\usepackage{tikz-cd}
\makeatletter
\pgfdeclarearrow{
name=xGlyph,
cache=false,
bending mode=none,
parameters={\tikzcd@glyph@len,\tikzcd@glyph@shorten},
setup code={%
\pgfarrowssettipend{\tikzcd@glyph@len\advance\pgf@x by\tikzcd@glyph@shorten}},
defaults={
glyph axis=axis_height,
glyph length=+1.55ex,
glyph shorten=+-0.1ex},
drawing code={%
\pgfpathrectangle{\pgfpoint{+0pt}{+-1.5ex}}{\pgfpoint{+\tikzcd@glyph@len}{+3ex}}%
\pgfusepathqclip%
\pgftransformxshift{+\tikzcd@glyph@len}%
\pgftransformyshift{+-\tikzcd@glyph@axis}%
\pgftext[right,base]{\tikzcd@glyph}}}
\makeatother
\tikzset{
supset/.tip={xGlyph[glyph math command=supset,
glyph axis=5.2pt]},
}
\begin{document}
\[\begin{tikzcd}
A \arrow[supset-latex,d]\\
B \\
\end{tikzcd}\]
\end{document}
Mac 上预览时的最大缩放比例:
或者,您可以使用\pgfdeclarearrow
来声明箭头。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta}
\pgfdeclarearrow{
name = shook,
parameters = {\the\pgfarrowlength,\the\pgfarrowwidth},
setup code = {
% The different end values:
\pgfarrowssettipend{\pgfarrowlength}
\pgfarrowssetlineend{.01\pgfarrowlength}
\pgfarrowssetvisualbackend{-.1\pgfarrowlength}
\pgfarrowssetbackend{-.25\pgfarrowlength}
% The hull
\pgfarrowshullpoint{\pgfarrowlength}{0pt}
\pgfarrowshullpoint{0pt}{-\pgfarrowwidth}
\pgfarrowssavethe\pgfarrowlength
},
drawing code = {
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
\pgfpatharc{90}{-90}{\pgfarrowlength and \pgfarrowwidth/2}
\pgfpathlineto{\pgfpoint{-\pgfarrowlength}{-\pgfarrowwidth}}
\pgfusepathqstroke
},
defaults = { length = 4pt,width=8pt}
}
\begin{document}
\begin{tikzpicture}
\draw [shook-latex] (0,0) -- (0,-2);
\draw [{shook[length=3pt]}-latex] (1,0) -- (1,-2);
\draw [thick,{shook[length=3pt,width=7pt]}-latex] (2,0) -- (2,-2);
\end{tikzpicture}
\end{document}