Compare commits
No commits in common. "15c2cb4cac4b5c5154b60178bf27b908fdd0d40f" and "b475e4bb8d26910c715fc8320e115bacf42f02d7" have entirely different histories.
15c2cb4cac
...
b475e4bb8d
@ -1,12 +1,13 @@
|
||||
#import "@y-sec/exam:0.1.0": exam, question, reponse
|
||||
#show: exam(
|
||||
#import "@ysec/exam:0.1.0": exam, question, reponse
|
||||
#show: doc => exam(
|
||||
title: "Examen en Typst",
|
||||
subtitle: "Y-Security - Typst Essentials",
|
||||
course: "TES",
|
||||
date: datetime(year: 2050, month: 1, day: 1),
|
||||
date: datetime(year: 2024, month: 5, day: 27),
|
||||
author: "Maxime Augier",
|
||||
time: "45 minutes",
|
||||
allowed: "une page A4 (recto-verso) de résumé personnel",
|
||||
doc
|
||||
)
|
||||
|
||||
= Questions et Réponses
|
||||
|
@ -6,14 +6,14 @@
|
||||
#let solution_mode = { sys.inputs.at("mode", default: "") == "solution" };
|
||||
|
||||
#let points_counter(h) = {
|
||||
// Find the first heading at a level equal or lower (more important) than this one
|
||||
// Find the first heading at a level equal or higher than this one
|
||||
let headings_after = query(selector(heading)
|
||||
.after(h.location(), inclusive: false)
|
||||
.after(h.location())
|
||||
).filter(nh => nh.level <= h.level);
|
||||
|
||||
let start_value = pctr.at(h.location())
|
||||
let stop_value = if headings_after.len() == 0 { pctr.final() }
|
||||
else { pctr.at(headings_after.first().location()) }
|
||||
else { pctr.at(headings_after.last().location()) }
|
||||
stop_value.at(0) - start_value.at(0)
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#let exam(title: "Exam", course: none, date: none, class: none,
|
||||
year: none, author: none, subtitle: none, indications: none,
|
||||
time: none, allowed: none) = doc => {
|
||||
time: none, allowed: none, doc) = {
|
||||
|
||||
{
|
||||
set text(font: "Montserrat")
|
||||
|
Loading…
Reference in New Issue
Block a user