#let title-block(title, date) = align(center)[ #text(size: 18pt)[#smallcaps[#title]] \ #v(0.15em) #text(size: 12pt)[--- #smallcaps(date) ---] ] #let author-block(authors) = align(center)[ #for author in authors [ #author.name \ #text(style: "italic")[#author.location] ] ] #let abstract-block(prefix, body) = block(width: 100%, inset: (x: 10%))[ #set par(justify: true, first-line-indent: 0pt) #text(size: 9pt)[#text(weight: "bold")[#prefix]#body] ] #let frontmatter(title, date, authors, abstract, abstract-prefix) = place( top + center, scope: "parent", float: true, )[ #title-block(title, date) #v(0.7em) #author-block(authors) #v(0.9em) #if abstract != none { abstract-block(abstract-prefix, abstract) v(0.7em) } #line(length: 100%, stroke: 0.4pt) #v(0.5em) ] // a booktabs table: a top rule, a rule under the header, a bottom rule, and // nothing else. header is the row of heading cells; the rest are body cells. #let booktabs(columns: auto, align: auto, header: (), ..rows) = table( columns: columns, align: align, stroke: none, inset: (x: 6pt, y: 4pt), table.hline(stroke: 0.8pt), table.header(..header.map(cell => strong(cell))), table.hline(stroke: 0.4pt), ..rows.pos(), table.hline(stroke: 0.8pt), ) #let paper( title: none, date: none, authors: (), abstract: none, lang: "fr", region: "FR", font: "EB Garamond", size: 10pt, doc, ) = { set document(title: title, author: authors.map(author => author.name)) set page( paper: "a4", margin: (top: 19mm, bottom: 25mm, left: 16mm, right: 16mm), columns: 2, numbering: "- 1/1 -", ) set par( justify: true, leading: 0.62em, spacing: 0.62em, first-line-indent: (amount: 1.2em, all: false), linebreaks: "optimized", ) set text(font: font, size: size, lang: lang, region: region, number-type: "old-style") set figure(gap: 0.65em) set table(inset: (x: 6pt, y: 4pt)) show heading.where(level: 1): it => [ #v(0.9em) #align(center)[#text(size: 11pt, weight: "medium")[#smallcaps[#it.body]]] #v(0.4em) ] show heading.where(level: 2): it => [ #v(0.7em) #align(right)[#text(size: 10pt, style: "italic")[#it.body]] #v(0.25em) ] show heading.where(level: 3): it => [ #v(0.5em) #text(size: 10pt, weight: "bold", style: "italic")[#it.body] #v(0.15em) ] show figure.where(kind: table): set text(size: 8.5pt) show figure.caption: set text(size: 8.5pt) show bibliography: set text(size: 8.5pt) let abstract-prefix = if lang == "fr" { [Résumé --- ] } else { [Abstract---] } frontmatter(title, date, authors, abstract, abstract-prefix) doc }