Added the exercice math environment.
This commit is contained in:
parent
574d4a44c9
commit
926fc0d50b
|
@ -86,4 +86,6 @@
|
|||
#lorem(30)
|
||||
]
|
||||
|
||||
#lorem(10)
|
||||
#exercise()[
|
||||
#lorem(10)
|
||||
]
|
||||
|
|
|
@ -19,4 +19,5 @@
|
|||
#let definition-id = "Définition"
|
||||
#let remark-id = "Remarque"
|
||||
#let example-id = "Exemple"
|
||||
#let exercise-id = "Exercice"
|
||||
#let proof-id = "Démonstration"
|
||||
|
|
|
@ -55,8 +55,9 @@
|
|||
|
||||
#let definition(body, name: "") = math-block(name: name, id: definition-id, decoration: "outline", body)
|
||||
|
||||
#let remark(body, name: "") = math-block(name: name, id: remark-id, decoration: "none", body + v-space)
|
||||
#let example(body, name: "") = math-block(name: name, id: example-id, decoration: "none", body + v-space)
|
||||
#let remark(body, name: "") = math-block(name: name, id: remark-id, decoration: "none", body + v-space)
|
||||
#let example(body, name: "") = math-block(name: name, id: example-id, decoration: "none", body + v-space)
|
||||
#let exercise(body, name: "") = math-block(name: name, id: exercise-id, decoration: "none", body + v-space)
|
||||
|
||||
/* It takes the body of the proof, and formats it by adding the QED
|
||||
symbol at the end, and the _#proof-id._ text at the front. */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// If something is unclear, check the Typst docs or file an issue.
|
||||
// ===============================================================
|
||||
|
||||
#import "environments.typ": proposition, lemma, theorem, corollary, definition, remark, example, proof, numbered-equation
|
||||
#import "environments.typ": proposition, lemma, theorem, corollary, definition, remark, example, exercise, proof, numbered-equation
|
||||
|
||||
// Configuration of the paper.
|
||||
// ---------------------------
|
||||
|
@ -43,6 +43,7 @@
|
|||
show figure.where(kind: definition-id): it => it.body
|
||||
show figure.where(kind: remark-id): it => it.body
|
||||
show figure.where(kind: example-id): it => it.body
|
||||
show figure.where(kind: exercise-id): it => it.body
|
||||
show figure.where(kind: proof-id): it => it.body
|
||||
|
||||
/* Show headings like in amsart. */
|
||||
|
|
Loading…
Reference in New Issue