# ThesisUESTC: a LaTeX thesis class that refuses CTeX

> ThesisUESTC is a XeLaTeX document class for University of Electronic Science and Technology of China theses, packaging the school's formatting rules into commands instead of manual fiddling. It deliberately drops CTeX, which is why font setup is the first hurdle you hit.

**bdebye/thesisuestc** — ThesisUESTC-电子科技大学毕业论文模板

- Repository: https://github.com/bdebye/thesisuestc
- Website: https://bdebye.github.io/thesisuestc/
- Stars: 1,698 · Forks: 353
- Language: TeX
- License: not declared
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/bdebye-thesisuestc

## Five degrees, one class file

The class file thesis-uestc.cls carries a degree option for each programme: bachelor, master, promaster, doctor and engdoctor, corresponding to undergraduate, master, professional master, doctoral and engineering doctoral theses. The default is master, so a master's student needs no option at all.

Using it is deliberately unremarkable. You put thesis-uestc.cls in the directory holding your document and set the class in the preamble.

```
\documentclass{thesis-uestc}
```

If you want to use BibTeX for your bibliography you also need thesis-uestc.bst, the bibliography style definition that ships alongside it. Both files sit at the top level of the repository next to main.tex and main_multifile.tex, the two example documents, and a latexmkrc for automated compilation.

International and English-writing students add the english option, and the class typesets to the English thesis format instead. That is a document class option rather than a separate template, which is the tidier arrangement if you may switch.

## Fonts are the price of dropping CTeX

The template is written for XeLaTeX and gives up its dependence on CTeX, in the README's phrasing, to attain better reliability. The cost lands on you at setup time. You need a TeX distribution with XeLaTeX, plus SimSun and SimHei fonts, which are Songti and Heiti, plus Times New Roman for Latin text. TeXLive, MacTeX and MiKTeX are all named as acceptable environments, and CTeX is explicitly discouraged.

Platform behaviour differs. On macOS the class detects the operating system and uses Songti SC and STHeiti automatically, but the shell escape option has to be enabled for the build. On Linux you download the font package and unpack it into the document root directory.

On macOS, the build needs the shell escape option enabled.

## latexmk main.tex, and the manual path when it is not enough

The repository ships a latexmk settings file, so automatic compilation is the intended path. Change to the project directory and run:

```bash
latexmk main.tex
```

That resolves file dependencies and previews the result. To clear cached files, run `latexmk -c`.

For multi-file documents, substitute the filename with `main_multifile.tex`. If you edit in TeXstudio, Texmaker or WinEdt, set the compilation engine to latexmk, and on Windows with MiKTeX you also need a Perl interpreter installed.

If you compile by hand, XeLaTeX alone works, twice over if the document has cross references or a bibliography.

```bash
xelatex main.tex
```

Nothing here goes through a build system: the class, the bibliography style and the example documents are used from the directory as they sit.

## Two BibTeX databases, so the build takes five passes

This template maintains two separate bibliographies: your references, and the list of work completed during the degree. They compile to different aux files, which is why the documented full sequence is longer than the usual BibTeX dance.

```bash
xelatex main.tex
bibtex main.aux
bibtex accomplish.aux
xelatex main.tex
xelatex main.tex
```

Skip the second bibtex call and the accomplishments list is simply not generated, which the README flags as the usual reason a student wonders where that section went.

For Overleaf users the path is shorter: the template is published in the Overleaf Gallery, and clicking Open as Template gives you a working project, with the only difference being that it uses the font files placed in the project root directly. That is the single fastest way to see what a finished thesis looks like before committing to local setup.

## The professional degree needs two separate fields

Most cover commands take a Chinese argument and an English argument, such as `\title`, `\author`, `\advisor`, `\school` and `\major`, plus single-argument commands for the student number and the discipline. The complication worth knowing before you write anything is the professional degree case, which the template documents against the school's 2022 revision of its thesis writing standard.

Professional degree students, meaning professional masters and engineering doctors, have to fill in their degree category and their degree field separately. Use `\major` for the professional degree category, for example `电子信息`, and `\discipline` for the professional degree field, for example `计算机技术`. If your programme has no specific field, which the README signals with a professional code whose last two digits are 00, examples given being 025100 for finance and 085400 for electronic information, you must delete that line and add `\hidediscipline` in the preamble instead.

Classification data is set with `\classificationnumber`, `\confidentiallevel` and `\udcnumber`, where the confidentiality level takes one of four values. Dates on the title page come from `\setdate` with the options oral, submit and confer for the defence, submission and conferral dates respectively.

## Structure commands that quietly change pagination

Sections are added by command rather than by environment convention. The cover and half-title come from `\makecover`, the originality declaration from `\originalitydeclaration`, and a scanned signed version is attached with `\signatureofdeclaration{signature.pdf}`. If you would rather use a cover you designed yourself, `\bindpdfcover{cover.pdf}` inserts a finished PDF cover. The README notes that the university's print centre supplies the cover and half-title at final submission, so a hand-built cover will not affect earlier review stages.

The abstracts go in `chineseabstract` and `englishabstract` environments, with keywords added by `\chinesekeyword` and `\englishkeyword`. The table of contents is `\thesistableofcontents`. The introduction needs a specific half-space between the two characters, written as `\chapter{绪\hspace{6pt}论}`, while the running head omits the space. Acknowledgements begin with `\thesisacknowledgement` and are an unnumbered chapter. Appendices start at `\thesisappendix`, after which every chapter is treated as an appendix and numbered with capital letters, or `\thesissingleappendix` for one unnumbered appendix with subsections.

Two commands affect pagination silently. The class decides by itself whether to insert a blank page after the abstracts and after the table of contents, following the school's formatting rules, and `\noforceblankpage` in the preamble turns that behaviour off. If your page count shifts unexpectedly between machines, that flag is the first thing to look at.

## Citation style handles Chinese author lists and over 100 entries

`\thesisbibliography` pulls in a .bib database and sets the style to thesis-uestc automatically. The style counts entries and widens the numbering when the count passes 100, without an option from you. Placing `\nocite{*}` before it lists every entry in the database rather than only the cited ones. The native `\bibliography` command also works if you would rather have your editor's database integration, provided you set `\bibliographystyle{thesis-uestc}` yourself.

In-text citation is split by grammar. Use `\cite` when the reference is a syntactic part of the sentence, and `\citing` otherwise, where the number appears as a superscript. For a Chinese entry with more than three authors, adding the language option `language = {zh}` to the entry lets the style apply the convention of abbreviating later authors with 等.

Entries imported from Google Scholar, IEEE Xplore and ScienceDirect are handled compatibly, and patents and dissertations are covered by samples in reference.bib. Manual entries use the thesisthebibliography environment with `\bibitem`. For the accomplishments list, `\thesisaccomplish` works the same way but takes no optional argument and always lists every entry in its database. The 2022 standard requires your own name to be bold in that list, which you do in the bib file itself, changing `author = {肖珍新}` to `author = {\textbf{肖珍新}}`.

## Small typographic workarounds, and what the repository does not cover

The mathematics section documents two workarounds that look like noise until you hit them. Because the Times New Roman Latin glyphs are narrow, characters occasionally collide in math mode; a tilde character adjusts the spacing, as in `$f^{~l}$` and `$\hat{f~}$`. Bold in math comes from `\mathbf` or `\bm` for italic bold symbols, and `\mathbd` for upright bold.

The README's writing guide does not cover everything you may need, and it is honest about stopping points: it points to a general LaTeX tutorial such as the Chinese lshort for the body of the thesis, and the last documented section is the foreign source material and its translation required for undergraduate theses, where `\thesistranslationoriginal` starts the original text. Beyond that the repository has to answer for itself.

On maintenance: the last push was on 2026-07-16 and release 0.9 landed the same day, six years after 0.8 on 2020-08-30 and after 0.7 in 2018. The licence shows as LPPL in the README badge, which is the right choice for a LaTeX class, but GitHub shows no licence identifier for the repository, so check the license position yourself before redistributing a modified class in a commercial document.

## Conclusion

Adopt ThesisUESTC if you are writing a UESTC thesis in LaTeX and want the school's cover, date and classification rules handled by the document class instead of by hand, particularly if you need the professional degree split between major category and discipline field. Do not adopt it for a thesis at another institution, or if your environment cannot install SimSun, SimHei and Times New Roman, because the class depends on those fonts existing rather than on a fallback. Before you start, read the note on the major command for professional degree students, since the professional degree category goes in the first argument and the field in discipline, and deleting the discipline line for codes ending in 00 is a step the class cannot decide for you.

## FAQ

### How do I use the ThesisUESTC template?

Place thesis-uestc.cls in your document directory and set \documentclass{thesis-uestc} at the start of the document. For BibTeX you also need thesis-uestc.bst, and the degree option defaults to master with bachelor, promaster, doctor and engdoctor also available.

### How do I compile a ThesisUESTC thesis?

The template ships a latexmk settings file, so run `latexmk main.tex` from the project directory and `latexmk -c` to clear caches. Manual compilation needs XeLaTeX, and a document with two BibTeX databases takes xelatex, bibtex main.aux, bibtex accomplish.aux, then xelatex twice more.

### Why does the template need fonts I may not have?

Because the template is based on XeLaTeX and drops its CTeX dependence, so SimSun, SimHei and Times New Roman must be installed. On macOS the class detects the system and uses Songti SC and STHeiti, but shell escape has to be enabled; Linux users download the font package and unpack it in the document root.

### How do professional degree students fill in the major?

Use \major for the professional degree category and \discipline for the professional degree field, since the standard requires them separately. If your programme has no specific field, such as codes ending in 00, delete that line and add \hidediscipline in the preamble.

### Can I use ThesisUESTC on Overleaf?

Yes. The template is published in the Overleaf Gallery and clicking Open as Template gives you a working project. The only difference from a local setup is that it uses the font files placed directly in the project root.

## Sources

- [bdebye/thesisuestc on GitHub](https://github.com/bdebye/thesisuestc)
- [Issues](https://github.com/bdebye/thesisuestc/issues)
- [Project website](https://bdebye.github.io/thesisuestc/)
- [README](https://github.com/bdebye/thesisuestc/blob/master/README.md)
- [Releases](https://github.com/bdebye/thesisuestc/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/bdebye-thesisuestc
