1

Searching several posts in tex.stackechange I have created the figure below using the following code

\documentclass[12pt, border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,
                quotes}
\usepackage{siunitx}

\begin{document}

\begin{tikzpicture}[ my angle/.style = {draw, fill=black!20, angle radius=7mm, angle eccentricity=1.1, right, inner sep=1pt, font=\footnotesize} ]
\coordinate [label=left:$C$] (A) at (-1.5cm,-1.cm); \coordinate [label=right:$A$] (C) at (1.5cm,-1.0cm); \coordinate [label=above:$B$] (B) at (1.5cm,1.0cm); \draw (A) -- node[above,rotate=33.7,font=\footnotesize] {$D=\sqrt{x_0^2+\left(\frac{v_0}{\omega_0}\right)^2}$} (B) -- node[right,font=\footnotesize] {$\frac{v_0}{\omega_0}$} (C) -- node[below,font=\footnotesize] {$x_0$} (A);

\draw (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

\pic[my angle, "$\phi$"] {angle = C--A--B};

\end{tikzpicture} \end{document}

enter image description here

How can I modify the textsize of the vertices A, B and C? It seems to me just adding font=\footnotesize (that is, e.g., \coordinate [label=left:$C$,font=\footnotesize] (A) at (-1.5cm,-1.cm); is not the proper way.

Dimitris
  • 1,405
  • https://tex.stackexchange.com/a/107058/197451 – js bibra Nov 20 '22 at 01:59
  • label={[font=\footnotesize]left:$C$} Your way just changed the font size of the coordinate (which doesn't have text). There's also the every label style. You can use any other style between [ and ] that at some point sets the font key (or the node font key) – just like you did with my angle. – Qrrbrbirlbel Nov 20 '22 at 02:05
  • See also every node/.style={...} (page 226). – John Kormylo Nov 20 '22 at 16:27

1 Answers1

1

You can try:

\documentclass[12pt, border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,
    quotes}
\usepackage{siunitx}

\begin{document}

\begin{tikzpicture}[
    my angle/.style = {draw, fill=black!20,
        angle radius=7mm, 
        angle eccentricity=1.1, 
        right, inner sep=1pt,
        font=\footnotesize} 
    ]             
    \coordinate [label=left:\footnotesize $C$] (A) at (-1.5cm,-1.cm);
    \coordinate [label=right:\footnotesize $A$] (C) at (1.5cm,-1.0cm);
    \coordinate [label=above:\footnotesize $B$] (B) at (1.5cm,1.0cm);
    \draw (A) -- node[above,rotate=33.7,font=\footnotesize] {$D=\sqrt{x_0^2+\left(\frac{v_0}{\omega_0}\right)^2}$} (B) -- node[right,font=\footnotesize] {$\frac{v_0}{\omega_0}$} (C) -- node[below,font=\footnotesize] {$x_0$} (A);

    \draw (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

    \pic[my angle, "$\phi$"] {angle = C--A--B};

\end{tikzpicture}

\end{document}

miltos
  • 2,605