diff options
author | Karl Berry <karl@freefriends.org> | 2021-06-02 20:59:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-06-02 20:59:05 +0000 |
commit | d33b92d9d4a7e58fe1a2b2a7795a1ac51b25f0b3 (patch) | |
tree | 98f483a0f383e0cbcd33b6f450836843d0732c58 /Master/texmf-dist/source/latex/siunitx/siunitx.tex | |
parent | 3b90242ab28c1c59546d3cf26e0663803f397407 (diff) |
siunitx (2jun21)
git-svn-id: svn://tug.org/texlive/trunk@59437 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx/siunitx.tex')
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.tex | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.tex b/Master/texmf-dist/source/latex/siunitx/siunitx.tex index 76afc348615..86db9afa6c9 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.tex +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.tex @@ -3219,6 +3219,54 @@ also be done using \pkg{siunitx} (Table~\ref{tbl:xmpl:unrel}). \end{table} \end{LaTeXdemo} +\subsection{Regression tables% + \label{sec:hint:regression}} + +In some subject areas, it is common to present regression values or similar, +which feature an uncertainty value in parenthesis on the line below the main +value. As these are separate cells, they cannot be entered using \pkg{siunitx} +in one value. There are a couple of ways of formatting them using the package, +depending on whether the values also need to be parsed. + +Where parsing is not required, the most straight-forward method is available: +provide a model format allowing space for an extra \enquote{digit} at each end, +which will then allow for the parenthesis. If a sign is applied to the number, +it may not be necessary to add a \enquote{digit} for the leading bracket. If +parsing is also required, this approach cannot be employed. Instead, the +parsing needs to be adjusted such that |(| and |)| are not treated as part of +the number, and \opt{table-align-text-pre} is set to |false| such that these +will be placed next to the numerical part. These methods are illustrated in +Table~\ref{tab:regression}. + +\begin{LaTeXdemo}[code and float] + \begin{table} + \caption{Regression tables% + \label{tab:regression} + } + \begin{tabular} + { + @{} + S[table-format = 2.4, parse-numbers = false] + S[table-format = +1.4, parse-numbers = false] + S[ + input-open-uncertainty = , + input-close-uncertainty = , + minimum-decimal-digits = 3, % ( + table-format = +1.3), + table-align-text-pre = false + ] + @{} + } + \toprule + {Header} &{Header} & {Header} \\ + \midrule + 1.234 & -1.234 & -1.23 \\ + (0.053) & (0.053) & (0.053) \\ + \bottomrule + \end{tabular} + \end{table} +\end{LaTeXdemo} + \subsection{Maximising performance% \label{sec:hint:performance}} @@ -3235,6 +3283,17 @@ systems: ]{7.3}{\Hz} \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, +you should favour +\begin{LaTeXdemo}[code only] + \begin{table} + \sisetup{...} + \begin{tabular}{S} + ... +\end{LaTeXdemo} +for common settings. + \subsection{Special considerations for the \cs{kWh} unit% \label{sec:hint:kWh}} |