Skip to content

Some standard pieces I find useful in Typst: fonts, subfigures, algorithms, labeled enums, etc.

License

Notifications You must be signed in to change notification settings

patrick-kidger/patstdlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

patstdlib

Some standard pieces I find useful: fonts, subfigures, algorithms, labeled enums, etc.

Documentation

Please see the inline documentation attached to each object. A full list of all available functionality can be found in src/lib.typ.

Functionality

Here's a few highlights:

Labeled enums

#show: enable-referable-enums
#set enum(full: true)

#referable-enum("step")[
  + Foo
  + Bar
  + Baz <step:baz>
]

In @step:baz then ...
// Renders as 'In step 3 then ...'

Subfigures

#show: enable-referable-subfigures

#figure(
  caption: [Main caption],
  grid(
    columns: 2,
    subfigure(
      caption: [Caption for subfigure '(a)'],
      image(...)
    ),
    subfigure(
      caption: [Caption for subfigure '(b)'],
      image(...)
    ),
  )
)

Significant figures

#sigfig(3.141592653, digits: 3)  // 3.14 as a `decimal`

About

Some standard pieces I find useful in Typst: fonts, subfigures, algorithms, labeled enums, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published