Better formatting for note blocks, vertical spacing after QCM
This commit is contained in:
parent
75cc380db7
commit
7181717ba0
19
exam/lib.typ
19
exam/lib.typ
@ -49,6 +49,7 @@
|
|||||||
} else {
|
} else {
|
||||||
qcm_list
|
qcm_list
|
||||||
}
|
}
|
||||||
|
v(1em)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -122,10 +123,15 @@
|
|||||||
#let reponse(a) = {
|
#let reponse(a) = {
|
||||||
let answ_block = block(width: 100%, inset: 1em, solution(a));
|
let answ_block = block(width: 100%, inset: 1em, solution(a));
|
||||||
block(stroke: black, answ_block)
|
block(stroke: black, answ_block)
|
||||||
v(2em)
|
v(2em, weak: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
#let notes(n) = if enable_notes { text(fill: red, n) } else { none };
|
#let notes(n) = if enable_notes {
|
||||||
|
block(fill: luma(230), radius: 1em, inset: 1em, text(fill: red, n))
|
||||||
|
v(2em, weak: true)
|
||||||
|
} else {
|
||||||
|
none
|
||||||
|
};
|
||||||
|
|
||||||
// Question d'examen. Numérotée automatiquement, nombre de points optionnel
|
// Question d'examen. Numérotée automatiquement, nombre de points optionnel
|
||||||
// (défaut 1), bloc de réponse automatique si 2e argument présent
|
// (défaut 1), bloc de réponse automatique si 2e argument présent
|
||||||
@ -135,10 +141,11 @@
|
|||||||
|
|
||||||
context { qctr.step() }
|
context { qctr.step() }
|
||||||
let num = context { qctr.display() };
|
let num = context { qctr.display() };
|
||||||
[#num) #q #pts]
|
//v(2em, weak: true)
|
||||||
if a.pos().len() > 0 {
|
block(breakable: false,
|
||||||
reponse(a.pos().at(0))
|
[#num) #q #pts] + if a.pos().len() > 0 {
|
||||||
}
|
reponse(a.pos().at(0))
|
||||||
|
} else { none })
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user