Skip to content

Commit

Permalink
feat: 简化标题和导师选项 (#60)
Browse files Browse the repository at this point in the history
- 使用 clist 重新实现标题手动断行
- 使用 clist 合并导师姓名和职称选项
- 文档修改
  • Loading branch information
atxy-blip committed Jan 12, 2022
1 parent 3baf6ec commit 1ea08a9
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 151 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:
run: |
${{ env.SET_PATH }}
cd test
mv ../scripts/* .
pdflatex --shell-escape "generate-img.tex"
latexmk -halt-on-error -time -pdfxe -jobname=test-xetex test.tex
latexmk -halt-on-error -time -pdflua -jobname=test-luatex test.tex
Expand Down
29 changes: 11 additions & 18 deletions docs/njuthesis-sample.tex
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@
% info 类用于录入个人信息
% 带*号的为对应英文字段
info = {
title = {第一行标题!第二行标题!第三行标题},
title = {第一行标题,第二行标题,第三行标题},
% 中文题目
% 新版删除了原先的三个手动换行选项
% 直接填写标题就是自动换行
% 可以使用英文半角感叹号(!)手动指定换行位置
% 可以使用英文半角逗号(,)手动指定换行位置
%
title* = {My Title in English},
% 英文题目
Expand Down Expand Up @@ -101,22 +100,16 @@
major* = {Chemistry},
% 专业
%
supervisor = {导师},
supervisor*= {My Supervisor},
% 导师姓名
% 新版对选项名称进行了改动
supervisor = {导师,教授},
supervisor*= {Professor My Supervisor},
% 导师全称
% 新版对选项进行了改动
% 使用英文半角逗号(,)分隔中文姓名和职称
%
supervisor-title = {教授},
supervisor-title* = {Professor},
% 导师职称
% 新版对选项名称进行了改动
%
% supervisor-ii = {第二导师},
% supervisor-ii* = {My Second Supervisor},
% supervisor-ii-title = {副教授},
% supervisor-ii-title* = {Associate professor},
% 第二导师
% 新版对选项名称进行了改动
% supervisor-ii = {第二导师,副教授},
% supervisor-ii* = {Associate professor My Second Supervisor},
% 第二导师全称
% 新版对选项进行了改动
% 如果确实没有第二导师,不填写即可
%
submit-date = {2021年8月10日},
Expand Down

2 comments on commit 1ea08a9

@zepinglee
Copy link

@zepinglee zepinglee commented on 1ea08a9 Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

标题用 \\ 手动换行是不是更自然一些?比如 \seq_set_split:Nnn \l_@@_tmp_seq { \\ } { #1 }。因为标题用本身就可能含有逗号。

@atxy-blip
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

接着看看这个问题 :D

因为标题用本身就可能含有逗号。

给出的解决方法是加个花括号 {,} (……)

是不是更自然一些

确实,我记得我一开始也是这样想的,可能是之前没写对。上一个版本用的是 ! 作为换行符,把 v0.13 的代码改改应该就好了。

Please sign in to comment.