s

subpar

@preview

Create sub figures easily.

v0.2.2
MIT
11 downloads

Package Information

Last Updated
Minimum Typst Version
0.12.0
Authors
tinger
Categories
componentsmodel

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/subpar:0.2.2

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/subpar:0.2.2": *

Version History

0.2.20.12.0
aca8c332adee...
0.2.10.12.0
8f90f14747e1...
0.2.00.12.0
6bb867f35d03...
0.1.10.11.0
751eb1514ebc...
0.1.00.11.0
22c2af1c8920...

subpar

Subpar is a Typst package for creating sub figures.

#import "@preview/subpar:0.2.2"

#set page(height: auto)
#set par(justify: true)

#subpar.grid(
  figure(image("/assets/andromeda.jpg"), caption: [
    An image of the andromeda galaxy.
  ]), <a>,
  figure(image("/assets/mountains.jpg"), caption: [
    A sunset illuminating the sky above a mountain range.
  ]), <b>,
  columns: (1fr, 1fr),
  caption: [A figure composed of two sub figures.],
  label: <full>,
)

Above in @full, we see a figure which is composed of two other figures, namely @a and @b.

showcase

Contributing

Contributions are most welcome, make sure to let others know you're working on something beforehand so no two people waste their time working on the same issue.
It's recommended to have tytanic installed to run tests locally.

Documentation

A guide and API-reference for subpar can be found in its manual.