diff options
author | Norbert Preining <norbert@preining.info> | 2021-05-21 03:01:23 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-05-21 03:01:23 +0000 |
commit | 6a52d8839d334ac56f36195aa404fac667862830 (patch) | |
tree | 826593c6af503aaaf2691f8e96912485428ef595 /macros/latex/contrib/siunitx/siunitx.tex | |
parent | 6d6c3b4ee419b9f485a213d2ece28b06e9ca2f7c (diff) |
CTAN sync 202105210301
Diffstat (limited to 'macros/latex/contrib/siunitx/siunitx.tex')
-rw-r--r-- | macros/latex/contrib/siunitx/siunitx.tex | 83 |
1 files changed, 67 insertions, 16 deletions
diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex index e7035ee5c8..191e619490 100644 --- a/macros/latex/contrib/siunitx/siunitx.tex +++ b/macros/latex/contrib/siunitx/siunitx.tex @@ -706,6 +706,7 @@ standard \pkg{siunitx} settings only create these abbreviations within the scope of the \cs{unit} and \cs{qty} functions, meaning that no clashes should occur (for example with the standard \cs{pm} symbol). \begin{center} + \tablecaption{Unit abbreviations} \label{tab:unit:abbr} \tablefirsthead{% \toprule @@ -2397,25 +2398,26 @@ to the layout of tabular material (Table~\ref{tab:opt:tables}). \end{tabular} \end{table} -\DescribeOption{table-mode} +\DescribeOption{table-alignment-mode} The method used by \pkg{siunitx} to align numbers is selected using the -\opt{table-mode} option, which may be one of \opt{marker}, \opt{format} or -\meta{none}. With the standard setting, \meta{marker}, the package centers the -decimal marker in a tabular column, potentially leaving white space at the -shorter end of a number. The \meta{format} mode uses information from the -\meta{table-format} key to construct a model: this is then used to define the -space available to a number. For asymmetrical numbers, this method is strongly -preferable. Finally, \opt{none} disables alignment entirely: numbers are simply -parsed. +\opt{table-alignment-mode} option, which may be one of \opt{marker}, +\opt{format} or \meta{none}. With the standard setting, \meta{marker}, the +package centers the decimal marker in a tabular column, potentially leaving +white space at the shorter end of a number. The \meta{format} mode uses +information from the \meta{table-format} key to construct a model: this is then +used to define the space available to a number. For asymmetrical numbers, this +method is strongly preferable. Finally, \opt{none} disables alignment entirely: +numbers are simply parsed. \DescribeOption{table-number-alignment} -When \opt{table-mode} is set to \meta{format} or \meta{none}, the placement of -the number \enquote{block} within the cell as a whole is set by the -\meta{table-number-alignment} option, which may be one of \meta{left}, -\meta{center} or \meta{right}. (When \opt{table-mode} is set to \meta{marker}, -the decimal marker is always centered in the cell.) The different alignment -choices are illustrated in Table~\ref{tab:S:align}, which uses somewhat -exaggerated column headings to show the relative position of the cell contents. +When \opt{table-alignment-mode} is set to \meta{format} or \meta{none}, the +placement of the number \enquote{block} within the cell as a whole is set by +the \meta{table-number-alignment} option, which may be one of \meta{left}, +\meta{center} or \meta{right}. (When \opt{table-alignment-mode} is set to +\meta{marker}, the decimal marker is always centered in the cell.) The +different alignment choices are illustrated in Table~\ref{tab:S:align}, which +uses somewhat exaggerated column headings to show the relative position of the +cell contents. \begin{LaTeXdemo}[code and float] \begin{table} \caption{Aligning the \texttt{S} column.% @@ -2846,6 +2848,12 @@ $3$. A significant number of key--value settings have new, more descriptive, names. Where possible, older names are mapped to newer ones internally: you will be warned in the log if this is the case. +Updating to the latest edition of the \acro{SI} Brochure means that a small +number of unit macros have been removed: of those accepted for use, +\cs{angstrom} is no longer present, whilst the units determined experimentally +are all no longer listed (\cs{atomicmassunit}, \cs{bohr}, \cs{clight}, +\cs{electronmass}, \cs{elementarycharge}, \cs{hartree}, \cs{plackbar}). + It is possible to use the \LaTeXe{} kernel mechanism to load the last version~$2$ release for documents that cannot be successfully processed using version~$3$. This can be achieved using @@ -2875,6 +2883,8 @@ notably \item prefixes can only be interconverted with numbers as part of a quantity, not as stand-alone units. \end{itemize} +See Section~\ref{sec:hint:prefixes} for how to work with the new approach +if you want to print prefix information. The font control system has been completely re-written for version~$3$. The method used is entirely different from version~$2$. Emulation is therefore not @@ -3304,6 +3314,47 @@ appropriate code would be \addto\extrasgerman{\sisetup{locale = DE}} \end{LaTeXdemo} +\subsection{Symbolic \enquote{digits}% + \label{sec:hint:symbols}} + +In some cases you may want to use \enquote{digits} which do not fall within the +usual set |0123456789|. This can be done by setting the \opt{input-digits} +option, but bearing in mind that this will affect (prevent) for example +rounding. +\begin{LaTeXdemo} + \sisetup{input-digits = 0123456789\pi}% + \num{4\pi e-7} +\end{LaTeXdemo} +Each extra entry should be a single token, and should either have a definition +which is safe in both math and text mode, or should only be used when the +output mode is known. + +\subsection{Demonstrating prefixes + \label{sec:hint:prefixes}} + +As \pkg{siunitx} contains data about the numerical values of unit prefixes, +you may wish to print this in an automated way. Prefixes cannot be given +on their own, but it is possible to create a \enquote{do nothing} unit. +\begin{LaTeXdemo}[code only] + \DeclareSIUnit\noop{\relax} +\end{LaTeXdemo} +which can then be used to show just the prefix symbol. +\begin{LaTeXdemo} + \unit{\yotta\noop} +\end{LaTeXdemo} +To show just the numerical value of a prefix, you will need to use \cs{qty} +and appropriate settings. +\begin{LaTeXdemo} + \qty[prefix-mode = extract-exponent, print-unity-mantissa = false]% + {1}{\yotta\noop} +\end{LaTeXdemo} +This may be conveniently wrapped up inside a document command, for example +\begin{LaTeXdemo}[code only] + \NewDocumentCommand\prefixvalue{m}{% + \qty[prefix-mode=extract-exponent,print-unity-mantissa=false]{1}{#1\noop} + } +\end{LaTeXdemo} + \section{Using (\acro{SI}) units} Consistent and logical units are a necessity for scientific work, and have |