Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
580be94
d white space
leftrk Aug 13, 2017
b8e16e7
addsome
leftrk Dec 20, 2017
fd06a32
complete
leftrk Dec 20, 2017
ba98dc3
fix space
leftrk Dec 20, 2017
81b1b6f
fix *
leftrk Dec 20, 2017
07503e6
format
leftrk Dec 20, 2017
dd9efe7
mod README.md
leftrk Dec 20, 2017
df2eab7
mod README.md
leftrk Dec 20, 2017
f44ea45
fix README.md
leftrk Dec 21, 2017
b5ffaa7
Update README.md
Mar 17, 2018
27b576c
Update README.md
Mar 17, 2018
673b9f7
Update README.md
Mar 17, 2018
d9cb742
Update README.md
Mar 21, 2018
517a764
Who knows WTF?!
leftrk Mar 21, 2018
76799f3
clarify further the brokenness of C++. why the fuck are we using C++?
leftrk Mar 21, 2018
8822c42
add paper guidance for bachelor (2017)
Apr 15, 2018
0d037d0
把本科生毕业论文指导手册的格式改成PDF
Apr 15, 2018
50accc2
change the cls fie
Apr 15, 2018
b40c930
.DS_Store banished!
Apr 15, 2018
d631a18
Merge pull request #6 from HolosLee/dev
May 11, 2018
2df8e53
2020年6月17日
leftrk Jun 16, 2020
891bff8
delete log
leftrk Jun 16, 2020
5c17375
今天毕业了
leftrk Jul 1, 2020
87f16a7
毕业
leftrk Jul 1, 2020
3a344fb
Push poorly written test can down the road another ten years
Mar 6, 2021
7e59638
foo
Mar 6, 2021
1540bd0
By works, I meant 'doesnt work'. Works now..
Mar 6, 2021
6074ad1
Update README.md
Dec 3, 2021
e89d8a2
Update README.md
Dec 3, 2021
7b2b51d
Update README.md
Dec 8, 2021
535a27f
Update README.md
Dec 8, 2021
cf4810b
Update README.md
Mar 18, 2022
e173b34
Update README.md
Jul 5, 2022
55c2b8d
Update README.md
Nov 16, 2022
27664d7
Update README.md
Nov 16, 2022
6703834
Update README.md
leftrk Dec 7, 2022
a48409e
Update README.md
leftrk Jun 16, 2025
7a46309
update
Feb 12, 2026
7f1236c
Merge pull request #13 from leftrk/fix
leftrk Feb 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.aux
*.bbl
*.blg
*.log
*.out
*.toc
*.lot
*.lof
*.thm
*.synctex.gz
*.fdb_latexmk
*.fls
*.pdf
!main.pdf
!ructhesis.pdf
4 changes: 4 additions & 0 deletions .latexmkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$pdf_mode = 1;
$pdflatex = 'xelatex -synctex=1 -interaction=nonstopmode %O %S';
$recorder = 1;
$bibtex_use = 2;
139 changes: 88 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,105 @@
# RUCThesis
##中国人民大学LaTeX论文模板
![image](https://user-images.githubusercontent.com/11362493/144565641-926c4828-1c56-486f-94cc-4b7d14afb3c8.png)

目前支持本科、硕士(学硕+专硕)和博士
# 中国人民大学 LaTeX 论文模板 (RUC-Thesis)

**如果已经有ructhesis.cls文件的可以直接使用。**
**目前的版本使用了[2015国标](https://github.com/ustctug/gbt-7714-2015)的参考文献样式。**
在main.tex文件下使用如下命令:
这是一个适用于中国人民大学本科、硕士(学硕+专硕)和博士学位论文的 LaTeX 模板。

这里我们使用xelatex作为排版引擎,第一步编译main.tex文件,第二步处理参考文献,然后再编译两遍生成pdf文件。
> 符合学校和老师的模板就是好模板,你需要仔细的考虑自己是否需要LaTeX,其实 Word 也是不错的软件。
> 临近毕业,发邮件提问的学弟学妹越来越多了,希望大家开[issue](https://github.com/GH1995/RUC-thesis-template-for-LaTeX/issues)讨论,或者直接发PR,这样可以帮助更多的人。

`$ xelatex main.tex`
`$ bibtex main.tex`
`$ xelatex main.tex`
`$ xelatex main.tex`
目前支持本科、硕士(学硕+专硕)和博士,排版出来的封面和下面差不多,可以在 [overleaf](https://www.overleaf.com/read/kmjxwrcjstqx) 上直接预览。

##重要信息
**1、编辑器要用UTF-8的编码要不然你打开是乱码。**
**2、排版引擎使用XeLaTeX,要不然会报错。**
<img src="./figures/Snipaste_2020-06-17_03-55-47.png" height="500rem" alt="example" align=center />

## 1. 使用方法

###必要的字体文件
本模板使用 `XeLaTeX` 作为排版引擎,因为它对中文支持最好。

字体 | PostScript名称
------------ | -------------
Times New Roman | TimesNewRomanPSMT
Arial | ArialMT
Courier New | CourierNewPSMT
宋体 | SimSun
黑体 | SimHei
仿宋 | FangSong
### 环境准备

1. **安装 TeX 发行版**:
* **MacOS**: 推荐安装 [MacTeX](https://www.tug.org/mactex/)。
* **Windows**: 推荐安装 [TeX Live](https://www.tug.org/texlive/) (不推荐 CTeX 套装)。
* **Linux (Ubuntu)**: `sudo apt install texlive-full`。
2. **安装字体**:
* 模板默认使用了 **方正小标宋简体** (FZXBSJW--GB1-0) 用于部分标题。
* 您可能欠缺这部分字体,为此我们提供[这里(不是百度网盘)](https://ruc.lanzouo.com/inJo9xec09i)以供下载。下载后请安装到系统字体目录。

**需要生成封皮的还需要自行下载安装**
### 编译论文

- 方正小标宋 PostScript名称:FZXBSJW–GB1-0
#### 方法 A:使用 latexmk (推荐)

###必要的宏包
本项目已配置 `.latexmkrc`,支持自动化编译。如果您安装了 `latexmk`(通常包含在 TeX Live/MacTeX 中),只需在项目根目录下运行:

**全部都是TeX Live自带的**
- ctexbook
- geometry
- hyperref
- graphicx
- titletoc
- ifxetex
- ifthen
- calc
- lscape
- multicol
- color
- pstricks
```bash
latexmk
```

###想编译模板文件和生成手册的可以执行下述代码
生成模板文件ructhesis.cls
`$ latex ructhesis.ins`
生成手册ructhesis.pdf
`$ xelatex ructhesis.dtx`
`$ makeindex -s gind.ist -o ructhesis.ind ructhesis.idx `
`$ makeindex -s gglo.ist -o ructhesis.gls ructhesis.glo `
`$ xelatex ructhesis.dtx`
`$ xelatex ructhesis.dtx`
它会自动处理 `xelatex` -> `bibtex` -> `xelatex` 的依赖关系,并生成 `main.pdf`。

###联系
如果模板本身的问题可以上[GitHub](https://github.com/ZebinWang/ructhesis)上发篇issue。
清理中间文件:
```bash
latexmk -c
```

如果想贡献代码的请email我: <me@zebinwang.com>
#### 方法 B:手动编译

如果您习惯手动编译,请严格按照以下顺序执行命令,以确保目录和参考文献正确生成:

```bash
xelatex main.tex
bibtex main
xelatex main.tex
xelatex main.tex
```

### 配置论文信息

打开 `main.tex` 文件,在导言区配置您的个人信息:

```latex
\documentclass[a4paper,bachelor]{ructhesis} % 选项: bachelor, master, doctor, promaster

...

\title{您的论文题目}
\author{您的姓名}
\school{您的学院}
...
```

* **学位选项**:在 `\documentclass` 中选择 `bachelor` (本科), `master` (学硕), `promaster` (专硕), 或 `doctor` (博士)。
* **正文内容**:正文章节放在 `chap/` 目录下,并在 `main.tex` 中通过 `\include` 引入。

## 2. 技术细节

### 核心文件

* **`ructhesis.cls`**: 核心文档类文件,定义了论文的整体样式、页眉页脚、标题格式等。基于 `ctexbook` 文档类开发。
* **`ref/rucbib.bst`**: 参考文献样式文件,基于 `gbt7714-2015` 标准修改,以符合人大论文规范。

### 宏包与依赖

本模板经过优化,移除了一些过时的宏包,采用了更现代的方案:

* **排版引擎**: 必须使用 `XeLaTeX`,以支持 UTF-8 编码和系统字体调用。
* **图表**: 使用 `graphicx` 处理插图,`booktabs` 处理三线表。
* **子图/子表**: 使用现代的 `subcaption` 宏包,替代了过时的 `subfigure` 和 `caption2`。
* **字体命令**: 更新了旧式的 `\bf`, `\rm` 等命令为 `\bfseries`, `\rmfamily` 等,符合 LaTeX2e 标准。

### 目录结构

* `chap/`: 存放各章节的 `.tex` 源码。
* `format/`: 存放摘要、致谢等固定格式页面的 `.tex` 源码。
* `figures/`: 存放论文所需的图片文件。
* `ref/`: 存放参考文献数据库 (`.bib`) 和样式文件 (`.bst`)。
* `main.tex`: 主控文件,用于组织全文。

## 常见问题

* **编译报错 "Font ... not found"**: 请检查是否安装了“方正小标宋简体”等字体。
* **参考文献显示不出来**: 请确保运行了 `bibtex` 命令(或使用了 `latexmk`),并且 `.bib` 文件中有相应条目。
* **Overleaf 使用**: 如果在 Overleaf 上使用,请将项目的编译器设置为 `XeLaTeX`。

---
![Alt](https://repobeats.axiom.co/api/embed/178d62098f91e5a8b1c3439855fa0ec5cae1f803.svg "Repobeats analytics image")
6 changes: 4 additions & 2 deletions chap/appendix_1.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
\chapter{如何正确安装\LaTeX\ }
\chapter{无俗念}

Noun–verb dependencies in various languages and their biological ana- logues. Part A) shows the sentence “Dick saw Jane help Mary draw pictures” trans- lated grammatically into German and Dutch. That is, the words in the sentence are rearranged to reflect the rules of grammar in these two languages, but the sentence is not translated per se. As shown, the English version of the sentence has a rela- tively simple dependency structure between the nouns and verbs that can be modeled using regular grammars. In contrast, German and Dutch require more complicated grammatical models . Part B) shows the biological analogue of the three sen- tences in Part A). Typically, restriction sites can be modeled using regular grammars, whereas complex DNA secondary structures require context–free or context–sensitive grammars . In the first example, the arches are used to represent a “must be followed by” dependency. In the second two examples, they represent a “must be complementary to” dependency.
春游浩荡,是年年寒食,梨花时节。白锦无纹香烂漫,玉树琼苞堆雪。静夜沉沉,浮光霭霭,冷浸溶溶月。人间天上,烂银霞照通彻。

浑似姑射真人,天姿灵秀,意气殊高洁。万蕊参差谁信道,不与群芳同列。浩气清英,仙才卓荦,下土难分别。瑶台归去,洞天方看清绝。
63 changes: 33 additions & 30 deletions chap/chapter1.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
\chapter{\LaTeX{} 介绍}
\epigraph{道者,万物之奥,善人之宝,不善人之所保。美言可以市尊,美行可以加人。人之不善,何弃之有?故立天子,置三公,虽有拱璧以先驷马,不如坐进此道。古之所以贵此道者何?不曰:求以得,有罪以免邪?故为天下贵。}{老子}

%\section{安装\LaTeX{} }
%\subsection{Mac OS X}
%\begin{figure}[htbp]
Expand All @@ -9,35 +11,36 @@ \chapter{\LaTeX{} 介绍}

\LaTeX\ 使用\TeX\ 作为它的格式化引擎,当前的版本是\LaTeX 2ε。
\begin{figure}[htbp]
\centering
\subfigure[国际象棋]{
\label{fig:mini:subfig:a} %% label for first subfigure
\begin{minipage}[b]{0.5\textwidth}
\centering
\fenboard{%
r5k1/%
1b1p1ppp/%
p7/%
1p1Q4/%
2p1r3/%
PP4Pq/%
BBP2b1P/%
R4R1K w - - 0 20}
\mbox{}\showboard
\end{minipage}}%
\subfigure[化学式]{
\label{fig:mini:subfig:b} %% label for second subfigure
\begin{minipage}[b]{0.5\textwidth}
\centering
\chemfig{
H_3C-[:72]{\color{blue}N}*5(-
*6(-(={\color{red}O})-
{\color{blue}N}(-CH_3)-
(={\color{red}O})-
{\color{blue}N}(-CH_3)-=)--
{\color{blue}N}=-)}
\end{minipage}}
\caption{\LaTeX\ 绘图示例}
\label{fig:mini:subfig} %% label for entire figure
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\fenboard{%
r5k1/%
1b1p1ppp/%
p7/%
1p1Q4/%
2p1r3/%
PP4Pq/%
BBP2b1P/%
R4R1K w - - 0 20}
\mbox{}\showboard
\caption{国际象棋}
\label{fig:mini:subfig:a} %% label for first subfigure
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\chemfig{
H_3C-[:72]{\color{blue}N}*5(-
*6(-(={\color{red}O})-
{\color{blue}N}(-CH_3)-
(={\color{red}O})-
{\color{blue}N}(-CH_3)-=)--
{\color{blue}N}=-)}
\caption{化学式}
\label{fig:mini:subfig:b} %% label for second subfigure
\end{subfigure}
\caption{\LaTeX\ 绘图示例}
\label{fig:mini:subfig} %% label for entire figure
\end{figure}

Loading