You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-EN.md
+57-32Lines changed: 57 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,22 +50,64 @@ The project is configured with GitHub Actions in `.github/workflows/*.yaml`. Pus
50
50
51
51
We recommend installing TeX Live (Windows, Linux) or MacTeX (macOS) following the [official quick install guide](https://tug.org/texlive/quickinstall.html).
52
52
53
-
#### Supporting Code Highlighting
53
+
#### Document Class Options
54
54
55
-
This template supports code highlighting by incorporating the `minted` package. The `minted` package requires Python support, so you need to install Python and use `pip` to install `Pygments`. Afterwards, add the Python path with `Pygments` installed to the environment variable `PATH`, or configure as follows to ensure $\LaTeX$ can correctly invoke the `minted` package.
55
+
This template provides the following document class options, which can be configured in `main.tex`:
56
56
57
-
<details><summary>Don't want to add this Python path to the environment variable `PATH`?</summary>
57
+
```latex
58
+
\documentclass[
59
+
oneside, % One-sided printing (default), use twoside for double-sided printing
60
+
fullwidthstop=false, % Whether to replace Chinese period "。" with Western-style period ".", default is false
61
+
fontset=fandol, % Font set to use, default is fandol
62
+
times=false, % Whether to use Times New Roman font, default is false
63
+
minted=true, % Whether to use the minted package for code highlighting, default is true
64
+
]{tongjithesis}
65
+
```
66
+
67
+
##### Single/Double-Sided Printing Options
68
+
69
+
-`oneside`: Single-sided printing (default)
70
+
-`twoside`: Double-sided printing, adjusts page margins and binding line
71
+
72
+
##### Font Options
73
+
74
+
-`fontset=fandol`: Use Fandol font set (default)
75
+
-`fontset=adobe`: Use Adobe font set (requires Adobe fonts installation)
76
+
-`times=false`: Use default math font (default)
77
+
-`times=true`: Use Times New Roman font
78
+
79
+
##### Chinese Punctuation Options
80
+
81
+
-`fullwidthstop=false`: Keep Chinese period "。" unchanged (default)
82
+
-`fullwidthstop=true`: Replace Chinese period "。" with Western-style period "."
58
83
59
-
You can add a redirect to the Python path of the `minted` package in the `main.tex` file:
84
+
##### Code Highlighting Options
85
+
86
+
This template provides two code highlighting solutions:
- Enable by setting `minted=true` (default) in `main.tex`
90
+
- Requires installation of Python and Pygments library (`pip install pygments`)
91
+
- You need to add Python to the system `PATH` environment variable,
92
+
- or specify the Python path in `main.tex` (see below)
93
+
- Requires `-shell-escape` parameter during compilation (this template has added)
94
+
95
+
2.**`listings` package** (pure LaTeX): Does not depend on external programs, can be used in any environment.
96
+
- Enable by setting `minted=false` in `main.tex`
97
+
- No additional program installation required
98
+
99
+
If you do not want to install Python or encounter `minted`-related errors, you can change `minted=true` to `minted=false` in `main.tex`. When using `minted=false`, the template will automatically use the `listings` package to process all code, without requiring additional configuration.
100
+
101
+
<details><summary>Using `minted` but don't want to add Python to the `PATH` environment variable?</summary>
102
+
103
+
You can add a redirection to the Python path of the `minted` package in the `main.tex` file:
If you do not need code highlighting, please comment out the related content in the `minted` package.
68
-
69
111
#### Building the Project
70
112
71
113
Due to the complex file structure of this template, we do not recommend using commands like `latexmk` that come with TeX Live for compilation.
@@ -118,34 +160,16 @@ For detailed usage, see [tongji-undergrad-thesis-env](https://github.com/TJ-CSCC
118
160
119
161
### Other Features
120
162
121
-
#### Double-Sided Printing
122
-
123
-
If you need to use double-sided printing, simply change the first line in `main.tex` from
124
-
125
-
```latex
126
-
\documentclass[oneside]{tongjithesis}
127
-
```
128
-
129
-
to
130
-
131
-
```latex
132
-
\documentclass[twoside]{tongjithesis}
133
-
```
134
-
135
-
to enable it.
136
-
137
163
#### Rendering Rare Characters
138
164
139
-
Due to the default use of the Fandol font in this template, support for rare characters such as names and specific terms might not be adequate. We provide the Adobe font set in the [`fonts`](https://github.com/TJ-CSCCG/tongji-undergrad-thesis/tree/fonts) branch of our GitHub repository. You can download and install these fonts, and then change the line in `style/tongjithesis.cls` from
140
-
141
-
```latex
142
-
\LoadClass[UTF8,a4paper,fontset=fandol]{ctexart}
143
-
```
144
-
145
-
to
165
+
Due to the default use of the Fandol font in this template, support for rare characters such as names and specific terms might not be adequate. We provide the Adobe font set in the [`fonts`](https://github.com/TJ-CSCCG/tongji-undergrad-thesis/tree/fonts) branch of our GitHub repository. You can download and install these fonts, and then use the `fontset=adobe` option in `main.tex` to use the Adobe font set:
146
166
147
167
```latex
148
-
\LoadClass[UTF8,a4paper,fontset=adobe]{ctexart}
168
+
\documentclass[
169
+
oneside,
170
+
fontset=adobe,
171
+
% other options...
172
+
]{tongjithesis}
149
173
```
150
174
151
175
This modification will switch the rendering in the document to use the Adobe font set, enhancing support for rare characters.
@@ -165,7 +189,7 @@ This project uses the [LPPL-1.3c license](https://www.latex-project.org/lppl/lpp
165
189
166
190
```text
167
191
%% tongji-undergrad-thesis
168
-
%% Copyright 2023 TJ-CSCCG
192
+
%% Copyright 2022-2025 TJ-CSCCG
169
193
%
170
194
% This work may be distributed and/or modified under the
171
195
% conditions of the LaTeX Project Public License, either version 1.3
@@ -189,6 +213,7 @@ This project uses the [LPPL-1.3c license](https://www.latex-project.org/lppl/lpp
189
213
- Starting May 9, 2021, [ganler](https://github.com/ganler) enhanced the functionalities (project structure and platform compatibility) based on the original project and began maintaining it.
190
214
- As of May 12, 2022, [skyleaworlder](https://github.com/skyleaworlder) started contributing to the project, integrated it into [TJ-CSCCG](http://github.com/TJ-CSCCG), and has continued to update and improve it. It has now become a comprehensive undergraduate thesis template.
191
215
- From April 2023, [RizhongLin](https://github.com/RizhongLin) began contributing to and managing the project.
216
+
- April 2025 update, implemented key-value based class options, supporting more flexible configuration.
192
217
193
218
We deeply appreciate the efforts of these contributors, whose work has facilitated and assisted many students.
194
219
@@ -209,5 +234,5 @@ We have learned a lot from excellent open-source projects from top universities:
0 commit comments