first draft
This commit is contained in:
commit
f1abfbfa5b
15 changed files with 2893 additions and 0 deletions
85
lib/abstracts.typ
Normal file
85
lib/abstracts.typ
Normal file
|
@ -0,0 +1,85 @@
|
|||
|
||||
#let assets-folder = "../assets/"
|
||||
|
||||
|
||||
// workaround for: https://github.com/typst/typst/issues/466
|
||||
#let balanced-cols(n-cols, gutter: 11pt, body) = layout(bounds => context {
|
||||
// Measure the height of the container of the text if it was single
|
||||
// column, full width
|
||||
let text-height = measure(box(
|
||||
width: (bounds.width - (n-cols - 1) * gutter) / n-cols,
|
||||
body
|
||||
)).height
|
||||
|
||||
// Recompute the height of the new container. Add a few points to avoid the
|
||||
// second column being longer than the first one
|
||||
let balanced-height = text-height/n-cols + text.size/2
|
||||
|
||||
box(
|
||||
height: balanced-height,
|
||||
columns(n-cols, gutter: gutter, body)
|
||||
)
|
||||
})
|
||||
|
||||
#let abstracts(
|
||||
title-fr: "",
|
||||
keywords-fr: (),
|
||||
abstract-fr: [],
|
||||
title-en: "",
|
||||
keywords-en: (),
|
||||
abstract-en: [],
|
||||
heading-font: "TeX Gyre Heros",
|
||||
school-color-verso: rgb("0054a0")
|
||||
) = {
|
||||
set page(
|
||||
numbering: none,
|
||||
header: none,
|
||||
)
|
||||
|
||||
pagebreak()
|
||||
pagebreak(to: "even")
|
||||
|
||||
set page(
|
||||
margin: (
|
||||
left: 20mm, right: 30mm,
|
||||
top: 30mm, bottom: 30mm,
|
||||
),
|
||||
background: image(assets-folder + "abstracts-bg.svg")
|
||||
)
|
||||
set text(font: heading-font, fill: black)
|
||||
|
||||
place(dx: 100mm, dy: -15mm, image(assets-folder + "UR.png", width: 6cm))
|
||||
place(dx: 0mm, dy: -15mm, image(assets-folder + "logo.png", width: 7.5cm))
|
||||
|
||||
v(2cm)
|
||||
line(length: 100%, stroke: .2cm + school-color-verso)
|
||||
v(.4cm)
|
||||
|
||||
[
|
||||
#show linebreak: none
|
||||
#text(school-color-verso)[Titre :] #title-fr
|
||||
]
|
||||
|
||||
[
|
||||
|
||||
Mots clés : #keywords-fr.join(", ")
|
||||
]
|
||||
|
||||
balanced-cols(2,gutter: 11pt)[Résumé : #abstract-fr]
|
||||
|
||||
v(1cm)
|
||||
line(length: 100%, stroke: .2cm + school-color-verso)
|
||||
v(.4cm)
|
||||
|
||||
[
|
||||
#show linebreak: none
|
||||
#text(school-color-verso)[Title :] #title-en
|
||||
]
|
||||
|
||||
[
|
||||
|
||||
Keywords: #keywords-en.join(", ")
|
||||
]
|
||||
|
||||
balanced-cols(2, gutter: 11pt)[Abstract: #abstract-en]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue