Skip to content

proposition to migrate to typst-0.13#8

Open
uGyomm wants to merge 1 commit into
uwni:mainfrom
uGyomm:migration/typst-0.13
Open

proposition to migrate to typst-0.13#8
uGyomm wants to merge 1 commit into
uwni:mainfrom
uGyomm:migration/typst-0.13

Conversation

@uGyomm

@uGyomm uGyomm commented Jul 10, 2026

Copy link
Copy Markdown

Hello,

Object

As of the date of this pull request, the code doesn't compile.
It seems several breaking changes have been introduced which have impacted the compilation.
You will find below the identified changes and propositions to tackle them.

First Change

The style function and styles argument of measure have been removed.
As suggested by the change logs, I propose to remove their use and replace them by a context expression.

Second Change

The compatibility behavior of type/str comparisons (e.g. int == "integer") which was temporarily introduced in Typst 0.8, has been deprecated in Typst 0.13.0 and removed in Typst 0.14.0.

Here I propose to compare the returned value of type directly to the data type.
However it is also possible to compare the return value to a string if passed beforehand to the function repr.

examples :

  • [OK] type(...) == data type
  • [OK] repr(type(...) == "data type"
  • [KO] type(...) == "data type"

By implementing these propositions, I have been able to compile using Typst 0.15.2.

I believe these propositions also resolve the issue #7 .

Best regards

to compare type to a string, use repr(type(....)) == "..."

https://typst.app/docs/changelog/0.13.0#removals
leads to 'style' removal ,
a context must be now defined explicitely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant