Hi,
I’m a new Typst user, after 15+ years of LaTeX and for now, the experience is wonderful.
My first issue happened when trying to “translate” a Beamer presentation, where a text containing an alerted part must be uncovered.
The following code
#import "@preview/touying:0.7.4": *
#import themes.simple: *
#show: simple-theme.with(aspect-ratio: "16-9")
Here is... #uncover("2-")[something #alert[alerted!]]
generates a compilation error (same error for other Touying versions 0.7.* and for other themes):
error: panicked with: "Unsupported mark `touying-fn-wrapper-raw` from `alert` at page 1 in section 'Slide'. You can't use it inside some functions like `context`. You may want to use the callback-style `utils.alert` function instead."
┌─ @preview/touying:0.7.4\src\configs.typ:87:8
│
87 │ panic(warning-msg)
│ ^^^^^^^^^^^^^^^^^^
I found some workarounds, but they seem less natural to me than the previous code:
// workaround: split into 2 uncovers
Here is... #uncover("2-")[something] #uncover("2-")[#alert[alerted!]]
// workaround: manually define other alert function
#let myalert(it) = text(fill: aqua.darken(50%))[#it]
Here is... #uncover("2-")[something #myalert[alerted!]]
Do I misuse or misunderstand something or is this a bug from Touying? Is there a better workaround?