The siunitx
package provides support for "astronomy style" placement of the degree symbol using the angle-symbol-over-decimal
switch, and for simple entry of degree-minutes-second values using the form
\ang{6;7;6.5}
Is there a way to used the package's \DeclareSIUnit
macro to define a corresponding formatting for right ascension so that, for example, one could use something like
\ra[ra-symbol-over-decimal]{5.237}
\ra{5.237}
\ra{5;15;6.5}
to produce (roughly)
with spacing and other behavior that follows the packages current settings for \ang
?
Best Answer
Reading the
siunitx
manual (→ 5.15 “Symbols”, pp. 62/63) one can find two ways to achieve this:\SIUnitSymbolDegree
, -Arcminute
and -Arcsecond
text-
/math-degree
, -arcminute
and -arcsecond
(→ Table 43, p. 63)For both cases applies:
The new macro
\ra
takes two arguments:\ang
andAll “arc format” options (
angle-symbol-over-decimal
,arc-separator
, …) can be given to\ra
, too.Solution 1
Solution 2
Code
Output