l

layout-ltd

@preview

Limit layout iterations for debugging

v0.1.0
MIT

Package Information

Last Updated
Minimum Typst Version
0.12.0
Categories
utility

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/layout-ltd:0.1.0

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/layout-ltd:0.1.0": *

Version History

0.1.00.12.0
e5fc69cc65e3...

Layout Ltd

A simple package to limit the number of iterations the compiler will run to resolve context. Works by performing empty compilations for the first $5-n$ iterations, then running normally for the last $n$, where $n$ is the specified number of iterations.

"Approved" by one of the creators of typst:

This is cursed

@laurmaedje

Usage

Just import the package and use it with a show rule at the top of your file:

#import "@preview/layout-ltd:0.1.0": layout-limiter
#show: layout-limiter

You can then specify the limit with a command line argument:

typst compile --input=max-layout-iterations=1 main.typ

Or you can specify the limit directly in your show rule:

#import "@preview/layout-ltd:0.1.0": layout-limiter
#show: layout-limiter.with(max-iterations: 2)