Port of an unofficial LaTeX template to Typst.
A complete example is shown in the example folder; see example.pdf for the rendered PDF. The document structure can of course be adapted to your needs.
You can use this template in the Typst web app by clicking "Start from template" on the dashboard and searching for epfl
.
Alternatively, you can use the CLI to kick this project off using the command
typst init @preview/scholarly-epfl-thesis
Typst will create a new directory with all the files needed to get you started.
This template uses certain fonts, including Utopia Latex for most text. If the font is not available to Typst, as is the case in the Typst Web App, then the template will fall back to a default font. The font is included in example shown in the Github repository here, otherwise you can download it however you like.
This template exports the template
function with the following named arguments:
title
: The work's title. Default: [Your Title]
author
: The author's name. Default: "Your Name"
paper-size
: The work's paper size. Default: "a4"
date
: The work's date. Unused for now. Default: none
date-format
: The format for displaying the work's date. By default, the date will be displayed as MMMM DD, YYYY
. Unused for now. Default: [month repr:long] [day padding:zero], [year repr:full]
The template will initialize your package with a basic call to the template
function in a show
rule. If you, however, want to change an existing project to use this template, you can add a show rule like this at the top of your file:
#import "@preview/scholarly-epfl-thesis:0.1.1": *
#show: template.with(
title: [Your Title],
author: "Your Name",
date: datetime(year: 2024, month: 03, day: 19),
)
// Your content goes below.
Also included are the front-matter
, main-matter
and back-matter
helpers which you can use in show
rules in your document to change certain settings when they are called: e.g. reset the page numbering when main matter starts, or number headings with letters in the back matter.
See example/main.typ for example usage.
In order for Typst to access the Utopia Latex font, you need to include it your font path. I've included the font in example/
so that you can run this in your shell:
cd example
typst w main.typ --font-path .
See here for more about the font path.
show heading.where(level: 1)
it disrupts the outline. I guess it would work if you put in the metadata
manually before each chapter.outline.entry
can't be modified easily because the arguments are positionallink
manually but that gets formatted like a link in the text, which is not what we're looking for.
kind
mechanic, but I can't get the superfigure's caption centeredfront-matter
, main-matter
...pad
work and not h
?