diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx/siunitx.tex')
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.tex | 348 |
1 files changed, 272 insertions, 76 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.tex b/Master/texmf-dist/source/latex/siunitx/siunitx.tex index 8854ff3f75b..b10016c3b47 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.tex +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.tex @@ -46,7 +46,7 @@ for those people who are interested. \textsc { \exp_args:NV \tl_if_head_eq_charcode:nNTF \f@series { m } - { \tl_lower_case:n } + { \text_lowercase:n } { \use:n } {#1} } @@ -79,7 +79,7 @@ for those people who are interested. } % For demos -\usepackage[french,german,polish,spanish,UKenglish]{babel} +\usepackage[portuguese,brazilian,catalan,french,german,polish,spanish,UKenglish]{babel} \AtBeginDocument{\shorthandoff{:<>}} \usepackage{translations} \usepackage{cancel} @@ -508,18 +508,20 @@ adjustment of the numerical values. \cs{complexnum}\oarg{options}\marg{number} \end{syntax} \end{function} -Typesets the complex number, which must be given in the form $a + b\mathrm{i}$ -or $a + \mathrm{i}b$. Processing of the numerical parts is otherwise identical -to the standard \cs{num} command. +Typesets the complex number, which can be given in the Cartesian form $a + +b\mathrm{i}$ or $a + \mathrm{i}b$, or in the polar form $r$\texttt{:}$\theta$. +Processing of the numerical parts is otherwise identical to the standard +\cs{num} command. \begin{function}{\complexqty} \begin{syntax} \cs{complexqty}\oarg{options}\marg{number}\marg{unit} \end{syntax} \end{function} -Typesets the complex quantity, which must be given in the form $a + b\mathrm{i}$ -or $a + \mathrm{i}b$. Processing of the numerical parts is otherwise identical -to the standard \cs{qty} command. +Typesets the complex number, which can be given in the Cartesian form $a + +b\mathrm{i}$ or $a + \mathrm{i}b$, or in the polar form $r$\texttt{:}$\theta$. +Processing of the numerical parts is otherwise identical to the standard +\cs{qty} command. \subsection{The unit macros} @@ -833,6 +835,7 @@ occur (for example with the standard \cs{pm} symbol). \midrule \DescribeUnit[watt]{W} \\ + \DescribeUnit[nanowatt]{nW} \\ \DescribeUnit[microwatt]{uW} \\ \DescribeUnit[milliwatt]{mW} \\ \DescribeUnit[kilowatt]{kW} \\ @@ -861,11 +864,21 @@ occur (for example with the standard \cs{pm} symbol). \midrule \DescribeUnit[henry]{H} \\ + \DescribeUnit[femtohenry]{fH} \\ + \DescribeUnit[picohenry]{pH} \\ + \DescribeUnit[nanohenry]{nH} \\ \DescribeUnit[millihenry]{mH} \\ \DescribeUnit[microhenry]{uH} \\ \midrule + \DescribeUnit[coulomb]{C} \\ + \DescribeUnit[nanocoulomb]{nC} \\ + \DescribeUnit[millicoulomb]{mC} \\ + \DescribeUnit[microcoulomb]{uC} \\ + + \midrule + \DescribeUnit[kelvin]{K} \\ \midrule @@ -1116,20 +1129,22 @@ Table~\ref{tab:opt:print}. Type & \multicolumn{1}{l@{}}{Default} \\ \midrule - color & Literal & \meta{none} \\ - mode & Choice & math \\ - number-color & Literal & \meta{none} \\ - number-mode & Choice & math \\ - propagate-math-font & Switch & false \\ - reset-math-version & Switch & true \\ - reset-text-family & Switch & true \\ - reset-text-series & Switch & true \\ - reset-text-shape & Switch & true \\ - text-family-to-math & Switch & false \\ - text-font-command & Literal & \meta{none} \\ - text-series-to-math & Switch & false \\ - unit-color & Literal & \meta{none} \\ - unit-mode & Choice & math \\ + color & Literal & \meta{none} \\ + mode & Choice & math \\ + number-color & Literal & \meta{none} \\ + number-mode & Choice & math \\ + propagate-math-font & Switch & false \\ + reset-math-version & Switch & true \\ + reset-text-family & Switch & true \\ + reset-text-series & Switch & true \\ + reset-text-shape & Switch & true \\ + text-family-to-math & Switch & false \\ + text-font-command & Literal & \meta{none} \\ + text-subscript-command & Literal & \cs{textsubscript} \\ + text-superscript-command & Literal & \cs{textsuperscript} \\ + text-series-to-math & Switch & false \\ + unit-color & Literal & \meta{none} \\ + unit-mode & Choice & math \\ \bottomrule \end{tabular} \end{table} @@ -1224,6 +1239,24 @@ font variant which does not feature them. \qty{123456789}{\kilo\volt\per\centi\metre} \end{LaTeXdemo} +\DescribeOption{text-subscript-command} +\DescribeOption{text-superscript-command} +In most cases, the commands \cs{textsubscript} and \cs{textsuperscript} are +appropriagte for creating sub- and superscript material in text mode. However, +when the \pkg{realscripts} package is loaded, it is possible that the output is +not as desired. These two commands are therefore available to allow tuning of +the results. They can also be used for non-standard effects, for example as +here adding color to subscripts. +\begin{LaTeXdemo} + \sisetup{unit-mode = text} + \unit{\kg\of{polymer}} \\ + \newcommand*\mysubscript[1]{% + \textsubscript{\textcolor{blue}{#1}}% + } + \sisetup{text-subscript-command = \mysubscript} + \unit{\kg\of{polymer}} +\end{LaTeXdemo} + \DescribeOption{color} \DescribeOption{number-color} \DescribeOption{unit-color} @@ -1272,6 +1305,7 @@ Table~\ref{tab:opt:num:in}. parse-numbers & Switch & true \\ retain-explicit-decimal-marker & Switch & false \\ retain-explicit-plus & Switch & false \\ + retain-negative-zero & Switch & false \\ retain-zero-uncertainty & Switch & false \\ \bottomrule \end{tabular} @@ -1331,6 +1365,12 @@ marker is seen in for example some \acro{NIST} publications.} \num{123.4(12)} \\ \num{123.4(1.2)} \end{LaTeXdemo} +Multiple uncertainties may also be given: these must all either be in the short +or the long form. +\begin{LaTeXdemo} + \num{123.4(12)(45)} \\ + \num{123.4 \pm 1.2 \pm 4.5} +\end{LaTeXdemo} \DescribeOption{parse-numbers} The \opt{parse-numbers} option turns the entire parsing system on and off. The @@ -1364,6 +1404,7 @@ most notably in that a decimal marker must be |.|. \DescribeOption{retain-explicit-decimal-marker} \DescribeOption{retain-explicit-plus} +\DescribeOption{retain-negative-zero} \DescribeOption{retain-zero-uncertainty} In some areas, a trailing decimal marker with no decimal part present is used to show that zeros in the integer part are significant. This can be enabled @@ -1372,13 +1413,16 @@ leading plus sign is usually unnecessary for positive numbers, and so they are not retained as-standard when parsing. The \opt{retain-explicit-plus} option is available to control this behaviour. Similarly, an uncertainty of zero is normally not meaningful, and so is ignored by the parser. This can be -controlled using the -\opt{retain-zero-uncertainty} option. +controlled using the \opt{retain-zero-uncertainty} option. Finally, a negative +sign for an entirely zero value may or may not have significance: this is +controlled by the \opt{retain-negative-zero} option. \begin{LaTeXdemo} \num{10.} \\ \num[retain-explicit-decimal-marker]{10.} \\ \num{+345} \\ \num[retain-explicit-plus]{+345} \\ + \num{-0} \\ + \num[retain-negative-zero]{-0} \\ \num{12.3(0)} \\ \num[retain-zero-uncertainty]{12.3(0)} \end{LaTeXdemo} @@ -1409,6 +1453,7 @@ way; the options are summarised in Table~\ref{tab:opt:num:post}. round-mode & Choice & none \\ round-pad & Switch & true \\ round-precision & Integer & 2 \\ + round-zero-positive & Switch & true \\ \bottomrule \end{tabular} \end{table} @@ -1542,6 +1587,18 @@ possible to obtain the value zero in these cases. \num{0.0045} \end{LaTeXdemo} +\DescribeOption{round-zero-positive} +When rounding negative numbers to a fixed number of places, a zero value may +result. Usually this is expressed as an unsigned value, but in some cases +retaining the negative sign may be desirable. This behaviour can be controlled +using the \opt{round-zero-positive} switch. +\begin{LaTeXdemo} + \sisetup{round-mode = places}% + \num{-0.001} \\ + \sisetup{round-zero-positive = false}% + \num{-0.001} +\end{LaTeXdemo} + \DescribeOption{drop-zero-decimal} It may be desirable to convert decimals to integers when the decimal part is zero. This is set up using the \opt{drop-zero-decimal} option, which applies @@ -1582,24 +1639,32 @@ conveys. The options are summarised in Table~\ref{tab:opt:num:out}. Type & \multicolumn{1}{l}{Default} \\ \midrule - bracket-negative-numbers & Switch & false \\ - exponent-base & Literal & 10 \\ - exponent-product & Math & \verb=\times= \\ - group-digits & Choice & all \\ - group-minimum-digits & integer & 5 \\ - group-separator & Literal & \cs{,} \\ - negative-color & Literal & \meta{none} \\ ^^A ( - output-close-uncertainty & Literal & ) \\ - output-decimal-marker & Literal & . \\ - output-exponent-marker & Literal & \meta{none} \\ - output-open-uncertainty & Literal & ( \\ ^^A ) - print-implicit-plus & Switch & false \\ - print-unity-mantissa & Switch & true \\ - print-zero-exponent & Switch & false \\ - print-zero-integer & Switch & false \\ - tight-spacing & Switch & false \\ - uncertainty-mode & Choice & compact \\ - uncertainty-separator & Literal & \meta{none} \\ + bracket-negative-numbers & Switch & false \\ + digit-group-size & Integer & 3 \\ + digit-group-first-size & Integer & 3 \\ + digit-group-other-size & Integer & 3 \\ + exponent-base & Literal & 10 \\ + exponent-product & Math & \verb=\times= \\ + group-digits & Choice & all \\ + group-minimum-digits & Integer & 5 \\ + group-separator & Literal & \cs{,} \\ + negative-color & Literal & \meta{none} \\ ^^A ( + output-close-uncertainty & Literal & ) \\ + output-decimal-marker & Literal & . \\ + output-exponent-marker & Literal & \meta{none} \\ + output-open-uncertainty & Literal & ( \\ ^^A ) + print-implicit-plus & Switch & false \\ + print-unity-mantissa & Switch & true \\ + print-zero-exponent & Switch & false \\ + print-zero-integer & Switch & false \\ + tight-spacing & Switch & false \\ + uncertainty-descriptor-mode & Choice & bracket-separator \\ + uncertainty-descriptor-separator & Literal & \cs{ } \\ + uncertainty-descriptors & Literal & \meta{none} \\ + uncertainty-mode & Choice & compact \\ + uncertainty-separator & Literal & \meta{none} \\ + zero-decimal-as-symbol & Switch & false \\ + zero-symbol & Literal & \verb=\mbox{---}= \\ \bottomrule \end{tabular} \end{table} @@ -1643,6 +1708,21 @@ separately for the integer and decimal parts of the number: grouping does not \num[group-minimum-digits = 5]{12345.67890} \end{LaTeXdemo} +\DescribeOption{digit-group-size} +\DescribeOption{digit-group-first-size} +\DescribeOption{digit-group-other-size} +The number of digits in each group can be controlled by the setting +\opt{digit-group-size}, which has standard value $3$. Finer control can be +achieved using \opt{digit-group-first-size} and \opt{digit-group-other-size}: +the first group is that immediately by the decimal point, the other value +applies to the second and subsequent groupings. These can be used for +example to achieve the grouping typically used in India (lakh). +\begin{LaTeXdemo} + \num{1234567890} \\ + \num[digit-group-size = 5]{1234567890} \\ + \num[digit-group-other-size = 2]{1234567890} +\end{LaTeXdemo} + \DescribeOption{output-decimal-marker} The decimal marker used in output is set using the \opt{output-decimal-marker} option; this can differ from the input marker. @@ -1672,9 +1752,9 @@ stored will be used in place of the normal product and base combination. \DescribeOption{output-open-uncertainty} \DescribeOption{output-close-uncertainty} \DescribeOption{uncertainty-separator} -When input is given including an uncertainty in a number, it can be printed -either with the uncertainty in brackets or as a separate number. This behaviour -is controlled by the \opt{uncertainty-mode} choice.When this is set to +When input is given including a single uncertainty, it can be printed either +with the uncertainty in brackets or as a separate number. This behaviour is +controlled by the \opt{uncertainty-mode} choice. When this is set to \opt{separate}, the uncertainty is printed as an entirely separate number preceded by \cs{pm}. Other settings all place the uncertainty in brackets directly attached to the main value. The standard setting of \opt{compact} @@ -1707,6 +1787,24 @@ respectively. Tokens may be inserted before the opening bracket using \num{1.234(5)} \end{LaTeXdemo} +\DescribeOption{uncertainty-descriptors} +\DescribeOption{uncertainty-descriptor-mode} +\DescribeOption{uncertainty-descriptor-separator} +Multiple uncertainties can be given for a number. These are always printed in a +separated form. When there is more than one uncertainty part, it may be useful +to describe the nature of this value. This can be achieved using the +\opt{uncertainty-descriptors} option, which take a comma-separated list of +descriptions. The formatting of the descriptors can be adjusted using the +settings \opt{uncertainty-descriptor-mode} and +\opt{uncertainty-descriptor-separator}. The choices for the \opt{mode} are +\opt{bracket}, \opt{bracket-separator}, \opt{separator} and \opt{subscript}. +\begin{LaTeXdemo} + \num{1.2(3)(4)} \\ + \sisetup{uncertainty-descriptors = {sys, stat}} + \num{1.2(3)(4)} \\ + \num[uncertainty-descriptor-mode = subscript]{1.2(3)(4)} +\end{LaTeXdemo} + \DescribeOption{bracket-ambiguous-numbers} There are certain combinations of numerical input which can be ambiguous. This can be corrected by adding brackets in the appropriate place, and is controlled @@ -1775,6 +1873,18 @@ printed (\foreign{i.e.}~\opt{print-zero-exponent} has a higher priority). \num[print-zero-integer = false]{0.123} \end{LaTeXdemo} +\DescribeOption{zero-decimal-as-symbol} +\DescribeOption{zero-symbol} +In some areas, particularly financial, entirely zero decimal parts are +replaced by a dash. This is supported by option \opt{zero-decimal-as-symbol}, +which then uses the material stored using \opt{zero-symbol} as the replacement. +\begin{LaTeXdemo} + \num{123.00} \\ + \sisetup{zero-decimal-as-symbol} + \num{123.00} \\ + \num[zero-symbol = \text{[{---}]}]{123.00} +\end{LaTeXdemo} + \subsection{Lists, products and ranges} Lists, products and ranges of numbers and quantities have a small number of @@ -1938,13 +2048,35 @@ numbers; these are summarised in Table~\ref{tab:opt:num:complex}. Type & \multicolumn{1}{l@{}}{Default} \\ \midrule + complex-angle-unit & Choice & degrees \\ + complex-mode & Choice & input \\ complex-root-position & Choice & after-number \\ + complex-symbol-angle & Literal & \cs{angle} \\ + complex-symbol-degree & Literal & \cs{degree} \\ input-complex-root & Literal & ij \\ output-complex-root & Literal & \verb=\mathrm{i}= \\ \bottomrule \end{tabular} \end{table} +\DescribeOption{complex-mode} +The format in which complex values are printed can be set using the +\opt{complex-mode} option. With the standard setting (\opt{input}), the complex +value is printed as-given. By setting the option to \opt{cartesian} or +\opt{polar}, the output format can be set to an Cartesian or polar form. +Conversion uses the \LaTeX3 floating-point unit, so is limited to $16$ decimal +places. When converting from Cartesian to polar form, the complex root symbol +must come at the \emph{end} of the imaginary part. It must also be specified +using \texttt{i}. +\begin{LaTeXdemo} + \complexnum{1 + i} \\ + \complexnum{1:45} \\ + \complexnum[complex-mode = cartesian]{1 + i} \\ + \complexnum[complex-mode = cartesian, round-mode = places]{1:45} \\ + \complexnum[complex-mode = polar]{1 + i} \\ + \complexnum[complex-mode = polar]{1:45} +\end{LaTeXdemo} + \DescribeOption{input-complex-root} When using complex numbers in input, the complex root $(\mathrm{i} = \sqrt{-1}\,)$ is indicated by one of the tokens stored in @@ -1974,6 +2106,21 @@ using the \opt{output-complex-root} setting. \complexnum[complex-root-position = after-number]{67-0.9i} \end{LaTeXdemo} +\DescribeOption{complex-angle-unit} +\DescribeOption{complex-symbol-angle} +\DescribeOption{complex-symbol-degree} +When printing or converting to polar form, the angle may be interpreted in +units set by \opt{complex-angle-unit}: one of \opt{degrees} or \opt{radians}. +The symbol used to denote the angle, and that used for units of degrees, +are controlled by the options \opt{complex-symbol-angle} and +\opt{complex-symbol-degree}, respectively. +\begin{LaTeXdemo} + \complexqty{1:1}{\ohm} \\ + \complexqty[complex-angle-unit = radians]{1:1}{\ohm} \\ + \complexqty[complex-symbol-angle = \mathrm{A}]{1:1}{\ohm} \\ + \complexqty[complex-symbol-degree = d]{1:1}{\ohm} +\end{LaTeXdemo} + \subsection{Angles} Angle processing provided by the \cs{ang} function has a set of options which @@ -2180,17 +2327,19 @@ the output directly (Table~\ref{tab:opt:units:out}). Type & \multicolumn{1}{l@{}}{Default} \\ \midrule - bracket-unit-denominator & Switch & true \\ - forbid-literal-units & Switch & false \\ - fraction-command & Literal & \cs{frac} \\ - inter-unit-product & Literal & \cs{,} \\ - parse-units & Switch & true \\ - per-mode & Choice & power \\ - per-symbol & Literal & / \\ - qualifier-mode & Choice & subscript \\ - qualifier-phrase & Literal & \meta{empty} \\ - sticky-per & Switch & false \\ - unit-font-command & Literal & \cs{mathrm} \\ + bracket-unit-denominator & Switch & true \\ + forbid-literal-units & Switch & false \\ + fraction-command & Literal & \cs{frac} \\ + inter-unit-product & Literal & \cs{,} \\ + parse-units & Switch & true \\ + per-mode & Choice & power \\ + per-symbol-script-correction & Literal & \cs{!} \\ + per-symbol & Literal & / \\ + power-half-as-sqrt & Switch & false \\ + qualifier-mode & Choice & subscript \\ + qualifier-phrase & Literal & \meta{empty} \\ + sticky-per & Switch & false \\ + unit-font-command & Literal & \cs{mathrm} \\ \bottomrule \end{tabular} \end{table} @@ -2207,6 +2356,8 @@ centred dot. To get the correct spacing it is necessary to use \end{LaTeXdemo} \DescribeOption{per-mode} +\DescribeOption{display-per-mode} +\DescribeOption{inline-per-mode} \DescribeOption{per-symbol} \DescribeOption{fraction-command} \DescribeOption{bracket-unit-denominator} @@ -2233,7 +2384,7 @@ unit by setting \opt{per-mode} to \opt{symbol}; the symbol used is stored using the setting \opt{per-symbol}. This method for displaying units can be ambiguous, and so brackets are added unless \opt{bracket-unit-denominator} is set to \opt{false}. Notice that \opt{bracket-unit-denominator} only applies -when \opt{per-mode} is set to \opt{symbol} or \opt{symbol-or-fraction}. +when \opt{per-mode} is set to \opt{symbol}. \begin{LaTeXdemo} \sisetup{per-mode = symbol}% \unit{\joule\per\mole\per\kelvin} \\ @@ -2246,12 +2397,26 @@ is also available to repeat the symbol for each \cs{per}. \begin{LaTeXdemo} \unit[per-mode = repeated-symbol]{\joule\per\mole\per\kelvin} \end{LaTeXdemo} -Finally, it is possible for the behaviour of the \cs{per} function to depend on -the prevailing math style. Setting \opt{per-mode} to \opt{symbol-or-fraction} -will use the \opt{symbol} setting for in line math, and the \opt{fraction} -setting when used in display math. +The use of a symbol can be restricted to the case where exactly one is +required: the setting \opt{single-symbol} will use a symbol if and only +if there are one or more positive powers and exactly one negative power. +In other cases, powers are used. +\begin{LaTeXdemo} + \sisetup{per-mode = single-symbol} + \qty{10}{\per\metre} \\ + \qty{20}{\metre\per\second} \\ + \qty{30}{\joule\per\mole\per\kelvin} +\end{LaTeXdemo} +It is possible for the behaviour of the \cs{per} function to depend on the +prevailing math style. Setting either \opt{display-per-mode} or +\opt{inline-per-mode} independently can be used to achieve this. For example, +the following example will will use the \opt{symbol} setting for in line math, +and the \opt{fraction} setting when used in display math. \begin{LaTeXdemo} - \sisetup{per-mode = symbol-or-fraction}% + \sisetup{ + display-per-mode = fraction , + inline-per-mode = symbol + }% $ \unit{\joule\per\mole\per\kelvin} $ \[ \unit{\joule\per\mole\per\kelvin} \] \unit{\joule\per\mole\per\kelvin} \\ @@ -2265,6 +2430,17 @@ setting when used in display math. \] \end{LaTeXdemo} +\DescribeOption{per-symbol-script-correction} +When using the \opt{symbol} setting for \opt{per-mode}, there may the need to +adjust spacing between a superscript power and the symbol. This is provided as +a command to be inserted between the two items: the standard value is a thin +negative space, \cs{!}. +\begin{LaTeXdemo} + \sisetup{per-mode = symbol}% + \unit{\cm\cubed\per\gram} \\ + \unit[per-symbol-script-correction = ]{\cm\cubed\per\gram} +\end{LaTeXdemo} + \DescribeOption{sticky-per} By default, \cs{per} applies only to the next unit given.\footnote{This is the standard method of reading units in English: for example, @@ -2299,6 +2475,15 @@ example a space or other linking text to be inserted. \unit{\kilogram\of{pol}\squared\per\mole\of{cat}\per\hour} \end{LaTeXdemo} +\DescribeOption{power-half-as-sqrt} +In some cases, the power of $0.5$ is shown by giving the unit symbol as a +square root. This can be enabled by setting \opt{power-half-as-sqrt} to +\opt{true} +\begin{LaTeXdemo} + \unit{\Hz\tothe{0.5}} \\ + \unit[power-half-as-sqrt]{\Hz\tothe{0.5}} +\end{LaTeXdemo} + \DescribeOption{parse-units} Normally, \pkg{siunitx} is used with the unit parse enabled, and only prints units directly if there is literal input. However, if the input is known to be @@ -3028,11 +3213,10 @@ unit which remains accepted. \section{Localisation} -The \pkg{translations} package provides a structured framework for localisation -of words and phrases, and is part of the larger \pkg{beamer} bundle. The -\pkg{translations} package provides the \cs{translate} macro, which will provide -appropriate translations based on the current \pkg{babel} or \pkg{polyglossia} -language setting. +The \pkg{translations} package provides a structured framework for +localisation of words and phrases. In particular, it offers the +\cs{GetTranslation} macro, which will provide appropriate translations based +on the current \pkg{babel} or \pkg{polyglossia} language setting. If \pkg{translations} is available, \pkg{siunitx} will load it and alter the standard settings for the \opt{list-final-separator} and \opt{range-phrase} @@ -3044,9 +3228,10 @@ options to read: range-phrase = { \GetTranslation{to (numerical range)} }, } \end{LaTeXdemo} -If the current language is known to the \pkg{translator} package then the +If the current language is known to the \pkg{translations} package then the result will be localised text. The preamble for this manual loads English, -French, German, Polish and Spanish as options, and also loads the \pkg{babel} package: +French, German, Polish, Spanish, Catalan, Portuguese and Brazilian as options, +and also loads the \pkg{babel} package: \begin{LaTeXdemo} % In English by default \numlist{1;2;3} \\ @@ -3062,6 +3247,15 @@ French, German, Polish and Spanish as options, and also loads the \pkg{babel} pa \numrange{1}{10} \\ \selectlanguage{spanish}% \numlist{1;2;3} \\ + \numrange{1}{10} \\ + \selectlanguage{catalan}% + \numlist{1;2;3} \\ + \numrange{1}{10} \\ + \selectlanguage{portuguese}% + \numlist{1;2;3} \\ + \numrange{1}{10} \\ + \selectlanguage{brazilian}% + \numlist{1;2;3} \\ \numrange{1}{10} \end{LaTeXdemo} @@ -3071,12 +3265,14 @@ In general, \pkg{siunitx} should be usable with other packages without interference. When the \pkg{physics} package is loaded before \pkg{siunitx}, the command -\cs{qty} is not defined: users will need to use the version~$2$ command -\cs{SI}. - -When the \pkg{units} package is loaded before \pkg{siunitx}, the command -\cs{unit} is not defined: users will need to use the version~$2$ command -\cs{si}. +\cs{qty} is not defined. Users may use the version~$2$ command \cs{SI}, +which can be used as a drop-in replacement for \cs{qty}. Alternatively, +if the \pkg{siunitx} definition is preferred, you may use +\begin{LaTeXdemo}[code only] + \AtBeginDocument{\RenewCommandCopy\qty\SI} +\end{LaTeXdemo} +and use the longer name \cs{quantity} to access the functionality of the +\pkg{physics} package. \section{Hints for using \pkg{siunitx}} @@ -3391,7 +3587,7 @@ systems: \end{LaTeXdemo} For tables, any settings that can be given before the table are only parsed once, -whereas given in the optional argument to |S| they are read in ever cell. As such, +whereas given in the optional argument to |S| they are read in every cell. As such, you should favour \begin{LaTeXdemo}[code only] \begin{table} |