Skip to content

Commit

Permalink
快捷指令
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxuan-yu committed Sep 15, 2021
1 parent 3879197 commit b986923
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 19 additions & 1 deletion pkupcl.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}

0 comments on commit b986923

Please sign in to comment.