# Tongji University Undergraduate Thesis Template

## Overview

`tongjithesis` is a LaTeX class for creating undergraduate theses that comply with the official requirements of Tongji University, China. This template is designed to help students focus on content creation rather than formatting details.

## Features

- Compliant with Tongji University's official undergraduate thesis requirements
- Support for both one-sided and two-sided printing
- Comprehensive formatting for title page, abstract, table of contents, chapters, etc.
- Customized citation styles that comply with Chinese GB/T 7714-2025 standard
- Support for code listings with syntax highlighting (minted or listings)
- Integration of mathematical formulas, figures, tables, and algorithms
- Standalone task book, opening report and mid-term report documents via the
  `doctype` class option

## Requirements

- A complete TeX distribution (TeX Live 2026+, MiKTeX, or MacTeX)
- XeLaTeX or LuaLaTeX engine (the template doesn't support pdfLaTeX)
- Python with Pygments installed (optional, for minted code highlighting)

## Installation

1. **Manual Installation**:
   - Copy `tongjithesis.cls`, `tongjithesis.cfg`, `tongji-circled.def` and the
     `tongji-cjk-font-*.def` files to your project directory, or
   - Install to your local texmf tree (recommended)

   All of these files are required: the class `\input`s `tongji-circled.def` and the
   `tongji-cjk-font-<fontset>.def` matching the `fontset` option, and errors out if
   either is missing. Keep them in the same directory as the class.

2. **Install to TEXMF tree**:
   - For TeX Live on Unix-like systems: `~/texmf/tex/latex/tongjithesis/`
   - For MiKTeX on Windows: `%USERPROFILE%\texmf\tex\latex\tongjithesis\`
   - For MacTeX: `~/Library/texmf/tex/latex/tongjithesis/`

## Basic Usage

```latex
\documentclass[oneside]{tongjithesis}  % Use 'twoside' for double-sided printing

\tjbibresource{bib/note.bib}

\school{计算机科学与技术学院}
\major{计算机科学与技术}
\student{1234567}{张三}
\thesistitle{论文标题}{——副标题}
\thesistitleeng{Thesis title}{--- Subtitle}
\thesisadvisor{李四 教授}
\thesisdate{2026}{6}{1}

\begin{document}
\MakeCover
\cleardoublepage

\frontmatter
\MakeAbstract{摘要内容}{关键词1，关键词2}
\MakeAbstractEng{Abstract content}{Keyword1, Keyword2}
\clearpage
\tableofcontents
\cleardoublepage

\mainmatter
\chapter{引言}
% ... your content ...

\makereferences
\end{document}
```

## Documentation

For detailed documentation, please refer to the GitHub repository.

## License

This template is licensed under the LaTeX Project Public License (LPPL) version 1.3c or later.

## Links

- GitHub: https://github.com/TJ-CSCCG/TongjiThesis
- Overleaf: https://www.overleaf.com/latex/templates/tongji-university-undergraduate-thesis-template/tfvdvyggqybn
