Hi folks, I’m pretty new to typst. Currently using it to make my homework assignments readable. I’ve just updated to 0.12.0.
I’ve run into an issue with code blocks when using the problemst template. At first, I thought it was because I was trying to use a raw()
with lang: "typc"
, but now that I’m including matlab code blocks as well I see it error out there as well. Any advice on how to get code blocks working again?
Here’s the error I’m seeing:
$ typst c example.typ
error: can only be used when context is known
┌─ @preview/problemst:0.1.0/pset.typ:55:18
│
55 │ box(width:measure([#it.lines.last().count]).width, align(right, text(fill: luma(50%))[#l.number]))
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
│
= hint: try wrapping this in a `context` expression
= hint: the `context` expression should wrap everything that depends on this function
help: error occurred while applying show rule to this line
┌─ example.typ:17:0
│
17 │ // Subroutine code:
│ ^^^^^^^^^^^^^^^^^^^
and here’s a reproducible example file: View paste 6J732
Anybody got tips on how to fix?