1

I have a diagram in which the font size for a node containing the measure of an angle is too big. What is the default font size for a node? What is the font size, in units of pt, for the specification font=\footnotesize in a node command?

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings,decorations.pathreplacing}


\begin{document}
\begin{tikzpicture}

%A triangle is to be drawn on the Cartesian plane.
\coordinate (E) at (0,0);
\coordinate (A) at (0,{(4/3)*sqrt(3)});
\coordinate (D) at (4/3,0);
\coordinate (B) at ($(A)!{(8/3)*1cm}!90:(D)$);
\coordinate (C) at ($(D)!{(8/3)*1cm}!-90:(A)$);

\node[anchor=-75, inner sep=0] at ($(A) +({-75+180}:0.15)$){$A$};
\node[anchor=-75, inner sep=0] at ($(B) +({-75+180}:0.15)$){$B$};
\node[anchor={-75+180}, inner sep=0] at ($(C) +(-75:0.15)$){$C$};
\node[anchor={-75+180}, inner sep=0] at ($(D) +(-75:0.15)$){$D$};
\node[anchor=north, inner sep=0] at (0,-0.15){$E$};


\draw (A) -- (B) -- (C) -- (D) -- cycle;
\draw (A) -- (E);
\draw (D) -- (E);


\draw node[anchor=east, inner sep=0, font=\footnotesize] at ($($(A)!0.5!(E)$) +(-0.15,0)$){$4\sqrt{3}$};


%A right-angle mark is drawn at D.
\coordinate (U) at ($(D)!3mm!45:(C)$);
\draw[dash dot] (U) -- ($(D)!(U)!(C)$);
\draw[dash dot] (U) -- ($(D)!(U)!(A)$);

%A right-angle mark is drawn at E.
\coordinate (V) at ($(E)!3mm!45:(D)$);
\draw[dash dot] (V) -- ($(E)!(V)!(D)$);
\draw[dash dot] (V) -- ($(E)!(V)!(A)$);

\draw[draw=blue] ($(A) +(-90:0.7)$) arc (-90:-60:0.7);
\node[anchor=west, rotate=-75, inner sep=0, font=\footnotesize] at ($(A) +(-75:0.8)$){$30^{\circ}$};

\end{tikzpicture}


\end{document}
Adelyn
  • 3,373
  • It depends. \footnotesize is not an absolute size in pts (and pts are not absolute either, of course). Rather, it is relative to the default font size for the document. There is no default font size for nodes generally. If you just say \tikz{\node {whatever};} you'll get the default size which, again, will depend on your document and the context within that document. – cfr Jan 26 '16 at 03:55
  • Just write \begin{tikzpicture}[font=\small], or when you are using \usepackage{anyfontsize} you can write \begin{tikzpicture}[font=\fontsize{20}{8}\selectfont]. – Giorgi Jan 26 '16 at 03:56
  • @Giorgi If \footnotesize is too big, \small will only be worse, surely? – cfr Jan 26 '16 at 03:57
  • @cfr What is the size of the text that is typeset in \footnotesize with respect to the font of the file? – Adelyn Jan 26 '16 at 03:58
  • 1
  • @Torbjørn T. Thanks for suggesting the web site. For 12pt font, text is typeset in 10.95pt font using \small, 10pt font using \footnotesize, 8pt font using \scriptsize, and 6pt font using \tiny. My guess is that this give me enough variety. In case I would like to have text in a node command typeset in 9pt font, for example, please tell me the syntax. – Adelyn Jan 27 '16 at 19:24
  • See e.g. Half-point size fonts in LaTeX and LaTeX -- specify font point size?: \fontsize{9pt}{11pt}\selectfont. The second number is the baselineskip. – Torbjørn T. Jan 27 '16 at 22:01
  • @Torbjørn T. I see that the command to specify the font is \fontsize{size}{skip} and that it is suggested that "the baselineskip should be 1.2 times the font size." If the node consists of text on a single line, what would you suggest for the skip? How would I implement this font specification in the command \node[anchor=-75, inner sep=0] at ($(A) +({-75+180}:0.15)$){$A$}; from my code? – Adelyn Jan 28 '16 at 14:21
  • 1
  • No idea about the skip value. 2) same way you would implement \small etc. I think, i.e. \node[anchor=-75, inner sep=0,font=\fontsize{x}{y}\selectfont] at ($(A) +({-75+180}:0.15)$){$A$};, or put it in the node text itself.
  • – Torbjørn T. Jan 28 '16 at 14:41