我需要创建具有以下样式的箭头:
我找不到直接将它们作为符号的软件包,因此我决定使用蒂克兹包和 tikz 库形状.箭头这是我第一次使用这个包,但我认为我设法获得了第一个,如下所示:
\newcommand*{\tikzarrow}[1]{%
\tikz[baseline=-2.5pt]
\node[
single arrow, single arrow head extend=4pt, draw, inner sep=5pt, top color=white, minimum height=0.7cm]{#1};
}
使用\tikzarrow{}我得到以下信息: 我还没能做其他箭头...我还想知道是否还有其他更简单或更有效的方法来做第一个箭头。
我需要在用 pstricks 制作的段落、方程式和 alpha 图表中使用它们……
答案1
仅中间有线的箭头样式:
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}
\begin{document}
\begin{tikzpicture}[
STA/.style = {single arrow, single arrow head extend=4pt, draw,
inner sep=5pt, minimum height=7mm,
append after command={\pgfextra{\let\LN\tikzlastnode
\draw (\LN.west) -- (\LN.east);}
}
},
DTA/.style = {double arrow, double arrow head extend=4pt, draw,
inner sep=5pt, minimum height=11mm,
append after command={\pgfextra{\let\LN\tikzlastnode
\draw (\LN.west) -- (\LN.east);}
}
}
]
\node[STA] {}; \node[DTA] at (2,0) {};
\end{tikzpicture}
\end{document}
编辑:
下面是一个使用此箭头的示例tikzpicture
:
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{chains,
shapes.arrows}
\begin{document}
\begin{tikzpicture}[
node distance = 11mm,
start chain = going right,
C/.style = {circle, draw, minimum size=11mm},
STA/.style = {single arrow, single arrow head extend=4pt, draw,
inner sep=5pt, minimum height=7mm,
append after command={\pgfextra{\let\LN\tikzlastnode
\draw (\LN.west) -- (\LN.east);}
}
},
DTA/.style = {double arrow, double arrow head extend=4pt, draw,
inner sep=5pt, minimum height=11mm,
append after command={\pgfextra{\let\LN\tikzlastnode
\draw (\LN.west) -- (\LN.east);}
}
}
]
\begin{scope}[nodes=on chain]
\node[C] {};
\node[STA] {};
\node[C] {};
\node[DTA] {};
\node[C] {};
\end{scope}
\end{tikzpicture}
\end{document}