From 6732c64d5fd982a1a4c0e9d6adfaf973b404722f Mon Sep 17 00:00:00 2001 From: Klagarge Date: Wed, 19 Jun 2024 10:29:39 +0200 Subject: [PATCH] CHG dates --- 00-templates/template.typ | 17 ++++++++++++++--- slides.typ | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/00-templates/template.typ b/00-templates/template.typ index a5ff57f..3ad7915 100644 --- a/00-templates/template.typ +++ b/00-templates/template.typ @@ -5,13 +5,24 @@ title: [Title], subtitle: none, authors: [], - date: none, + date: datetime.today(), duration: none, handout: false, doc, ) = { - set text(font: "Inria Sans") + //set text(font: "Inria Sans") + + let date-text = if date.day() == 1 { + date.display("[weekday], [day padding:none]st of [month repr:long] [year]") + } else if date.day() == 2 { + date.display("[weekday], [day padding:none]nd of [month repr:long] [year]") + } else if date.day() == 3 { + date.display("[weekday], [day padding:none]rd of [month repr:long] [year]") + } else { + date.display("[weekday], [day padding:none]th of [month repr:long] [year]") + } + show: clean-theme.with( //aspect-ratio: "4-3", @@ -44,7 +55,7 @@ title: [#title], subtitle: [#subtitle], authors: ([#authors]), - date: [#date], + date: [#date-text], ) doc diff --git a/slides.typ b/slides.typ index 344d918..e3a9ade 100644 --- a/slides.typ +++ b/slides.typ @@ -4,7 +4,7 @@ title: [Title], subtitle: [Subtitle], authors: [Author A, Author B], - date: datetime.today().display("[day].[month].[year]"), + date: datetime.today(), duration: 10, // time in minutes for presentation or counter timer if no field is given doc, )