/

Paper 库

内置的 paper 库由 Quarkdown 编写,以一种类似 LaTeX 的风格,为科学论文中的典型元素提供支持。

该库包含以下组件:

注意:受支持的语言与 Quarkdown 核心保持一致。更多详情请参阅内置本地化

第一步是导入 该库:

.include {paper}

摘要

.abstract 为一个带标题的摘要块生成布局。其内容放在块级参数中。

示例 1

.abstract
    This is my *abstract*! Here goes the summary of the document.  
    .loremipsum

This is not part of the abstract, instead.
Abstract

标题的对齐方式默认为居中,可以通过 .abstractalignment {start|center|end} 进行更改。

示例 2

.abstractalignment {start}

.abstract
    This is my *abstract*! Here goes the summary of the document.  
    .loremipsum
Abstract with start-aligned title

带标题的块

你可以创建以下任意块:

上述所有函数都接受一个用于定义内容的块级参数。

示例 3

.definition
    Let $ \Delta x $ be an object's change in position over a time interval $ \Delta t $,
    then the average velocity is defined as $ v = \frac {\Delta x} {\Delta t} $.
Definition

自定义标题后缀

默认的标题后缀是 .(点),可以通过 .paperblocksuffix {suffix} 进行自定义:

示例 4

.paperblocksuffix {:}
Custom block suffix

编号

定义一个编号格式 会让该类型的块被编号。格式名称使用复数形式:definitionslemmastheoremsproofs

示例 5

.numbering
    - definitions: 1.a
    - lemmas: i

...

.definition
    .loremipsum

.lemma
    .loremipsum

.definition
    .loremipsum
Numbered blocks

证明结尾符

证明还带有一个特殊的证明结尾字符,默认为

示例 6

.theorem
    .loremipsum

.proof
    .loremipsum
Proof with end character

你可以通过 .proofend {string} 自定义证明结尾字符:

示例 7

.proofend {😎}
Proof character customization