我正在使用 tikzset 命令设置全局样式
\tikzset{FARROW/.tip={Latex[angle=40:2.5mm]},
FARROW/.style={line width=3mm}
}
当我将其用于箭头时,箭头样式符合样式,但线宽保持不变
\begin{tikzpicture}
\coordinate (o) at (0,0);
\coordinate (e) at (0,3);
\coordinate (ball) at (0,3.05);
\coordinate (i1) at (2,0.5);
\coordinate (i2) at (2,2.5);
\filldraw (ball) circle (0.05cm);
\draw[-FARROW] (o)node[right]{O}--(e) node[right] {$x$};
\draw[-FARROW] (i1)--(i2) node[right] {$\VEC{i}$};
\end{tikzpicture}
输出如下
答案1
也许是这样的:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\tikzset{
FARROW/.style={line width=3mm, arrows={-Latex[angle=40:2.5mm]}}
}
\begin{document}
\begin{tikzpicture}
\coordinate (o) at (0,0);
\coordinate (e) at (0,3);
\coordinate (ball) at (0,3.05);
\coordinate (i1) at (2,0.5);
\coordinate (i2) at (2,2.5);
\filldraw (ball) circle (0.05cm);
\draw[FARROW] (o)node[right]{O}--(e) node[right] {$x$};
\draw[FARROW] (i1)--(i2) node[right] {${i}$};
\end{tikzpicture}
\end{document}
生产:
我希望这些线宽仅用于演示目的,并且您并不真正想使用它们:)