Skip to content

Commit 140d6f0

Browse files
committed
[feat]: add Instructions for Windows & add Github Workflow
1 parent 112b8aa commit 140d6f0

File tree

4 files changed

+189
-10
lines changed

4 files changed

+189
-10
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release Template
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
package-and-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Create macOS Package
19+
run: |
20+
zip -r Xidian-LaTeX-Template-macOS.zip . -x "*.git*" -x ".github/*" -x ".gitignore" -x "WINDOWS_README.md"
21+
22+
- name: Create Windows Package
23+
run: |
24+
zip -r Xidian-LaTeX-Template-Windows.zip . -x "*.git*" -x ".github/*" -x ".gitignore" -x "Font/*" -x "MacTex_Installation_Settings/*" -x "switch-texlive.sh"
25+
26+
- name: Create Release
27+
uses: softprops/action-gh-release@v1
28+
with:
29+
files: |
30+
Xidian-LaTeX-Template-macOS.zip
31+
Xidian-LaTeX-Template-Windows.zip
32+
draft: false
33+
prerelease: false
34+
generate_release_notes: true

README.md

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,30 @@
1919

2020
## 📖 概述
2121

22-
本模板专为 **macOS + TeX Live 2025** 环境设计,帮助西电学子高效撰写学位论文。
22+
本模板专为 **macOS + TeX Live 2025** 环境设计,帮助西电学子高效撰写学位论文。同时,本模板也支持 **Windows** 环境(无需安装额外字体)。
2323

2424
### ✨ 核心工作流
2525

26-
```
27-
安装字体 → 配置 MacTeX 2025 → 更新宏包 → 编译论文
28-
```
26+
- **macOS**: `安装字体 → 配置 MacTeX 2025 → 更新宏包 → 编译论文`
27+
- **Windows**: `安装 TeX Live → 更新宏包 → 编译论文`
2928

3029
### ⚠️ 重要提示
3130

3231
若跳过任何环节,可能出现:图片位置异常、PDF 盒子错位、宏包缺失等问题。请严格按照以下步骤操作。
3332

3433
---
3534

36-
## 🚀 快速开始
35+
## 💻 Windows 用户
36+
37+
Windows 用户请直接参考专门的指南:
38+
39+
👉 **[Windows 使用指南 / Windows User Guide](./WINDOWS_README.md)**
40+
41+
> Windows 版本不需要安装 `Font` 目录下的字体,也不需要配置 MacTeX。
42+
43+
---
44+
45+
## 🚀 快速开始 (macOS)
3746

3847
### 步骤 1:安装字体
3948

@@ -117,6 +126,34 @@ latexmk -C
117126

118127
---
119128

129+
## ⚙️ 论文信息配置
130+
131+
本模板的详细使用说明书为项目根目录下的 `xduts.pdf`
132+
133+
论文的元数据(如标题、作者、学位类型等)均在 `main.tex` 文件中的 `info` 字段进行配置。请根据实际情况修改以下内容:
134+
135+
```tex
136+
info = {
137+
graduate-type = {博士}, % 毕业类型:博士/硕士
138+
degree-type = {学术}, % 学位类型:学术/专业
139+
degree = {工学博士}, % 学位名称
140+
title = {自适应学习平台排版流程示例}, % 中文标题
141+
title* = {Sample Workflow...}, % 英文标题
142+
department = {信息工程学院}, % 学院
143+
major = {智能系统与工程}, % 专业
144+
major* = {Intelligent Systems...}, % 专业英文
145+
submit-date = {2024-9}, % 提交日期
146+
author = {西电示例同学}, % 作者中文名
147+
author* = {Sample Student}, % 作者英文名
148+
supervisor = {示例导师}, % 导师中文名
149+
supervisor* = {Sample Advisor}, % 导师英文名
150+
student-id = {2024000000}, % 学号
151+
% ... 其他配置请参考 main.tex
152+
}
153+
```
154+
155+
---
156+
120157
### 方式 2:使用 TeXstudio
121158

122159
如果你习惯使用图形界面编辑器,可以配置 TeXstudio:

README_EN.md

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,30 @@ This project is based on **[XDUTS](https://github.com/note286/xduts)** (Xidian U
1818

1919
## 📖 Overview
2020

21-
This template is designed specifically for **macOS + TeX Live 2025** environment, helping Xidian students write their theses efficiently.
21+
This template is designed specifically for **macOS + TeX Live 2025** environment, helping Xidian students write their theses efficiently. It also supports **Windows** environment (no extra fonts installation required).
2222

2323
### ✨ Core Workflow
2424

25-
```
26-
Install Fonts → Configure MacTeX 2025 → Update Packages → Compile Thesis
27-
```
25+
- **macOS**: `Install Fonts → Configure MacTeX 2025 → Update Packages → Compile Thesis`
26+
- **Windows**: `Install TeX Live → Update Packages → Compile Thesis`
2827

2928
### ⚠️ Important Notice
3029

3130
Skipping any step may result in: misplaced images, PDF box errors, missing packages, etc. Please follow the steps strictly.
3231

3332
---
3433

35-
## 🚀 Quick Start
34+
## 💻 Windows Users
35+
36+
For Windows users, please refer to the dedicated guide:
37+
38+
👉 **[Windows User Guide](./WINDOWS_README.md)**
39+
40+
> The Windows version does not require fonts from the `Font` directory, nor does it need MacTeX configuration.
41+
42+
---
43+
44+
## 🚀 Quick Start (macOS)
3645

3746
### Step 1: Install Fonts
3847

@@ -116,6 +125,34 @@ latexmk -C
116125

117126
---
118127

128+
## ⚙️ Thesis Configuration
129+
130+
The detailed manual for this template is `xduts.pdf` located in the project root directory.
131+
132+
Thesis metadata (such as title, author, degree type, etc.) is configured in the `info` field within the `main.tex` file. Please modify the following content according to your actual situation:
133+
134+
```tex
135+
info = {
136+
graduate-type = {博士}, % Graduate type: PhD/Master
137+
degree-type = {学术}, % Degree type: Academic/Professional
138+
degree = {工学博士}, % Degree name
139+
title = {自适应学习平台排版流程示例}, % Chinese Title
140+
title* = {Sample Workflow...}, % English Title
141+
department = {信息工程学院}, % Department
142+
major = {智能系统与工程}, % Major
143+
major* = {Intelligent Systems...}, % Major (English)
144+
submit-date = {2024-9}, % Submission Date
145+
author = {西电示例同学}, % Author Name (Chinese)
146+
author* = {Sample Student}, % Author Name (English)
147+
supervisor = {示例导师}, % Supervisor Name (Chinese)
148+
supervisor* = {Sample Advisor}, % Supervisor Name (English)
149+
student-id = {2024000000}, % Student ID
150+
% ... Refer to main.tex for other configurations
151+
}
152+
```
153+
154+
---
155+
119156
### Method 2: Using TeXstudio
120157

121158
If you prefer a GUI editor, you can configure TeXstudio:

WINDOWS_README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Windows 使用指南 / Windows User Guide
2+
3+
[🇨🇳 中文](#windows-使用指南) | [🇺🇸 English](#windows-user-guide)
4+
5+
本模板在 Windows 10/11 下经过测试,可正常编译使用。Windows 用户**不需要**安装 `Font` 目录下的字体文件(模板会自动调用系统自带的中文字体)。
6+
7+
---
8+
9+
## 🚀 Windows 使用指南
10+
11+
### 1. 安装 TeX Live
12+
请访问 [TeX Live 官网](https://www.tug.org/texlive/) 下载并安装最新版的 TeX Live(推荐安装完整版)。
13+
14+
### 2. 更新宏包(必做)
15+
安装完成后,请打开命令提示符(CMD)或 PowerShell(管理员模式),执行以下命令以更新所有宏包:
16+
17+
```bash
18+
tlmgr update --all --self
19+
```
20+
21+
> ⚠️ **注意**:此步骤至关重要,否则可能会出现编译错误或排版异常。
22+
23+
### 3. 编译论文
24+
25+
#### 方式一:使用命令行(推荐)
26+
在项目根目录下打开终端,运行:
27+
28+
```bash
29+
latexmk -xelatex -bibtex -synctex=1 -interaction=nonstopmode main.tex
30+
```
31+
32+
#### 方式二:使用 TeXstudio / VS Code
33+
- **TeXstudio**: 确保编译器设置为 `XeLaTeX`
34+
- **VS Code**: 安装 `LaTeX Workshop` 插件,并使用 `Recipe: latexmk (xelatex)` 进行编译。
35+
36+
---
37+
38+
# Windows User Guide
39+
40+
[🇨🇳 中文](#windows-使用指南) | [🇺🇸 English](#windows-user-guide)
41+
42+
This template has been tested and works correctly on Windows 10/11. Windows users **do NOT** need to install fonts from the `Font` directory (the template automatically uses system-installed Chinese fonts).
43+
44+
---
45+
46+
## 🚀 Windows Usage Guide
47+
48+
### 1. Install TeX Live
49+
Please visit the [TeX Live official website](https://www.tug.org/texlive/) to download and install the latest version of TeX Live (Full installation is recommended).
50+
51+
### 2. Update Packages (Required)
52+
After installation, open Command Prompt (CMD) or PowerShell (as Administrator) and run the following command to update all packages:
53+
54+
```bash
55+
tlmgr update --all --self
56+
```
57+
58+
> ⚠️ **Note**: This step is critical. Skipping it may cause compilation errors or layout issues.
59+
60+
### 3. Compile Thesis
61+
62+
#### Method 1: Command Line (Recommended)
63+
Open a terminal in the project root directory and run:
64+
65+
```bash
66+
latexmk -xelatex -bibtex -synctex=1 -interaction=nonstopmode main.tex
67+
```
68+
69+
#### Method 2: Using TeXstudio / VS Code
70+
- **TeXstudio**: Ensure the compiler is set to `XeLaTeX`.
71+
- **VS Code**: Install the `LaTeX Workshop` extension and use the `Recipe: latexmk (xelatex)` to compile.

0 commit comments

Comments
 (0)