Tag Info

Hot answers tagged

8

You can define your own units with siunitx: \documentclass[a4paper]{article} \usepackage{siunitx} \DeclareSIUnit[number-unit-product = {\,}] \cal{cal} \DeclareSIUnit\kcal{\kilo\cal} \DeclareSIUnit[number-unit-product = {\,}] \Btu{Btu} \DeclareSIUnit[number-unit-product = {\,}] \Fahr{\degree F} \DeclareSIUnit[number-unit-product = {\,}] \lb{lb} ...


6

Package chemmacros defines that unit for you along with some other useful stuff. Currently, using chemmacros with memoir will lead to a small warning. \documentclass{memoir} \usepackage{amsmath} \usepackage{chemmacros} \usepackage{amssymb} \sisetup{per-mode=symbol} \newcommand{\therm}{\text{th}} \begin{document} $\mathrm{cal}_\therm = ...


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 ...


4

Use the S column type as intended: In your case, convert the column specification to \begin{tabular}{| l || S[table-format=7.0] | S[table-format=8.0] | S[table-format=8.0] |} The table-format key is already a special key. In these case you could define before hand \sisetup{table-figures-decimal} and than just use the table-figures-integer key with 7, 8 ...


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

The break-down-the-input approached used by ulem clashes with the hoops siunitx jumps through. The best fix is to add an \mbox, either to \hl: \documentclass[review,5p,sort&compress]{elsarticle} \usepackage[english]{babel} \usepackage{siunitx} \usepackage[rgb]{xcolor} \usepackage[normalem]{ulem} \newcounter{HLcounter} \show\ULon ...


3

Package siunitx comes with support for columns with numbers via the column specifier S: \documentclass{report} \usepackage{caption} \usepackage{booktabs} \usepackage{siunitx} \begin{document} \begin{table} \centering \caption{Koeffizienten und Exponenten} \label{tab_koeff_T_ps} \begin{tabular}{ S[table-format=2.0] S[table-format=1.0] ...


2

EDIT: I am somewhat confused by the way siunitx acts here. I get the correct result if I take the definition of \electronmass from siunitx and put it through LaTeX. \documentclass[11pt]{scrbook} \usepackage[utf8]{inputenc} \usepackage[minionint]{MinionPro} \usepackage[sansmath]{MyriadPro} \usepackage[detect-all]{siunitx} \begin{document} Normal text in ...


2

I think that this is a bug of TeXstudio. The problem is that TeXstudio has auto-completion support for certain commands hard-coded in, most likely for performance reasons. This can be easily checked by looking at the texstudio.exe in a text editor and searching for \microampere (line 68436 in version 2.9.4). So I would say this is TeXstudio's bug and you ...


1

(This answer pertains to the updated version of the query, in which the OP provided specifics regarding the options used when setting up the siunitx package.) The instruction \sisetup{inter-unit-product = $\cdot$} is incorrect. It should be \sisetup{inter-unit-product = \cdot} With this modification, your example code compiles correctly.



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