Replies: 3 comments 1 reply
-
Related/duplicated discussion: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Agreed. If you add the class |
Beta Was this translation helpful? Give feedback.
1 reply
-
For anyone interest, @christopherkenny did an extension for this : https://github.com/christopherkenny/typst-function |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
It would be great to have something like latex-environment for typst, where the
[content]{.custom}
or::: {.custom} ... :::
span/divs get transformed into functions of the same name,#custom[]
, to be defined in the template. I use it quite a lot in Latex output (wish it was buitl-in, actually, no sure why not?), and now that I'm porting some templates to typst I realise I don't have the same convenient mapping and would have to write lua filters myself. This seems a common enough pattern that it'd be great to have it integrated (perhaps both filters could be merged, and made internal, since the logic would be identical). Ideally quarto would also make a list of such custom spans/divs in the Lua filter, to bypass the need to list them explicitly?Beta Was this translation helpful? Give feedback.
All reactions