auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

siunitx support


From: Ikumi Keita
Subject: siunitx support
Date: Tue, 11 Jan 2022 03:50:14 +0900

>>>>> Arash Esbati <arash@gnu.org> writes:
> I'm not sure if the key-values from v2 work also with v3. I did a
> brief test by copying some snippets from the manual which worked, but
> maybe it was pure luck. Do you know more?

Unfortunately, no.

> It explicitly says that one has to use v2:

>     When the physics package is loaded before siunitx, the command \qty
>     is not defined: users will need to use the version 2 command \SI.

>     When the units package is loaded before siunitx, the command \unit
>     is not defined: users will need to use the version 2 command \si.

My interpretation of those sentences is that they say "use \SI and \si
with siunitx.sty v3." Actually, the following document typesets without
problems for me.

\documentclass{article}

\usepackage{physics}
\usepackage{units}
\usepackage{siunitx} % loads siunitx.sty v3, not v2

\begin{document}
\SI{30.1}{\kilogram} \si{\unit{\kilo\gram\metre\per\square\second}}
\end{document}

>> (Maybe siunitx.el should refrain from adding "\qty" support when
>> physics.sty is loaded and "\unit" support when units.sty is loaded in
>> the document.)

> Maybe I'm misreading the above, but isn't that what siunitx is doing?

I'm talking about siunitx.el, not siunitx.sty ;-) Current siunitx.el
runs TeX-add-symbols for \qty and \unit unconditionally. That isn't nice
when the document loads physics.sty or units.sty (or both).

> If the new key-values work with v2, I can add those old macros back to
> siunitx.el and make a comment in the file.

Sounds good :-)

Regards,
Ikumi Keita



reply via email to

[Prev in Thread] Current Thread [Next in Thread]