Closed ice1000 closed 3 months ago
It has type content
...
The "to_string" implementation is actually already in our template.
#let title = plain-text(it.body).trim();
🤔This is for making hash string labels (hashtags) for headings.
https://myriad-dreamin.github.io/typst-book/#label-Introduction
^^^^^^^^^^^^^^^^^^^
We can give up on providing hashtags if plain-text
whatever returns none
.
But I'm also interested in whether we can have a more robust approach to create hash strings, at least for simple content such as #smallcaps[114514]
.
But I'm also interested in whether we can have a more robust approach to create hash strings, at least for simple content such as
#smallcaps[114514]
.
Yeah that would be great
The "to_string" implementation is actually already in our template.
But lib.typ
will be overwritten by the compiler, so it's immutable in a sense
Say if I have a file like
This will make the following code from
lib.typ
crash:A similar function is provided in https://github.com/typst/typst/issues/2196#issuecomment-1728135476