An unofficial Typst thesis template for National Taiwan University (ๅ็ซ่บ็ฃๅคงๅญธ).
Inspired by the ntu-thesis LaTeX template and follows the official formatting guidelines. The project is named after the iconic Fu Bell on campus.
typst init @preview/fubell:0.1.0 my-thesis
cd my-thesis
typst compile main.typOr clone this repository and compile the example directly:
typst compile --root . template/main.typYou can use Fubell directly on the Typst web app (no local CLI required):
- Create a new project at https://typst.app.
- In
main.typ, import@preview/fubell:0.1.0and configure#show: thesis.with(...)(see the Usage snippet below). - Add files for any
includepaths you use, or replace thoseincludelines with inline content. - Keep
watermark: none(default), or upload your ownassets/watermark.pngand setwatermark: image("assets/watermark.png"). - Set
font-profile: "web"for cleaner fallback behavior on Typst web app.
fubell/
โโโ lib.typ # Package entrypoint (exports `thesis`, `appendix`)
โโโ src/
โ โโโ config.typ # Page geometry, fonts, spacing defaults
โ โโโ cover.typ # Cover page layout
โ โโโ certification.typ # Oral defense certification page
โ โโโ front-matter-page.typ # Abstract & acknowledgement pages (zh/en)
โ โโโ outline-page.typ # ToC, List of Figures/Tables
โ โโโ appendix.typ # Appendix numbering helper
โโโ template/ # Scaffolded into user projects
โ โโโ main.typ # Thesis entry point (edit this)
โ โโโ refs.bib # Bibliography
โ โโโ content/
โ โโโ abstract-zh.typ
โ โโโ abstract-en.typ
โ โโโ acknowledgement-zh.typ
โ โโโ acknowledgement-en.typ
โ โโโ chapters/
โ โโโ introduction.typ
โโโ typst.toml # Package manifest
โโโ ROADMAP.md # Development roadmap
โโโ CHANGELOG.md
#import "@preview/fubell:0.1.0": thesis, appendix
#show: thesis.with(
university: (zh: "ๅ็ซ่บ็ฃๅคงๅญธ", en: "National Taiwan University"),
college: (zh: "้ปๆฉ่ณ่จๅญธ้ข", en: "College of EECS"),
institute: (zh: "่ณ่จๅทฅ็จๅญธ็ณป", en: "Dept. of CSIE"),
title: (
zh: "่ซๆไธญๆๆจ้ก",
en: "Thesis English Title",
),
author: (zh: "็ๅฐๆ", en: "Xiao-Ming Wang"),
advisor: (zh: "้ณๅคงๆ ๅๅฃซ", en: "Da-Wen Chen, Ph.D."),
student-id: "R12345678",
degree: "master", // or "phd"
lang: "zh", // or "en" โ controls outline titles and document language
font-profile: "submission", // or "web" / "portable"
// font-en: ("Times New Roman", "TeX Gyre Termes"), // optional override
// font-zh: ("BiauKaiTC", "TW-MOE-Std-Kai"), // optional override
date: (year-zh: "113", year-en: "2024", month-zh: "6", month-en: "June"),
keywords: (
zh: ("้้ตๅญไธ", "้้ตๅญไบ"),
en: ("keyword one", "keyword two"),
),
abstract-zh: include "content/abstract-zh.typ",
abstract-en: include "content/abstract-en.typ",
acknowledgement-zh: include "content/acknowledgement-zh.typ", // optional
acknowledgement-en: include "content/acknowledgement-en.typ", // optional
bibliography-file: bibliography("refs.bib"),
watermark: none, // optional: e.g. image("assets/watermark.png") (user-provided)
doi: none, // optional DOI string, e.g. "doi:10.6342/NTU2024XXXXX"
// certification-pdf: read("cert.pdf", encoding: none), // optional: replace auto page with scanned PDF
)
#include "content/chapters/introduction.typ"
// Appendices โ switches numbering to "Appendix A" / "้้A"
#show: appendix
= Survey Data // โ "้้A Survey Data" (zh) or "Appendix A Survey Data" (en)
== Raw Results // โ "A.1 Raw Results"Use #show: appendix after your main chapters to switch heading numbering to appendix style. The prefix adapts to the document language:
lang |
Level 1 | Level 2+ |
|---|---|---|
"zh" |
้้A | A.1 |
"en" |
Appendix A | A.1 |
// after your last chapter
#show: appendix
= Supplementary Data
== Experiment DetailsThe template defaults to watermark: none, so no watermark file is required.
If you want to add the NTU watermark:
- Download it from the official source: https://www.lib.ntu.edu.tw/doc/CL/watermark.pdf
- Convert it to PNG and place it in your project, for example
assets/watermark.png - Set
watermark: image("assets/watermark.png")in#show: thesis.with(...)
The lang option (default "zh") controls the document language and structural titles (Table of Contents, List of Figures, List of Tables). Set lang: "en" for English headings. Cover and certification pages remain bilingual regardless of this setting.
Line spacing follows NTU guidelines: 1.5 ้่ท for Chinese (lang: "zh") and double spacing for English (lang: "en").
By default the template auto-generates the ๅฃ่ฉฆๅงๅกๆๅฏฉๅฎๆธ (certification page) with signature blanks. After your oral defense, you can replace it with a scanned PDF of the signed page:
#show: thesis.with(
// ... other options ...
certification-pdf: read("certification-scan.pdf", encoding: none),
certification-pdf-page: 1, // page to embed (default: 1)
certification-pdf-fit: "contain", // "contain", "cover", or "stretch"
)When certification-pdf is set:
- The auto-generated certification page is skipped entirely.
- The scanned PDF is rendered full-bleed (zero margins, no watermark, no DOI footer, no page number overlay).
- The TOC entry for ๅฃ่ฉฆๅงๅกๆๅฏฉๅฎๆธ is still emitted so the table of contents remains correct.
When certification-pdf is none (default), the other two options (certification-pdf-page, certification-pdf-fit) are silently ignored.
- Typst's PDF-as-image feature requires the source PDF version to be โค the export target version. If compilation fails, re-export your scanned PDF as PDF 1.7 or lower.
- PDF-as-image is not supported when exporting with PDF/A or PDF/UA standards enabled.
- Tags and accessibility metadata from the source PDF are not preserved.
The template supports font profiles so users can choose between submission-accurate fonts and web/CI-friendly fallbacks.
| Profile | Use case | English stack | Chinese stack |
|---|---|---|---|
"submission" (default) |
Local submission build | Times New Roman โ TeX Gyre Termes โ STIX Two Text | BiauKaiTC โ DFKai-SB โ TW-MOE-Std-Kai โ Kaiti TC โ Kaiti SC |
"web" |
Typst web app | TeX Gyre Termes โ STIX Two Text โ Times New Roman | TW-MOE-Std-Kai โ Kaiti TC โ Kaiti SC โ BiauKaiTC โ DFKai-SB |
"portable" |
CI / reproducible open-font-first build | Libertinus Serif โ New Computer Modern โ Times New Roman | TW-MOE-Std-Kai โ Noto Serif CJK TC โ Noto Serif TC โ BiauKaiTC |
You can also bypass profiles and set font-en / font-zh directly in thesis.with(...).
Currently bold/italic do not work for many Chinese Kai fonts; workarounds with stroke and skew are being considered.
Times New Roman and ๆจๆฅท้ซ are proprietary fonts that are not available on the Typst web app. The template will automatically fall back to:
- TeX Gyre Termes for English โ the closest open-source match to Times New Roman (Typst Issue #416).
- TW-MOE-Std-Kai (ๆ่ฒ้จๆจๆบๆฅทๆธ) for Chinese โ available natively on the Typst web app.
The output will look very similar but not byte-identical to a local build with the proprietary fonts installed. For official submission, it is recommended to compile locally with Times New Roman and ๆจๆฅท้ซ installed.
For web projects, prefer font-profile: "web".
-
Check the effective font configuration selected by the template:
typst query --root . main.typ "<fubell-font-config>" --one --format yaml
-
See font warnings in a compact format:
typst query --root . main.typ "<heading>" --field body --diagnostic-format short
-
Run a strict fallback check with system fonts disabled:
typst query --root . main.typ "<heading>" --field body --diagnostic-format short --ignore-system-fonts
-
Inspect installed font families on your machine:
typst fonts
If you see unknown font family warnings, either install that font locally or switch font-profile / font-en / font-zh to fonts available in your environment.
Issues and pull requests are welcome! If you spot a formatting bug, have a feature idea, or want to pick up something from the roadmap โ please go for it :) Contributions that implement new features are especially appreciated.