Debian Codegraph @

texmf-dist/doc/latex/jouthesis/README_EN.md

raw
1 <div align="center">
2
3 <img src="figures/jou-logo-full.png" alt="Jiangsu Ocean University Logo" width="200"/>
4
5 # JOU Undergraduate Thesis LaTeX Template
6
7 **江苏海洋大学本科毕业论文 LaTeX 模板**
8
9 [![License: LPPL 1.3c](https://img.shields.io/badge/License-LPPL%201.3c-blue.svg)](https://www.latex-project.org/lppl.txt)
10 [![TeX Live](https://img.shields.io/badge/TeX%20Live-2020+-green.svg)](https://www.tug.org/texlive/)
11 [![XeLaTeX](https://img.shields.io/badge/Engine-XeLaTeX-orange.svg)](#)
12
13 English | [简体中文](README.md)
14
15 </div>
16
17 ---
18
19 ## Overview
20
21 This repository provides a reproducible LaTeX workflow for the Jiangsu Ocean University undergraduate thesis package defined by the *2026 Graduation Internship and Thesis Work Manual*.
22
23 The repository currently includes:
24
25 - `main.tex` for the thesis body
26 - 18 handbook templates for forms, reports, and grading sheets
27 - WPS-PDF-based end-to-end alignment checks
28 - A bundled open-source font stack for consistent builds on Linux, macOS, and Windows
29 - A three-OS CI matrix that keeps Windows, macOS, and Linux thesis builds under regression checks
30
31 The font strategy is now standards-first for academic writing:
32
33 - `KaiTi_GB2312`
34 - `SimSun`
35 - `SimHei`
36 - `Times New Roman`
37
38 The public repository does not redistribute commercial Foundertype or Microsoft fonts. Instead, it ships an open-source fallback layer in `fonts/opensource/`, supports user-provided licensed overrides in `fonts/proprietary/`, and treats WPS fonts as a compatibility fallback rather than the default target.
39
40 ## Highlights
41
42 - `Academic standards first`: the thesis prioritizes `KaiTi_GB2312 / SimSun / SimHei / Times New Roman` for real submission workflows.
43 - `Handbook baseline checks`: page anchors, page count, orientation, and Word XML table grids are checked against the handbook export.
44 - `Cross-platform builds`: the default setup does not require preinstalled `KaiTi_GB2312`, `FangSong_GB2312`, or `Times New Roman`.
45 - `Complete template set`: thesis + 18 auxiliary templates.
46 - `Optional licensed mode`: users with valid local font licenses can override the default font stack for higher fidelity.
47 - `Executable QA`: layout expectations are written into E2E tests instead of being left as informal guidance.
48
49 ## Preview
50
51 The preview section is organized as a product page: first visual quality, then thesis completeness, then handbook coverage. Regenerate everything with `make readme-images`.
52
53 ### Thesis cover: reference vs current template
54
55 ![Thesis cover comparison](docs/images/cover-compare.png)
56
57 ### Thesis template gallery
58
59 This gallery shows the current thesis workflow pages: cover, Chinese abstract, English abstract, table of contents, body page, and references.
60
61 ![Thesis template gallery](docs/images/thesis-gallery.png)
62
63 ### Detail checks: abstract and body comparison
64
65 The main hero image is not enough on its own, so the README also keeps focused comparisons for the abstract and body pages. For the body sample, the comparison uses a dedicated `body-sample.pdf` artifact instead of a real thesis chapter page, so the right-hand side matches the handbook sample semantics.
66 The abstract comparison is cropped to the title, frame, and abstract content area so the handbook note block does not dilute the README demo.
67
68 ![Chinese abstract comparison](docs/images/abstract-compare.png)
69
70 ![Body page comparison](docs/images/body-compare.png)
71
72 ### Representative handbook forms
73
74 The gallery below shows six representative templates: topic selection, task book, science proposal, midterm check, thesis evaluation, and defense record.
75
76 ![Forms gallery](docs/images/forms-gallery.png)
77
78 ### Technical comparison artifacts
79
80 Overlay, diff, and checkerboard assets stay in `docs/assets/` for debugging residual font or geometry drift. Regenerate them with `make cover-diff`.
81
82 ## Quick Start
83
84 ### Requirements
85
86 - TeX Live 2020+ or MikTeX 2.9+
87 - `xelatex`
88 - Python 3.9+
89 - `pdfinfo`, `pdftotext`, `pdffonts` from Poppler for the test suite
90
91 ### Install TeX and Poppler
92
93 #### macOS
94
95 ```bash
96 brew install --cask mactex
97 brew install poppler
98 ```
99
100 #### Windows
101
102 - Install [TeX Live](https://www.tug.org/texlive/) or [MikTeX](https://miktex.org/)
103 - Install [Poppler for Windows](https://github.com/oschwartz10612/poppler-windows/releases)
104
105 #### Linux
106
107 ```bash
108 sudo apt-get install texlive-xetex texlive-lang-chinese poppler-utils
109 ```
110
111 ### Download bundled fonts
112
113 ```bash
114 make fonts
115 ```
116
117 This downloads the repository-managed open-source fonts into `fonts/opensource/`.
118
119 ### Build the thesis
120
121 ```bash
122 make
123 ```
124
125 Or:
126
127 ```bash
128 python3 scripts/download_fonts.py
129 latexmk -xelatex main.tex
130 ```
131
132 ### Build one handbook form
133
134 ```bash
135 cd templates/forms
136 latexmk -xelatex topic-selection.tex
137 ```
138
139 ### Run the tests
140
141 ```bash
142 make test
143 ```
144
145 ### Generate README preview images
146
147 ```bash
148 make readme-images
149 ```
150
151 ## Font strategy
152
153 ### Font priority
154
155 1. Local licensed standard fonts under `fonts/proprietary/`
156 2. System-standard academic fonts on Windows/macOS/Linux
157 3. WPS compatibility fonts
158 4. Bundled open-source fallback fonts
159
160 ### Open-source fallback mapping
161
162 | Standard academic font | Bundled fallback |
163 |------|------|
164 | Times New Roman | Tinos |
165 | Courier New | Courier Prime |
166 | SimSun / STSong | Noto Serif CJK SC |
167 | SimHei / STHeiti | Noto Sans CJK SC |
168 | KaiTi / KaiTi_GB2312 / STKaiti | LXGW WenKai GB |
169 | FangSong / FangSong_GB2312 / STFangsong | FandolFang |
170 | FangZheng XiaoBiaoSong | Noto Serif CJK SC Black |
171 | Xingkai styles | LXGW WenKai GB Medium |
172
173 ### Optional proprietary overrides
174
175 If you have a valid commercial font license, place the expected files under `fonts/proprietary/`. The template will automatically prefer them. See [fonts/README.md](fonts/README.md) for the exact filenames.
176
177 ## Tests
178
179 ### `tests/test_pixel_perfect_alignment.py`
180
181 Checks the handbook template contract:
182
183 - reference `docx/pdf` availability
184 - all 18 template `tex/pdf` artifacts
185 - Word XML table grid to LaTeX width mapping
186 - output PDF page count, orientation, and content anchors
187 - bundled font assets and embedded font stack
188
189 ### `tests/test_thesis_alignment.py`
190
191 Checks the thesis template:
192
193 - cover, declaration, abstracts, TOC, body, references ordering
194 - heading style contract for TOC and body
195 - page-header anchors
196 - embedded fonts for OSS mode or licensed mode
197
198 ## Repository layout
199
200 ```text
201 JOU-Undergraduate-Thesis-LaTeX-Template/
202 ├── main.tex
203 ├── Makefile
204 ├── contents/
205 ├── docs/
206 ├── figures/
207 ├── fonts/
208 │ ├── opensource/
209 │ └── proprietary/
210 ├── references/
211 ├── scripts/
212 ├── styles/
213 │ ├── joufonts.sty
214 │ ├── jouhandbook.sty
215 │ └── jouthesis.cls
216 ├── templates/
217 └── tests/
218 ```
219
220 ## FAQ
221
222 ### Missing font errors
223
224 Run `make fonts` first. The default mode should not require any system-installed licensed standard fonts.
225
226 On Windows, the project now probes:
227 - `C:/Windows/Fonts`
228 - common `WPS Office/office6/fonts` install locations
229 - WPS font folders under `LOCALAPPDATA`
230
231 If the client machine uses a non-standard install path, use [styles/joufontspaths.local.example.tex](/Users/tseka_luk/Documents/江苏海洋大学个人事物工作/JOU-Undergraduate-Thesis-LaTeX-Template/styles/joufontspaths.local.example.tex) as the local override template.
232
233 ### I want to use local Foundertype or Microsoft fonts
234
235 Place your licensed font files under `fonts/proprietary/` using the filenames documented in [fonts/README.md](fonts/README.md).
236
237 ### Why not promise strict pixel-perfect equality everywhere?
238
239 The public, reproducible contract is currently based on the WPS render baseline plus layout, pagination, and font-embedding checks. True per-pixel overlay matching requires the same renderer and the same exact font files on both sides.
240
241 ## Documentation
242
243 | File | Purpose |
244 |------|---------|
245 | [docs/README.md](docs/README.md) | Documentation index |
246 | [docs/guides/usage.md](docs/guides/usage.md) | Thesis usage guide |
247 | [docs/guides/table-examples.md](docs/guides/table-examples.md) | Table examples |
248 | [docs/guides/assets.md](docs/guides/assets.md) | Image asset notes |
249 | [templates/README.md](templates/README.md) | Auxiliary template overview |
250 | [fonts/README.md](fonts/README.md) | Font tiers and override rules |
251 | [slides/README.md](slides/README.md) | Slide generation workflow |
252
253 ## License
254
255 The template code is distributed under [LaTeX Project Public License v1.3c](https://www.latex-project.org/lppl.txt).
256
257 Bundled open-source fonts remain under their own licenses, with copies stored in `fonts/opensource/licenses/`.