Skip to content

Paper library

Giorgio Garofalo edited this page Jan 13, 2025 · 9 revisions

The built-in paper library is written in Quarkdown and adds support to typical elements of scientific papers in a LaTeX fashion.

The library features the following components:

  • Abstract
  • Titled, numbered blocks:
    • Definitions
    • Lemmas
    • Theorems
    • Proofs

Note

The supported languages are aligned to ones supported by Quarkdown's core: currently English and Italian. See Built-in localization for further information.

 

The first step is to import the library:

.include {paper}

Abstract

.abstract can generate the layout for a titled abstract block. Its content goes in its block argument:

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

 

The alignment of the title defaults to center and can be changed via .paperabstractalignment {start|center|end}:

.abstractalignment {start}

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

 

Titled blocks

Any of the following blocks can be created:

  • Definition via .definition
  • Lemma via .lemma
  • Theorem via .theorem
  • Proof via .proof

All the mentioned functions take one block argument which defines the content:

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

 

The default title suffix is . (dot) and can be customized via .paperblocksuffix {suffix}:

.paperblocksuffix {:}
image

 

Defining a numbering format results in the blocks of that type to be numbered.
The format names are plural: definitions, lemmas, theorems, proofs.

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

...

.definition
    .loremipsum

.lemma
    .loremipsum

.definition
    .loremipsum
Numbered blocks

 

Proofs also feature a special end-of-proof character, which defaults to .

.theorem
    .loremipsum

.proof
    .loremipsum
Proof

The end-of-proof can be customized via paperproofend {string}:

.proofend {😎}
Proof character customization
Clone this wiki locally