Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

This guide walks you through converting an academic thesis (PhD, HDR, or similar) into a modern Typst project with:

  • Bilingual PDF output – French and English from a single source.
  • HTML website – a responsive, searchable, multi-chapter site.
  • GitHub Pages deployment – automated build and publish on every push.

The techniques were developed while converting two real theses:

ProjectSourceLive site
PhD thesis (PageRank)balouf/phd-pagerankbalouf.github.io/phd-pagerank
HDR thesis (P2P)balouf/hdr-p2pbalouf.github.io/hdr-p2p

Browse them to see what the end result looks like – bilingual toggle, chapter navigation, full-text search, downloadable PDFs.

Modular structure

Each section of this guide is self-contained. Pick the ones you need:

SectionYou need this if…
LaTeX to TypstYour thesis is currently in LaTeX
Bilingual PDFYou want French + English output
HTML ExportYou want a web version of your thesis
GitHub DeploymentYou want automated build + hosting
Working with an LLMYou want to use AI assistants effectively

Already have a Typst project? Skip section 1. Monolingual thesis? Skip section 2. Only need PDF? Skip sections 3 and 4.

Prerequisites

  • Typst >= 0.14.2 – HTML export requires a recent version. Install from typst.app or via cargo install typst-cli.
  • Python >= 3.11 – used by the build script that splits HTML into chapters.
  • uv – the fast Python package runner. Install from docs.astral.sh/uv. The build script uses uv run to manage its own dependencies automatically.
  • Git and GitHub – basic familiarity with repositories, branches, and GitHub Actions.

The boilerplate

The boilerplate/ directory in this repository contains ready-to-use template files:

boilerplate/
  main.typ            # PDF entry point
  main-html.typ       # HTML entry point
  deploy.yml          # GitHub Actions workflow
  templates/
    i18n.typ           # Bilingual support (#t(), lang variable)
    meta-data.typ      # Thesis metadata (title, author, jury)
    html-overrides.typ # Show rules for HTML export
    prelude.typ        # Common imports for chapters
  chapters/
    example.typ        # Example chapter (French)
    example.en.typ     # Example chapter (English)
  web/
    build.py           # HTML build script (split, nav, search)
    assets/            # CSS and JS for the website

Copy the boilerplate into your own repo and follow the TODO: adapt comments in each file. The guide sections below explain the reasoning behind each piece.

Section overview

Section 1 – LaTeX to Typst Strategy and tooling for converting a LaTeX thesis to Typst. When to let an LLM do the heavy lifting and when to review by hand.

Section 2 – Bilingual PDF The i18n.typ architecture: the #t() function, when to use it vs. separate .en.typ files, and the translation workflow.

Section 3 – HTML Export How Typst’s HTML backend works, the show rules in html-overrides.typ, and the build.py script that turns a single HTML blob into a navigable website.

Section 4 – GitHub Deployment Setting up GitHub Actions to compile Typst, run the build script, and deploy to GitHub Pages automatically.

Section 5 – Working with an LLM Practical advice for using large language models as coding partners throughout this workflow – what they excel at and where human judgment is essential.