Tag Info

Hot answers tagged

7

I do not know about the typesetting of units in the astronomy, thus I cannot say, how the "h" should be typeset, but an "h" in math italics is easy: \documentclass{article} \usepackage{siunitx} \DeclareSIUnit \h {\ensuremath{\mathit{h}}} \DeclareSIUnit \parsec {pc} \begin{document} \si{\per\h\mega\parsec} \end{document}


6

Escape in text mode and then use math mode. \documentclass{article} \usepackage{siunitx} \DeclareSIUnit \h {\mbox{$h$}} \DeclareSIUnit \parsec {pc} \begin{document} \si{\per\h\mega\parsec} \si[per-mode=fraction]{\per\h\mega\parsec} \end{document}


6

Use the max function provided by expl3 in the fp module: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\findLargest}{ om } { \IfNoValueTF{#1} {% separator is a comma, directly use \fp_eval:n { max ( #2 ) } \engbird_compute_max:n { #2 } } {% we need to pass the separator \engbird_find_largest:nn { #1 } { ...


6

You need to tell siunitx how many digits are to the left and right of the decimal separator (alignment point). The key table-format does the trick. Note also that here, a brace group is sufficient to escape the header text. The \multicolumn solution is only required in special cases. \documentclass{article} \usepackage{booktabs} \usepackage{siunitx} ...


5

Just convince siunitx to use your newly created font family by: \sisetup{text-rm=\oldstyle} full example: \documentclass{standalone} \usepackage{fontspec} \setmainfont{TeX Gyre Pagella} \newfontfamily\oldstyle[Numbers={Monospaced,OldStyle}]{TeX Gyre Pagella} \usepackage[detect-all]{siunitx} \AtBeginDocument{ \sisetup{text-rm=\oldstyle} } ...


4

\documentclass{article} \usepackage{booktabs} \usepackage{siunitx} \begin{document} \begin{tabular}{r@{--}lS[table-format=2.1]} \toprule \multicolumn{2}{c}{Bracket (\$)} & {Marginal Tax Rate (\%)} \\ \midrule 0 & 9,075 & 10 \\ 9,075 & 36,900 & 15 \\ 36,900 & 89,350 & 25 \\ 89,350 & 186,350 & 28 \\ 186,350 ...


3

The best thing is to add ($) to all headers: repeating $ in several cells is boring and dull. \documentclass{article} \usepackage{booktabs} \usepackage{siunitx} \sisetup{ group-separator={,}, group-four-digits, } \begin{document} \begin{tabular}{ l S[table-format=3.2] S[table-format=2.0] S[table-format=4.2] } \toprule Plan & {Phone cost} ...


3

You need to tell siunitx the format of the numbers you are feeding him. This is what I would do to solve your problem : \documentclass{article} \usepackage{booktabs} \usepackage[separate-uncertainty]{siunitx} \begin{document} \begin{tabular}{ S[table-format=-1.3(3)e2, table-align-exponent = false, table-align-uncertainty = false] S[table-format=-1.3(3)e2, ...


2

You can use the table-format option, to specify how much space to set aside for each part of the numbers in the table. If you have integers of up to, say, 3 digits, you can use table-format=3 to set aside space for 3 integer digits, and no decimals. As stated in the comments, this option can also be set on a per-column basis, by passing the options to the ...



Only top voted, non community-wiki answers of a minimum length are eligible