GitHub Repository including Examples and Changelog
A typst template for timetables
A resulting timetable looks like this:
- Collision detection
- Automatic extension over multiple fields / cells / time slots
- ...
The main difficulty lies in defining the dictionary with the necessary data. Take a look into the example to see how a json
or toml
file can be used to specify the data, which can then be included into .typ
files.
The exposed timetable
function takes the following arguments:
all-data
: is the necessary data inputlanguage: "en"
: the language to use for weekdays and other termsdate: datetime.today().display("[day].[month].[year]")
: the date to be displayed in the headershow-header: true
: if to show the headershow-alternatives: true
: if to show collisions and their corresponding alternativesshow-description: true
: if to show the description tabletablex-args: (:)
: arguments to be passed to the underlying tablex table, to overwrite the styleevent-cell: default-blocks.event-cell
: how to display the eventstime-cell: default-blocks.time-cell
: how to display the time cellscolor-theme: tab
: for automatical coloring of courses
general
period
person
times: array
start [end - defaults.duration]
end [start + defaults.duration]
display: string [start "--" end]
show-time [false]
defaults
duration [2]
description?: array
id
title
type: text|link|content [text]
courses: {abbrv}?: string ->
{description.id}?
color?
priority [0]
hide [false]
hide-description [false]
events: {eventtype}?: string ->
day
start [end - default.duration]
end [start + default.duration]
room
priority [thiscourse.priority]
hide [false]
Here ?
denotes optional values, []
the corresponding default value, {}
parametrices keys and ->
denotes another dictionary.
Necessary are only a few options, for a quick start look at this simplified version:
general
period
person
times: array
start or end
courses: {abbrv}?: string ->
events: {eventtype}?: string ->
day
start or end
room
Take a look at the example files, currently only the toml
ones show all options.
I plan to eventually release this as a package to typst packages. Until then, or additionally, you can place this in your local packages repo. If you use the web app,