From 8c6b62be3146f084f1748674db9f3ba28bdbc871 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Fri, 17 Jan 2025 19:06:36 +0000 Subject: [PATCH] Add hint "prefixangle" (closes #772) --- siunitx.tex | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/siunitx.tex b/siunitx.tex index 3b32c166..5c285333 100644 --- a/siunitx.tex +++ b/siunitx.tex @@ -33,6 +33,10 @@ % The next line is needed so that \GetFileInfo will be able to pick up % version data (quite apart from making the demos work). \usepackage{siunitx} +% So we can have 'sensible' demos for \arcsecond +\DeclareSIUnit\arcsecond{as} +\DeclareSIUnit[quantity-product = {}]\stdarcsecond{\ensuremath {{}''}} +\sisetup{angle-symbol-second = \stdarcsecond} \DeclareSIUnit\noop{\relax} % For printing prefixes \DeclareSIPower\quartic\tothefourth{4} % For demos \DeclareSIUnit\KWH{kWh} @@ -625,7 +629,7 @@ \subsection{The unit macros} & \cs{liter} & \unit{\liter} \\ \DescribeUnit[minute (plane angle)]{arcminute} \\ \DescribeUnit[minute (time)]{minute} \\ - \DescribeUnit[second (plane angle)]{arcsecond} \\ + second (plane angle) & \cs{arcsecond} & \unit{\stdarcsecond} \\ \DescribeUnit{neper} \\ \DescribeUnit{tonne} \\ \bottomrule @@ -2407,7 +2411,7 @@ \subsection{Angles} using \opt{angle-symbol-degree}, \opt{angle-symbol-minute} and \opt{angle-symbol-second}. This is most likely to be used when the definition of the unit macros is altered, for example to set \cs{arcsecond} as -\texttt{as}. +\texttt{as} (see also Section~\ref{sec:hint:prefixangle}). \begin{LaTeXdemo} \ang{6;7;6.5} \\ \sisetup{ @@ -3916,6 +3920,21 @@ \subsection{Special considerations for the \cs{kWh} unit% \unit[sticky-per]{\candela\per\kWh} \end{LaTeXdemo} +\subsection{Prefixes and small angles% + \label{sec:hint:prefixangle}} + +Typically, prefixes are not applied to the standard symbols for angles: as +such, the \cs{ang} command is not subject to the \opt{prefix-mode} option. In +some areas, very small angles are given in arcseconds using the symbol +\unit{as}. To apply prefixes in this case, use the \cs{qty} command rather than +\cs{ang}. +\begin{LaTeXdemo} + % In the preamble + % \DeclareSIUnit\arcsecond{as} + \qty{1e-3}{\arcsecond} \\ + \qty[prefix-mode = combine-exponent]{1e-3}{\arcsecond} +\end{LaTeXdemo} + \subsection{Creating a column with numbers and units% \label{sec:hint:mixed}}