enfin un bon template et orga

This commit is contained in:
Le_Foucheur committed 2024-08-01 02:39:24 +02:00
1 parent 3418f37ba1
commit f14bb6aac3
46 files changed
+66 -1474

No files matched your search

+40 -4
View File
@@ -1,7 +1,7 @@
#import "transposition.typ": *
#import "@preview/drafting:0.2.0": *
#let question = counter("questions")
#show heading : it => {
if it.body == [] or it.level >= 3 [#parbreak() #linebreak() #counter(heading).display() #it.body] else [#parbreak() #linebreak() #counter(heading).display() #it.body]
}
#let nonumeq = math.equation.with(block: true, numbering: none)
#let dm(x) = box[#nonumeq[#x]]
#let dfrac(x, y) = math.frac(dm(x), dm(y))
@@ -70,4 +70,40 @@
#let po(ele : $x$ , vers : $0$ ) = $ =_(#ele -> #vers) $
#let QED = align(right, text[*Q.E.D.*]) // Quod erat demonstratum
#let LAF = align(center, text(17pt)[*L.A.F.*]) //Labor ad facio
#let a = text[#h(-16pt) a.]
#let a = text[#h(-16pt) a.]
//tout les set rule :
#let template(doc) = [
#set heading(numbering: (..numbers) => {
let n = numbers.pos().len()
if n == 1 {
question.update(1)
} else if n == 2 {
[Partie ]
numbering("I", numbers.pos().at(1) - 1)
"."
} else if n == 3 {
question.step()
if question.get().last() < 10 {
margin-note(side: left, dy: -16.4pt, stroke: none)[#h(14pt)N=° #question.display().]
} else {
margin-note(side: left, dy: -16.4pt, stroke: none)[#h(8pt)N=° #question.display().]
}
} else if n == 4 {
margin-note(side: left, dy: -16.5pt, stroke: none)[#h(34pt)#numbering("a.", numbers.pos().at(3) + 1) ]
} else if n == 5 {
numbering("i.", numbers.pos().at(4))
}
})
#set underline(stroke: red + 1pt)
#set par(leading: 0.8em)
#set page(numbering: (..nums) => nums.pos().map(na).join("/"), number-align: right)
#set math.cancel(stroke: red)
#doc
]