Skip to content

Commit

Permalink
Feature(lanuage): support multi-lingual format.
Browse files Browse the repository at this point in the history
  • Loading branch information
iofu728 committed Jul 16, 2022
1 parent 2884186 commit bb43c49
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 97 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ To use pkuthss in the overleaf platform, and to support some customization requi
- Supported scanned pdf insert(origin and copy pages);
- Add fontset mode, change bfseries -> AutoFakeBold in windows;
- Simplify user settings in blind mode;
- Support multi-lingual format(chinese and english);

## Quick Start

Expand Down Expand Up @@ -58,6 +59,7 @@ The following files have been changed
- [x] Fix table of contents.
- [x] Support insert pdf (copy and origin pages).
- [x] Adaptive pkuthss v1.9.2.
- [x] Support multi-lingual format.

## Change Log

Expand Down
41 changes: 21 additions & 20 deletions doc/example/chap/chap1.tex
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ \section{封面及pkuthssinfo相关}
封面部分参考《北京大学研究生学位论文写作指南V2.0-2019》(以下简称写作指南)第1.1节中描述和《硕士论文模板2020》进行修改。

\begin{Verbatim}
\pkuthss{}info{
cthesisname = {硕士学位论文},
thesiscover = {硕士研究生学位论文},
ethesisname = {Master Thesis},
ctitle = {基于XXXX的XXXX系统设计与实现},
etitle = {Design and implementation of a XXXXX system based on XXXX},
cauthor = {扎克·施耐德}, eauthor = {Zack Snyder},
studentid = {180XXXXXXX},
% 具体时间以教务为准,初稿3月,送审4月,答辩5月,最终6月。
date = {\zhdigits{2021}\ \ 年\ \ \zhnumber{6}\ \ 月},
school = {XXXXXX学院},
cmajor = {XXXX}, emajor = {XXXX},
direction = {XXXX},
mentorlines = {2}, % 导师个数
% 副教授 A.P. 讲师 Lec.
cmentor = {XXX\ \ 教授\\YYY\ \ 教授}, ementor = {Prof.\ XXX and Prof.\ YYY},
ckeywords = {A,B,C,D},
ekeywords = {A,B,C,D},
% 盲审模式参数, 需在documentclass增加blind
blindid = {XXXXXXXXX}, discipline = {XXXX}
\pkuthssinfo{
cthesisname = {硕士学位论文},
thesiscover = {硕士研究生学位论文},
ethesisname = {Master Thesis},
ctitle = {基于XXXX的XXXX系统设计与实现},
etitle = {Design and implementation of a XXXXX system based on XXXX},
cauthor = {扎克·施耐德}, eauthor = {Zack Snyder},
studentid = {180XXXXXXX},
% 具体时间以教务为准,初稿3月,送审4月,答辩5月,最终6月。
date = {\zhdigits{2021}\ \ 年\ \ \zhnumber{6}\ \ 月},
school = {XXXXXX学院},
cmajor = {XXXX}, emajor = {XXXX},
direction = {XXXX},
mentorlines = {2}, % 导师个数
% 副教授 A.P. 讲师 Lec.
cmentor = {XXX\ \ 教授\\YYY\ \ 教授}, ementor = {Prof.\ XXX and Prof.\ YYY},
ckeywords = {A,B,C,D},
ekeywords = {A,B,C,D},
% 盲审模式参数, 需在documentclass增加blind
blindid = {XXXXXXXXX}, discipline = {XXXX}
}
\end{Verbatim}

Expand Down Expand Up @@ -275,4 +275,5 @@ \section{与\pkuthss{} \iofubaseversion{}异同}
\item 字体模式
\item 简化blind模式下用户设定
\item Windows 下中易宋体的粗体用假粗体替代
\item 语言模式
\end{enumerate}
108 changes: 56 additions & 52 deletions doc/example/thesis.tex
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
% Copyright (c) 2008-2009 solvethis
% Copyright (c) 2010-2016,2018-2019,2021-2022 Casper Ti. Vector
% Copyright (c) 2021 Kurapica
% Copyright (c) 2021 iofu728
% Copyright (c) 2022 iofu728
% Local version.

%*********************************************************************
% iofu728-pkuthss: 北京大学研究生学位论文模板
% 2021/06/09 v1.0.0
% 2022/07/16 v1.1.0
%
% 重要提示:
% 1. 当前overleaf版符合2021研究生学位论文要求,可通过图书馆审核
% 1. 当前overleaf版符合2022研究生学位论文要求,可通过图书馆审核
% 2. 当前版本基于pkuthss v1.9.2
% 3. 请使用UTF-8编码,XeLaTeX方式编译
% 4. 请仔细阅读用户文档
% 5. 修改、使用、发布本文档类请务必遵循LaTeX Project Public License和知识共享4.0
% 6. 如有疑问github/iofu728/pkuthss上提问或联系作者@iofu728
%*********************************************************************

\documentclass[fontset=fandol,ugly]{pkuthss}
\documentclass[fontset=fandol,ugly,language=chinese]{pkuthss}
% 学位论文模式 ugly (默认打开,请保留)
% 盲审模式 blind (默认关闭)
% 字体库 fontset
% 盲审模式 blind (默认关闭)
% 语言 language (默认chinese | english)
% 字体库 fontset
% auto | windows | windows@overleaf | mac | fandol | ubuntu | none
% 除fandol,ubuntu外为商业字体,如需使用请遵循相应版权协议(需要已安装相应的字体)
% fandol与windows效果相近,但字符库偏少,推荐使用(默认);
Expand All @@ -44,63 +45,66 @@
\renewcommand*{\bibfont}{\zihao{5}\linespread{1.27}\selectfont}

\pkuthssinfo{
cthesisname = {硕士学位论文},
thesiscover = {硕士研究生学位论文},
ethesisname = {Master Thesis},
ctitle = {基于XXXX的XXXX系统设计与实现},
etitle = {Design and implementation of a XXXXX system based on XXXX},
cauthor = {扎克·施耐德}, eauthor = {Zack Snyder},
studentid = {180XXXXXXX},
% 具体时间以教务为准,初稿3月,送审4月,答辩5月,最终6月。
date = {\zhdigits{2021}\ \ \ \ \zhnumber{6}\ \ 月},
school = {XXXXXX学院},
cmajor = {XXXX}, emajor = {XXXX},
direction = {XXXX},
mentorlines = {2}, % 导师个数
% 副教授 A.P. 讲师 Lec.
cmentor = {XXX\ \ 教授\\YYY\ \ 教授}, ementor = {Prof.\ XXX and Prof.\ YYY},
ckeywords = {A,B,C,D},
ekeywords = {A,B,C,D},
% 盲审模式参数, 需在documentclass增加blind
blindid = {XXXXXXXXX}, discipline = {XXXX}
cthesisname = {硕士学位论文},
thesiscover = {硕士研究生学位论文},
ethesisname = {Master Thesis},
ctitle = {基于XXXX的XXXX系统设计与实现},
etitle = {Design and implementation of a XXXXX system based on XXXX},
cauthor = {扎克·施耐德}, eauthor = {Zack Snyder},
studentid = {180XXXXXXX},
% 具体时间以教务为准,初稿3月,送审4月,答辩5月,最终6月。
date = {\zhdigits{2022}\ \ \ \ \zhnumber{6}\ \ 月}, % June, 2022
school = {XXXXXX学院},
cmajor = {XXXX}, emajor = {XXXX},
direction = {XXXX},
mentorlines = {2}, % 导师个数
% 副教授 A.P. 讲师 Lec.
cmentor = {XXX\ \ 教授\\YYY\ \ 教授}, ementor = {Prof.\ XXX and Prof.\ YYY},
ckeywords = {A,B,C,D},
ekeywords = {A,B,C,D},
% 盲审模式参数, 需在documentclass增加blind
blindid = {XXXXXXXXX}, discipline = {XXXX}
}
\addbibresource{thesis.bib}


\begin{document}
\frontmatter
\pagestyle{empty}
\maketitle
\cleardoublepage
% 需替换门户版权声明pdf
\include{chap/copy}

\cleardoublepage
\pagestyle{plain}
\setcounter{page}{0}
\pagenumbering{Roman}
\include{chap/abs}
\tableofcontents
% 如有需要使用主要符号对照表
\include{chap/deno}

\mainmatter
\include{chap/chap1}
\include{chap/chap2}
\include{chap/chap3}
\include{chap/chap4}
\include{chap/chap5}
\include{chap/chap6}
\frontmatter
\pagestyle{empty}
\maketitle
\cleardoublepage
% 需替换门户版权声明pdf
\include{chap/copy}

\cleardoublepage
\pagestyle{plain}
\setcounter{page}{0}
\pagenumbering{Roman}
\include{chap/abs}
\tableofcontents
% 如有需要使用表格索引、插图索引
\listoftables
\listoffigures
% 如有需要使用主要符号对照表
\include{chap/deno}

\mainmatter
\include{chap/chap1}
\include{chap/chap2}
\include{chap/chap3}
\include{chap/chap4}
\include{chap/chap5}
\include{chap/chap6}

\appendix
\printbibliography[heading = bibintoc]
% 如有需要使用研究生成果页
\include{chap/ach}

\backmatter
\include{chap/ack}
% 需替换门户原创页pdf/扫描pdf
\include{chap/origin}
\backmatter
\include{chap/ack}
% 需替换门户原创页pdf/扫描pdf
\include{chap/origin}

\end{document}

Expand Down
12 changes: 9 additions & 3 deletions tex/pkuthss-gbk.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
% Copyright (c) 2008-2009 solvethis
% Copyright (c) 2010-2013,2015,2021 Casper Ti. Vector
% Copyright (c) 2021 Kurapica
% Copyright (c) 2021 iofu728
% Copyright (c) 2022 iofu728
%
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3 of this license or (at
Expand All @@ -29,13 +29,19 @@
for the pkuthss document class]

\def\label@ctitle{题目:}
\def\label@etitle{Title: }
\def\label@cauthor{姓\hphantom{汉字}名:}
\def\label@eauthor{Name: }
\def\label@studentid{学\hphantom{汉字}号:}
\def\label@estudentid{Student ID: }
\def\label@school{院\hphantom{汉字}系:}
\def\label@eschool{Affiliation: }
\def\label@cmajor{专\hphantom{汉字}业:}
\def\label@emajor{Major: }
\def\label@direction{研究方向:}
\def\label@edirection{Research Division: }
\def\label@cmentor{导\hphantom{汉字}师:}
\def\label@ementor{Directed by\ }
\def\label@ementor{Directed by: }
\def\label@ckeywords{关键词:}
\def\label@ekeywords{KEY WORDS:\ }
\def\label@blindcover{(匿名评阅论文封面)}
Expand All @@ -49,7 +55,7 @@
\def\cuniversity{北京大学}
\def\euniversity{Peking University}
\def\cthesisname{硕士学位论文}
\def\ethesisname{Doctor Thesis}
\def\ethesisname{Master Thesis}
\def\thesiscover{硕士研究生学位论文}
\def\cabstractname{摘要}
\def\eabstractname{ABSTRACT}
Expand Down
10 changes: 8 additions & 2 deletions tex/pkuthss-utf8.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
% Copyright (c) 2008-2009 solvethis
% Copyright (c) 2010-2013,2015,2021 Casper Ti. Vector
% Copyright (c) 2021 Kurapica
% Copyright (c) 2021 iofu728
% Copyright (c) 2022 iofu728
%
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3 of this license or (at
Expand All @@ -29,13 +29,19 @@
for the pkuthss document class]

\def\label@ctitle{题目:}
\def\label@etitle{Title: }
\def\label@cauthor{姓\hphantom{汉字}名:}
\def\label@eauthor{Name: }
\def\label@studentid{学\hphantom{汉字}号:}
\def\label@estudentid{Student ID: }
\def\label@school{院\hphantom{汉字}系:}
\def\label@eschool{Affiliation: }
\def\label@cmajor{专\hphantom{汉字}业:}
\def\label@emajor{Major: }
\def\label@direction{研究方向:}
\def\label@edirection{Research Division: }
\def\label@cmentor{导\hphantom{汉字}师:}
\def\label@ementor{Directed by\ }
\def\label@ementor{Directed by: }
\def\label@ckeywords{关键词:}
\def\label@ekeywords{KEY WORDS:\ }
\def\label@blindcover{(匿名评阅论文封面)}
Expand Down
Loading

0 comments on commit bb43c49

Please sign in to comment.