如何获取siunitx
包裹中的卡路里单位。谢谢
\documentclass{memoir}
\usepackage{siunitx}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\si[per-mode=symbol]{\kilo**\cal**\per\mol}
\end{document}
答案1
包chemmacros
会为您定义该单元以及一些其他有用的东西。目前,使用
chemmacros
withmemoir
会导致一个小警告。
\documentclass{memoir}
\usepackage{amsmath}
\usepackage{chemmacros}
\usepackage{amssymb}
\sisetup{per-mode=symbol}
\newcommand{\therm}{\text{th}}
\begin{document}
$\mathrm{cal}_\therm = \SI{1}{\kilo\cal\per\mol} =
\SI{4184}{\joule\per\mol}$ where \si{\mol} is a base SI unit related to
the Avogrado constant ($N_A = \num{6.02214129e23}$).
Water has a molar mass of $M(\ch{H2O})\approx \SI{18}{\MolMass}$
\end{document}
由于chemmacros
提供了相当多的功能,所需的软件包列表相当长。如果你只是需要那个单元,你可以自己定义它。
\documentclass{memoir}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{amssymb}
\DeclareSIUnit{\calorie}{cal}
\DeclareSIUnit{\Calorie}{\kilo\calorie}
\sisetup{per-mode=symbol}
\begin{document}
Dancing Ducks need to eat up to \SI{1000}{\Calorie} each day.
\end{document}
答案2
你可以使用以下方式定义自己的单位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}
\begin{document}
$ \SI{1}{\cal} = \SI{4.18400}{\J}$
$ \SI{1}{\kcal} = \SI{4184}{\N\m}$
$ 1 $ hamburger $ = \SI{1}{\mega\cal}$\\
A possible conversion of \emph{British Thermal Unit}, which is the energy needed to heat $ \SI{1}{\lb} $ of water from $ \SI{58.1}{\Fahr} $ to $ \SI{59.1}{\Fahr} $ :\smallskip
$ \SI{1}{\Btu} = \SI{1055,05585262}{\J} $
\end{document}