更改角度标签的大小

更改角度标签的大小

我有以下代码:

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{arrows, angles, quotes}

\begin{document}

\begin{tikzpicture}[
axis/.style={densely dashed,gray,font=\small},
force/.style={>=latex,draw=blue,fill=blue},
]

\node[circle, fill=black] (m) at (0,0){};
\coordinate (origin) at (0,0);
\coordinate (f2) at (1.732,2);
\coordinate (f1) at (-1.732,2);
\coordinate (a) at (0,2);


\draw[axis,->] (m) -- (a){};
\draw[force,->] (m) -- (f1){};
\draw[force,->] (m) -- (f2){};
\draw pic[draw,angle radius=0.5cm,"$30^\circ$" shift={(2.5mm,5mm)}] {angle=f2--origin--a};

\end{tikzpicture}

\end{document}

这是输出:

在此处输入图片描述

角度的标签似乎很大。如何更改标签的大小?我查看了 TiZ 手册,但什么也没找到。

答案1

您只需将字体大小添加到图片选项中:

\documentclass{standalone}
\usepackage{lmodern}
\usepackage{tikz}
\usetikzlibrary{angles, arrows.meta, 
                quotes}
\usepackage{siunitx}

\begin{document}

\begin{tikzpicture}[
           > = {Straight Barb[scale=0.75]},
 axis/.style = {-Straight Barb, densely dashed, draw=gray},
force/.style = {-Stealth, semithick, blue},
                    ]
\coordinate (origin) at (0,0);
\coordinate (f2) at (1.732,2);
\coordinate (f1) at (-1.732,2);
\coordinate (a)  at (0,2);
\node[circle, draw, fill] (m) at (origin){};

\draw[axis]  (m) -- (a);
\draw[force] (m) edge (f1) 
             (m) edge (f2);
\pic[draw, angle radius=5mm, <->,
     font=\scriptsize, % <---
     angle eccentricity=1.5,
     "\qty{30}{\degree}" xshift=1pt] {angle=f2--origin--a};
\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容