Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new interface #434

Merged
merged 43 commits into from
Jan 4, 2020
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9e14596
add unit test
zepinglee May 31, 2019
580b676
new \thusetup interface
zepinglee Jul 16, 2019
9e119e4
reorganize title page commands
zepinglee Sep 23, 2019
aeeef04
refactor title page
zepinglee Sep 25, 2019
e0928c1
omit entry type marks for non-online bib
zepinglee Sep 30, 2019
15654b4
format doc indent
zepinglee Oct 11, 2019
94388ab
fix typo: title case name
zepinglee Dec 21, 2019
da27013
update README
zepinglee Dec 21, 2019
3875645
remove newpx
zepinglee Dec 21, 2019
60c591f
migrate to github action
zepinglee Dec 21, 2019
248ccce
modify hyperref patch
zepinglee Dec 21, 2019
f36f79f
add fontspec version checking (#437)
zepinglee Dec 21, 2019
972d45f
fix font of chapter in toc
zepinglee Dec 22, 2019
2044248
only chapter titles in appendix part of toc
zepinglee Dec 23, 2019
9b20a6c
add vscode support
zepinglee Dec 23, 2019
330db9d
add support for survey in appendix
zepinglee Dec 23, 2019
aa36370
update key-value interface
zepinglee Dec 25, 2019
a6ccc55
remove tocarialchpater in testfiles
zepinglee Dec 26, 2019
eb49506
Fix geometry
zepinglee Dec 26, 2019
b3fb554
Remove longtable dependency
zepinglee Dec 26, 2019
8d3a9ab
Remove ntheorem dependency
zepinglee Dec 26, 2019
4560a31
Remove hyperref dependency
zepinglee Dec 26, 2019
5a116ce
Update README.md
xueruini Dec 27, 2019
237b44b
Allow degree setup in preamble
zepinglee Dec 27, 2019
a895460
Import math_commands
zepinglee Dec 27, 2019
05be13e
Fix spine
zepinglee Dec 27, 2019
270fe76
Remove \shuji
zepinglee Dec 27, 2019
870bab0
Rename to acknowledgments
zepinglee Dec 28, 2019
23ec9ef
Set inline cite style
zepinglee Dec 28, 2019
7dbe2f3
Update build instructions
zepinglee Dec 28, 2019
36d1c57
Appendix toc-dpeth=0 by default
zepinglee Dec 28, 2019
d75332f
Update doc
zepinglee Dec 28, 2019
2f5254c
add support for siunitx
zepinglee Dec 28, 2019
2e5221d
Polish the doc a bit.
xueruini Dec 28, 2019
dff2f45
Polish doc.
xueruini Dec 28, 2019
db15b9f
Add copyright page tests
zepinglee Dec 28, 2019
a575673
Simplify code
zepinglee Dec 29, 2019
c6e58ec
Fix \Matrix typo in math commands
zepinglee Jan 2, 2020
2e8cbb0
Remove not necessary example.
xueruini Jan 3, 2020
b863e15
Upgrade node packages.
xueruini Jan 3, 2020
ddfd163
Revert "Allow degree setup in preamble"
zepinglee Jan 3, 2020
e97bef2
Rename to acknowledgements
zepinglee Jan 3, 2020
86dd693
Fix typo.
xueruini Jan 3, 2020
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
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ about: 报告模板中的 bug

## 编译环境
编译的系统:macOS 10.14 / Windows 10 / Ubuntu 18.04 / Overleaf
TeX 发行版:TeX Live 2019 / MacTeX 2019 / MikTeX 2.9.6753
模板版本:v5.5.2
TeX 发行版:TeX Live 2019 / MacTeX 2019 / MiKTeX 2.9.6753
模板版本:v6.0
模板类型:doctor / master / bachelor

## 描述问题
Expand All @@ -18,7 +18,7 @@ TeX 发行版:TeX Live 2019 / MacTeX 2019 / MikTeX 2.9.6753

复现上述问题的代码:
```TeX
\documentclass[degree=doctor]{thuthesis}
\documentclass{thuthesis}
\begin{document}
abc
\end{document}
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: build

on:
push:
schedule:
- cron: '0 0 * * *'

jobs:
build:

runs-on: ubuntu-latest
container: danteev/texlive

steps:
- uses: actions/checkout@v1
- name: Test thesis
run: make thesis
- name: Test spine
run: make spine
- name: Test formats
run: make test
- name: Test doc
run: make doc
21 changes: 18 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
## distribution files
.DS_Store
package-lock.json
node_modules/
dist/

## generated files:
dtx-style.sty
thuthesis.cls
thuthesis.cfg
thuthesis.pdf
main.pdf
spine.pdf
*.hd

## test files:
build/
testfiles/**/*.pdf

## Core latex/pdflatex auxiliary files:
*.aux
*.lof
Expand All @@ -24,6 +29,10 @@ spine.pdf
*.cb
*.cb2
.*.lb
!testfiles/**/*.aux
!testfiles/**/*.toc
!testfiles/**/*.lof
!testfiles/**/*.lot

## Intermediate documents:
*.dvi
Expand Down Expand Up @@ -123,6 +132,9 @@ acs-*.bib
*.gls
*.glsdefs

# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist

# gnuplottex
*-gnuplottex-*

Expand Down Expand Up @@ -150,11 +162,13 @@ acs-*.bib
# listings
*.lol

# luatexja-ruby
*.ltjruby

# makeidx
*.idx
*.ilg
*.ind
*.ist

# minitoc
*.maf
Expand Down Expand Up @@ -234,8 +248,9 @@ pythontex-files-*/
# xindy
*.xdy

# xypic precompiled matrices
# xypic precompiled matrices and outlines
*.xyc
*.xyd

# endfloat
*.ttt
Expand Down
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"latex-workshop.intellisense.package.enabled": true,
"latex-workshop.intellisense.unimathsymbols.enabled": true,
"latex-workshop.latex.recipes": [
{
"name": "latexmk for thuthesis",
"tools": [
"xetex-thuthesis",
"latexmk-xelatex",
]
}
],
"latex-workshop.latex.tools": [
{
"name": "xetex-thuthesis",
"command": "xetex",
"args": [
"-file-line-error",
"-halt-on-error",
"-interaction=nonstopmode",
"thuthesis.ins"
],
"env": {}
},
{
"name": "latexmk-xelatex",
"command": "latexmk",
"args": [
"-xelatex",
"-file-line-error",
"-halt-on-error",
"-interaction=nonstopmode",
"-synctex=1",
"-pv-",
"-pvc-",
"-outdir=%OUTDIR%",
"%DOC%"
],
"env": {}
},
]
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,30 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
### Added
- 新增 `survey`(调研阅读报告)和 `translation`(书面翻译)环境用于本科生的附录,
其中的参考文献引用独立于论文正文(#343)。

### Changed
- 重新设计 `\thusetup` 的接口。
- 指导教师的姓名和职称用英文逗号分开(#424)。
- 重新设计封面(题名页)。
- `\makecover` 拆分为 `\maketitle`、`\copyrightpage`。
- 中英文摘分别用 `abstract`、`abstract*` 环境生成。
- 处理 `hyperref` 与 `unicode-math` 的兼容性问题。
- 修正本科生的文献引用样式。
- 附录使用 `\appendix` 命令开始,不再使用 `appendix` 环境。
- 修改 `shuji` 为 `spine`。
- `acknowledgement` 环境改为 `acknowledgments`。
- 允许在导言区中设置 `degree` 和 `langauge`。

## Removed
- 移除 `secret` 选项。
- 移除 `translationbib` 环境。
- 移除 `tocarialchapter`、`tocarialchapterentry` 和 `tocarialchapterpage` 选项。

### Fixed
- 修正本科生目录章标题的字体。

## [v5.5.2] - 2019-04-21
### Changed
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else
RM = rm -f
endif

.PHONY: all all-dev clean distclean dist thesis viewthesis spine viewspine doc viewdoc cls check FORCE_MAKE
.PHONY: all all-dev clean distclean dist thesis viewthesis spine viewspine doc viewdoc cls check save savepdf test FORCE_MAKE

thesis: $(THESIS).pdf

Expand Down Expand Up @@ -51,9 +51,18 @@ viewthesis: thesis
viewspine: spine
$(LATEXMK) -pv $(SPINE)

save:
bash testfiles/save.sh

savepdf:
bash testfiles/save-pdf.sh

test:
l3build check

clean:
$(LATEXMK) -c $(PACKAGE).dtx $(THESIS) $(SPINE)
-@$(RM) *~
-@$(RM) *~ main-survey.*

cleanall: clean
-@$(RM) $(PACKAGE).pdf $(THESIS).pdf $(SPINE).pdf
Expand Down
38 changes: 17 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
[![Build Status](https://travis-ci.org/xueruini/thuthesis.svg?branch=master)](https://travis-ci.org/xueruini/thuthesis)
[![Actions Status](https://github.com/xueruini/thuthesis/workflows/build/badge.svg)](https://github.com/xueruini/thuthesis/actions)
[![Join the chat at https://gitter.im/thuthesis/Lobby](https://badges.gitter.im/thuthesis/Lobby.svg)](https://gitter.im/thuthesis/Lobby)
[![Github downloads](https://img.shields.io/github/downloads/xueruini/thuthesis/total.svg)](https://github.com/xueruini/thuthesis/releases)
[![GitHub release](https://img.shields.io/github/release/xueruini/thuthesis/all.svg)](https://github.com/xueruini/thuthesis/releases/latest)
[![GitHub commits](https://img.shields.io/github/commits-since/xueruini/thuthesis/latest.svg)](https://github.com/xueruini/thuthesis/commits/master)
[![GitHub downloads](https://img.shields.io/github/downloads/xueruini/thuthesis/total)](https://github.com/xueruini/thuthesis/releases)
[![GitHub commits](https://img.shields.io/github/commits-since/xueruini/thuthesis/latest)](https://github.com/xueruini/thuthesis/commits/master)
[![GitHub release](https://img.shields.io/github/v/release/xueruini/thuthesis)](https://github.com/xueruini/thuthesis/releases/latest)
[![CTAN](https://img.shields.io/ctan/v/thuthesis)](https://www.ctan.org/pkg/thuthesis)

# What's ThuThesis?
ThuThesis is an abbreviation of <b>T</b>sing<b>h</b>ua <b>U</b>niversity <b>Thesis</b> LaTeX Template.

This package establishes a simple and easy-to-use LaTeX template for Tsinghua dissertations, including general undergraduate research papers, masters theses, doctoral theses, doctoral dissertations, and post-doc reports. Additional support for other formats (what else is there?) will be added continuously. An English translation of this README follows the Chinese below.
This package establishes a simple and easy-to-use LaTeX template for Tsinghua dissertations, including general undergraduate research papers, masters theses, doctoral dissertations, and postdoctoral reports. An English translation of this README follows the Chinese below.


# ThuThesis是什么?
ThuThesis为 <b>T</b>sing<b>h</b>ua <b>U</b>niversity <b>Thesis</b> LaTeX Template之缩写。

此宏包旨在建立一个简单易用的清华大学学位论文LaTeX模板,包括本科综合论文训练、硕士论文、博士论文、博士哲学论文以及博士后出站报告。现在支持本科、硕士、博士论文、博士后出站报告格式,对其它格式(还有么?)的支持会陆续加入
此宏包旨在建立一个简单易用的清华大学学位论文LaTeX模板,包括本科综合论文训练、硕士论文、博士论文以及博士后出站报告

# 文档
请[下载](https://github.com/xueruini/thuthesis/releases)模板,里面包括具体使用说明以及示例文档:
Expand All @@ -21,12 +23,12 @@ ThuThesis为 <b>T</b>sing<b>h</b>ua <b>U</b>niversity <b>Thesis</b> LaTeX Templa
* 示例文档 (main.pdf)

# 下载
* 发行版:[CTAN](http://www.ctan.org/pkg/thuthesis)
* 发行版:[CTAN](https://www.ctan.org/pkg/thuthesis)
* 开发版:[GitHub](https://github.com/xueruini/thuthesis)

# 升级
## 自动更新
通过 TeX 发行版工具自动从 [CTAN](http://www.ctan.org/pkg/thuthesis) 更新。
通过 TeX 发行版工具自动从 [CTAN](https://www.ctan.org/pkg/thuthesis) 更新。

## 手动更新
从 [GitHub](https://github.com/xueruini/thuthesis) 下载放入论文目录,执行命令(Windows 用户在文件夹空白处按`Shift+鼠标右键`,点击“在此处打开命令行窗口”):
Expand All @@ -39,9 +41,7 @@ ThuThesis为 <b>T</b>sing<b>h</b>ua <b>U</b>niversity <b>Thesis</b> LaTeX Templa
按推荐顺序排序:

* 先到 [FAQ](https://github.com/xueruini/thuthesis/wiki/FAQ) 看看常见问题
* [Github Issues](http://github.com/xueruini/thuthesis/issues)
* [TeX@newsmth](http://www.newsmth.net/nForum/#!board/TeX)
* [ThuThesis@Google Groups](http://groups.google.com/group/thuthesis)
* [GitHub Issues](https://github.com/xueruini/thuthesis/issues)

# Makefile的用法

Expand All @@ -50,11 +50,10 @@ make [{all|thesis|spine|doc|clean|cleanall|distclean}]
```

## 目标
* `make all` 生成论文和书籍,相当于 `make thesis && make spine`;
* `make cls` 生成模板文件;
* `make thesis` 生成论文 main.pdf;
* `make spine` 生成书脊 spine.pdf;
* `make doc` 生成模板使用说明书 thuthesis.pdf;
* `make all` 生成论文和书籍,相当于 `make thesis && make spine`;
* `make clean` 删除示例文件的中间文件(不含 main.pdf);
* `make cleanall` 删除示例文件的中间文件和 main.pdf;
* `make distclean` 删除示例文件和模板的所有中间文件和 PDF。
Expand All @@ -65,12 +64,12 @@ Download and unzip the template. Specific usage documentation and examples can b
* Template example (main.pdf)

# Downloads
* Published version: [CTAN](http://www.ctan.org/pkg/thuthesis)
* Published version: [CTAN](https://www.ctan.org/pkg/thuthesis)
* Developer version: [GitHub](https://github.com/xueruini/thuthesis)

# Updates
## Automatic
Get the most up-to-date published version of the TeX tools from [CTAN](http://www.ctan.org/pkg/thuthesis).
Get the most up-to-date published version of the TeX tools from [CTAN](https://www.ctan.org/pkg/thuthesis).

## Manual
Download the package from [GitHub](https://github.com/xueruini/thuthesis) to the root directory of your thesis, then execute the command (Windows users `Shift + right click` white area in the file window and click "Open command line window here from the popup menu"):
Expand All @@ -82,10 +81,8 @@ You'll get `thuthesis.cls` along with other template files.
# Reporting Issues
Please follow the procedure below:

* Check the [FAQ](https://github.com/xueruini/thuthesis/wiki/FAQ)
* [Github Issues](http://github.com/xueruini/thuthesis/issues)
* [TeX@newsmth](http://www.newsmth.net/nForum/#!board/TeX)
* [ThuThesis@Google Groups](http://groups.google.com/group/thuthesis)
* Check the [FAQ](https://github.com/xueruini/thuthesis/wiki/FAQ)
* [GitHub Issues](https://github.com/xueruini/thuthesis/issues)

# Makefile Usage

Expand All @@ -94,11 +91,10 @@ make [{all|thesis|spine|doc|clean|cleanall|distclean}]
```

## Targets
* `make all` generate thesis and spine, same as `make thesis && make spine`;
* `make cls` generate template file;
* `make thesis` generate thesis main.pdf;
* `make spine` generate book spine for printing spine.pdf;
* `make doc` generate template documentation thuthesis.pdf;
* `make all` generate thesis and spine, same as `make thesis && make spine`;
* `make clean` delete all examples' files (excluding main.pdf);
* `make cleanall` delete all examples' files and main.pdf;
* `make distclean` delete all examples' and templates' files and PDFs.
26 changes: 26 additions & 0 deletions build.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env texlua

module = "thuthesis"

supportdir = "./testfiles/support-main"

checksuppfiles = {"fontset.tex"}
demofiles = {"main.tex", "thusetup.tex", "math_commands.tex", "data", "figures", "ref"}
installfiles = {"*.cls", "*.bst", "tsinghua.pdf"}
sourcefiles = {"*.dtx", "*.ins", "*.bst", "tsinghua.pdf"}

checkengines = {"xetex"}
stdengine = "xetex"

checkconfigs = {
"build", "testfiles/config-cover", -- "testfiles/config-nomencl",
"testfiles/config-bib",
}

typesetexe = "xelatex"
unpackexe = "xetex"

checkopts = "-file-line-error -halt-on-error -interaction=nonstopmode"
typesetopts = "-file-line-error -halt-on-error -interaction=nonstopmode"

lvtext = ".tex"
Loading