I fail to understand what the default unit of measure is for TikZ's angle radius
option of the angles
TikZ library. By "default unit of measure" I mean the one used when no unit is specified explicitly. For example, under "normal" circumstances TikZ will process the instruction \draw (0,0) -- (2,1);
by drawing a rectangle 2cm in length and 1cm in height, because \draw
's default unit of measure is 1cm, so when no unit is specified explicitly, the cm unit is used. This is true in general in TikZ, however the following LaTeX code demonstrates that this is not the case as far as the angle radius
option is concerned.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{angles}
\begin{document}
\begin{tikzpicture}
\coordinate (a) at (1,0);
\coordinate (b) at (0,0);
\coordinate (c) at (0,1);
\draw (a) -- (b) -- (c);
\draw pic [draw, angle radius = 1cm] {angle=a--b--c};
\coordinate (d) at (3,0);
\coordinate (e) at (2,0);
\coordinate (f) at (2,1);
\draw (d) -- (e) -- (f);
\draw pic [draw, angle radius = 1] {angle=d--e--f};
\end{tikzpicture}
\end{document}
This produces (in Overleaf, using the 2022 LuaLatex engine)
For the left hand figure explicit units were specified, but for the right hand figure the units were not specified explicitly.
Why is the right hand figure different to the left hand one? Why wasn't cm
taken as the default unit, as is the norm in TikZ pictures? Is this a bug in TikZ? How is it possible to configure TikZ in such a way that the angle radius
option will use as its default unit of measure whatever unit is used by the TikZ picture in which the angle radius
option occurs?
EDIT: I have opened a ticket about this issue in the PGF/TikZ bug tracker.
angle radius = 1
=angle radius = 1pt
x
andy
units?circle
orarc
uses the optionradius
where 1 means 1 basic unit (being 1cm by default).cm
as the default unit, e.g.(90:1)
is the point that is 1cm above the origin.radius
andangle radius
, which are both options and therefore look very similar to the user. So, it is likely that the user expects that1
passed to these two options would result in somewhat similar results.