thuthesis: the Tsinghua thesis class, its citation styles, and its rebuild path
LaTeX Thesis Template for Tsinghua University
At a glance
- What is it?
- thuthesis is a LaTeX class for Tsinghua undergraduate, master's, doctoral and postdoctoral documents, distributed through CTAN, GitHub Releases and the TUNA mirror. It suits students who need the university's cover and reference layout, and it does not suit anyone who needs documentation outside Chinese.
- Who is it for?
- Take the published zip and you get a class that matches the university's required layout, a worked example, and a usage document you will have to read in Chinese. Do not start from the GitHub default branch unless you need unreleased behaviour, because it ships without guarantees and without a compiled class file.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 89 days ago.
- What is it written in?
- Mainly TeX, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- tuna/thuthesis5,492 ★ · +48
| Repository | 2026-09-23 | 2026-11-15 |
|---|---|---|
| tuna/thuthesis | 5.4k | 5.5k |
48 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The class file is generated, not committed
thuthesis.cls is a build product. The Makefile names `thuthesis.ins` and `thuthesis.dtx` as the sources and `dtx-style.sty` plus `thuthesis.cls` as the class files, and one xetex run produces them:
xetex thuthesis.insThat matters when you clone the source rather than take a release. The tree holds the source halves, not a ready class, so a fresh clone cannot typeset anything until you have generated `thuthesis.cls` yourself. The Makefile wraps the same command in its `cls` target, and the `Test` workflow publishes a `thuthesis-snapshot-release` whose `dist` folder contains the compiled development version if you would rather skip xetex.
The citation machinery ships next to the class. Three pairs cover the bibliography: `thuthesis-numeric.bbx` with `thuthesis-numeric.bst`, `thuthesis-author-year.bbx` with `thuthesis-author-year.bst`, and `thuthesis-bachelor.bbx` with `thuthesis-bachelor.bst`, alongside `thuthesis-inline.cbx` for citations. Bundling the styles means the reference list matches the format the university expects without hunting for a companion package.
Three download routes, and CTAN is the slow one
Take the published version. The archive carries `thuthesis.pdf` for the usage documentation and `thuthesis-example.pdf` for a worked example, and both are Chinese only. Copy `thuthesis-example.tex` to a meaningful filename before you type anything into it.
Three routes serve that archive. CTAN is where your TeX distribution already looks, and it can lag the official release slightly. GitHub Releases is where the newest version appears promptly. The TUNA mirror serves the same GitHub release archive.
Once the files are on disk, the Makefile is the entry point:
make [{all|thesis|doc|clean|cleanall|distclean}]`make thesis` builds `thuthesis-example.pdf` and `make doc` builds `thuthesis.pdf`. Or hand the job to your TeX distribution and let `tlmgr` fetch the package from CTAN during a normal update.
Two online editors are set up. TeXPage supplies Windows Chinese fonts. Overleaf publishes a template too, and that route carries the project's own recorded failure: free compile time was cut back, a thesis in this class is a large project, and issue 984 tracks the timeouts that follow.
make clean keeps the example PDF, and that is deliberate
Three cleanup targets exist, each one step more destructive. The first runs latexmk in clean mode over the class documentation and the example:
$(LATEXMK) -c $(PACKAGE).dtx $(THESIS)What follows is a glob sweep for leftovers: `*~`, `main-survey.*`, `main-translation.*`, `_markdown_thuthesis*` and `thuthesis.markdown.*`. `make clean` stops there and keeps `thuthesis-example.pdf`. `make cleanall` deletes that PDF too. `make distclean` removes the generated class files and the `dist` directory as well, which is what you want after building the development version and what you do not want after a semester of writing.
Windows gets a different deletion command. The Makefile tests for `SystemRoot` and switches `RM` to `del /Q`, otherwise `rm -f`, with a comment that says the point is to make deletion work on Windows.
The view targets follow the same pattern. `make viewthesis` and `make viewdoc` pass `-pv` to latexmk, so the finished PDF opens in your viewer instead of sitting in the directory.
Upgrading means overwriting thuthesis.cls by hand
There is no installer and no migration step. To upgrade a published copy you download the zip and override `thuthesis.cls` and the other files in your thesis directory with the new ones. Nothing rewrites your document, and nothing reports which of your settings changed, which is why the changelog carries more weight here than it would in a package with a config migration.
`CHANGELOG.md` holds the per-release detail, and the same content is repeated inside the usage documentation. The PDF you already downloaded is therefore a record of what changed in the version sitting in your directory, which matters because the project asks you to read that documentation completely before using the template.
The automatic path runs through `tlmgr` from CTAN and takes whatever version CTAN currently holds. That is simpler and less controlled, and it inherits the lag the CTAN route is known for.
The two logo PDFs are trademarks, not decoration
Two files in the tree carry a restriction rather than a licence. `thu-fig-logo.pdf` and `thu-text-logo.pdf` hold the university emblem and wordmark, taken from the Tsinghua University Visual Identity System with no modification beyond cropping the white space. Their stated purpose is undergraduate thesis covers, and both the graphics and the text are registered trademarks that must not be used for anything else.
So the cover art cannot move into a lab site, a conference poster or a personal page, even though the files sit inside a package you installed. And the class cannot be rebranded for a different institution without dropping those two files.
The licence is the LaTeX Project Public License v1.3c, and the project keeps a public Hall of Shame issue for use that violates it. The README also notes that variants and derivatives distributed through routes other than the official ones are not official versions, which puts the burden of checking provenance on anyone who did not download the archive themselves.
The development branch ships without guarantees
The GitHub default branch holds the development version, and the project says so plainly: it is aimed at developers and experienced TeX users who need unreleased features, and no guarantees are provided. That sentence is the whole difference between the two download choices, because a development copy carries no compiled class file and a usage document that may describe work in progress.
Activity is current. The last push landed on 2026-08-18, and the release history shows v7.7.1 on 2026-05-26, v7.7.0 on 2026-05-10 and v7.6.0 on 2025-03-28. Two tags in May 2026 after a fourteen-month gap is a burst pattern rather than a schedule, so pin a version before a submission deadline instead of assuming a new one exists.
The stated cost of that churn is reading. The template is described as subject to frequent changes, and readers are asked to read the usage documentation and example code completely before asking questions anywhere.
A release aborts unless thuthesis.dtx carries the version three times
The release target is guarded, which tells you what the maintainers count as a mistake. `make dist` depends on `check`, and `check` refuses to run without a version:
make [check|dist] version=X.Y.ZIt greps `thuthesis.dtx` for that version and counts the matches. Anything other than three aborts with a message telling the maintainer to bump the version with `l3build tag` first. The version therefore lives in three spots inside one file, and a partial edit stops the release instead of shipping a mismatch.
Past that guard, packaging splits between two systems:
l3build ctan --config utils/build-ctanl3build produces the `.tds.zip` CTAN expects, while a Python helper builds the GitHub release zip. Testing defaults to `l3build check`, and `make save` calls `bash testfiles/save.sh` to record reference output, while naming a target routes the run through `bash testfiles/test.sh` instead. The `testfiles/` directory holds the save.sh and test.sh scripts that loop calls.
Editorial conclusion
Take the published zip and you get a class that matches the university's required layout, a worked example, and a usage document you will have to read in Chinese. Do not start from the GitHub default branch unless you need unreleased behaviour, because it ships without guarantees and without a compiled class file. Verify first that your TeX distribution can build thuthesis.cls from thuthesis.ins with xetex, because the thesis and doc targets in the Makefile depend on that class existing.
Frequently asked questions
Where do I get thuthesis, and which source has the newest version?
CTAN can lag the official release slightly, GitHub Releases publishes the newest version promptly, and the TUNA mirror copies the GitHub release archive. The GitHub default branch is the development version, carries no guarantees, and targets experienced TeX users.
Does thuthesis work on Overleaf?
A template is published for Overleaf, but free compile time was reduced and this class produces a large project, so builds can time out, which issue 984 tracks. TeXPage offers a separate template that supplies Windows Chinese fonts.
How do I upgrade thuthesis when a new version is released?
Download the published zip and override `thuthesis.cls` and the other files in your thesis directory, or let `tlmgr` pull the update from CTAN as part of a normal TeX distribution update. `CHANGELOG.md` and the usage documentation record what changed in each version.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/tuna-thuthesis)Star history chart for your README
[](https://hysenlabs.com/projects/tuna-thuthesis)Was this useful?