-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the returning function of thmenv an element function #17
Comments
I don't think that typst supports defining custom element functions yet. What I can do is change the format function of the thmbox; when I get that done, you might be able to use something like this: #let axiom = thmbox(
"axiom", "公理",
inset: (x: 1.2em, top: 0em)
)
#let axiom = axiom.with(fill: rgb("cc99cc")) |
The update (1.1.1) has gone through; now you can try something like this: #import "@preview/ctheorems:1.1.1": *
#show: thmrules
#set page(width: 4in, height: auto, margin: 0.5cm)
#let axiom = thmbox(
"axiom", "公理",
inset: (x: 1.2em, y: 0.6em),
)
#axiom[
Things which are equal to the same thing are also equal to one another.
]
#let axiom = axiom.with(fill: rgb("cc99cc"))
#axiom[
If equals be added to equals, the wholes are equal.
]
// You can also do this now! Set block properties individually.
#axiom(fill: rgb("99cccc"))[
If equals be subtracted from equals, the remainders are equal.
]
#axiom[
Things which coincide with one another are equal to one another.
] |
okay, that is great. I find myself still using the old 0.1.0 version :( [#metadata(identifier) <meta:thmenvcounter>], so does that means that the reference is auto-created? then how to use? like |
I want to use the #set rule to change the background color of the axioms, however what I can do is only to change the source code where the axiom function is defined.
what the performance is:
The text was updated successfully, but these errors were encountered: