From b98692315bf0ff36e4f1f74e6b2010445acc06bb Mon Sep 17 00:00:00 2001 From: Youmans Yu Date: Thu, 16 Sep 2021 00:28:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E6=8C=87=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 ++++++++++++++ pkupcl.cls | 20 +++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cab6ce5..48fa75c 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,20 @@ 参考文献需要生成 bib 格式的文献库以供模板使用, 推荐使用 Zotero/Jabref/EndNote 等文献管理软件生成。 +文档类提供了少量的快捷指令, 用于减少报告书写时的工作量。 +```LaTeX +% 温度 电动势 浓度和气压的快速输入 +\newcommand{\swd}[1]{\SI{#1}{\degreeCelsius}} +\newcommand{\sdds}[1]{\SI{#1}{\volt}} +\newcommand{\snd}[1]{\SI{#1}{\mole \per \liter}} +\newcommand{\sqy}[1]{\SI{#1}{\kilo \pascal}} + +% 摄氏度、公式中文本、\varepsilon的快速输入 +\newcommand{\C}{\si{\degreeCelsius}} +\newcommand{\tr}[1]{\textrm{#1}} +\newcommand{\ve}{\varepsilon} +``` + 维护者感谢以下开源项目: - [tansongchen/pkupcl](https://github.com/tansongchen/pkupcl) - [思源黑体](https://github.com/adobe-fonts/source-han-sans) diff --git a/pkupcl.cls b/pkupcl.cls index c2ba7cc..567aa37 100644 --- a/pkupcl.cls +++ b/pkupcl.cls @@ -31,7 +31,14 @@ \RequirePackage{hyperref} \RequirePackage{threeparttable} \RequirePackage{siunitx} -\sisetup{detect-family} + +% 使用siunitx包报告不确定度时,以下设置可以使结果以\bar(X) \pm \sigma 的形式表示 +% 使用siunitx包书写单位时,以下设置可以使单位之间加\cdot点 +\sisetup{ + detect-family, + separate-uncertainty = true, + inter-unit-product = \ensuremath{{}\cdot{}} + } \RequirePackage{caption} \captionsetup{labelfont=sf,textfont=bf,labelsep=period} \setlength{\abovecaptionskip}{2pt} @@ -113,3 +120,14 @@ \newpage } + +% 温度 电动势 浓度和气压的快速输入 +\newcommand{\swd}[1]{\SI{#1}{\degreeCelsius}} +\newcommand{\sdds}[1]{\SI{#1}{\volt}} +\newcommand{\snd}[1]{\SI{#1}{\mole \per \liter}} +\newcommand{\sqy}[1]{\SI{#1}{\kilo \pascal}} + +% 摄氏度、公式中文本、\varepsilon的快速输入 +\newcommand{\C}{\si{\degreeCelsius}} +\newcommand{\tr}[1]{\textrm{#1}} +\newcommand{\ve}{\varepsilon} \ No newline at end of file