├── Makefile ├── README.txt ├── doc ├── example │ ├── Make.bat │ ├── chap │ │ ├── abs.tex │ │ ├── ack.tex │ │ ├── chap1.tex │ │ ├── chap2.tex │ │ ├── chap3.tex │ │ ├── copy.tex │ │ ├── encl1.tex │ │ └── origin.tex │ ├── ctex-fontset-pkuthss.def │ ├── ctexopts.cfg │ ├── latexmkrc │ ├── spine.tex │ ├── thesis.bib │ └── thesis.tex └── readme │ ├── ChangeLog-upto-1.3.txt │ ├── ChangeLog.txt │ ├── chap │ ├── origin.tex │ ├── pkuthss-abs.tex │ ├── pkuthss-ack.tex │ ├── pkuthss-chap1.tex │ ├── pkuthss-chap2.tex │ ├── pkuthss-chap3.tex │ ├── pkuthss-concl.tex │ ├── pkuthss-copy.tex │ ├── pkuthss-encl1.tex │ └── pkuthss-intro.tex │ ├── ctex-fontset-pkuthss.def │ ├── ctexopts.cfg │ ├── latexmkrc │ ├── pkuthss-english.patch │ ├── pkuthss.bib │ └── pkuthss.tex ├── tex ├── Makefile ├── pkulogo.eps ├── pkuthss-gbk.def ├── pkuthss-utf8.def ├── pkuthss.cls ├── pkuthss.def └── pkuword.eps └── utils ├── bump ├── dist └── qa /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011-2014,2019 Casper Ti. Vector 2 | # Public domain. 3 | 4 | TITLE = pkuthss 5 | EXAMPLE = thesis 6 | VERSION = 1.9.4 7 | 8 | default: dist 9 | 10 | qa: 11 | utils/qa 12 | 13 | bump: 14 | utils/bump VERSION=$(VERSION) 15 | 16 | dist clean distclean: 17 | utils/dist TITLE=$(TITLE) EXAMPLE=$(EXAMPLE) VERSION=$(VERSION) $@ 18 | 19 | # vim:ts=4:sw=4 20 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | pkuthss: LaTeX template for dissertations in Peking University 2 | -------------------------------------------------------------- 3 | 4 | Maintainer: Casper Ti. Vector 5 | Homepage: 6 | 7 | Licence: 8 | * New BSD Licence for `copy.tex' and `origin.tex'. 9 | * LaTeX Project Public Licence 1.3 or later for files in `tex/' and 10 | `doc/readme/', except for those mentioned above. 11 | * Public domain for all other files. 12 | 13 | This package provides a simple, clear and flexible LaTeX template for 14 | dissertations in Peking University. 15 | 16 | This file (`README.txt') is *NOT* intended as the documentation for this 17 | package; please see the file `pkuthss.pdf' instead. 18 | 19 | -------------------------------------------------------------------------------- /doc/example/Make.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | @rem Copyright (c) 2008-2009 solvethis 4 | @rem Copyright (c) 2010-2012,2019 Casper Ti. Vector 5 | @rem Public domain. 6 | 7 | if "%1"=="" goto doc 8 | if "%1"=="doc" goto doc 9 | if "%1"=="clean" (goto clean) else (goto usage) 10 | 11 | :doc 12 | latexmk 13 | goto end 14 | 15 | :clean 16 | latexmk -c 17 | goto end 18 | 19 | :usage 20 | echo %0 [doc] [clean] 21 | goto end 22 | 23 | :end 24 | pause 25 | 26 | @rem vim:ts=4:sw=4 27 | -------------------------------------------------------------------------------- /doc/example/chap/abs.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2014,2016,2021 Casper Ti. Vector 2 | % Public domain. 3 | 4 | \begin{cabstract} 5 | \pkuthssffaq % 中文测试文字。 6 | \end{cabstract} 7 | 8 | \ifblind\begin{beabstract}\else\begin{eabstract}\fi 9 | Test of the English abstract. 10 | \ifblind\end{beabstract}\else\end{eabstract}\fi 11 | 12 | % vim:ts=4:sw=4 13 | -------------------------------------------------------------------------------- /doc/example/chap/ack.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2014,2016 Casper Ti. Vector 2 | % Public domain. 3 | 4 | \chapter{致谢} 5 | \pkuthssffaq % 中文测试文字。 6 | 7 | % vim:ts=4:sw=4 8 | -------------------------------------------------------------------------------- /doc/example/chap/chap1.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2014,2016,2018 Casper Ti. Vector 2 | % Public domain. 3 | 4 | \chapter{引言} 5 | \pkuthssffaq % 中文测试文字。 6 | 7 | % vim:ts=4:sw=4 8 | -------------------------------------------------------------------------------- /doc/example/chap/chap2.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2014,2016 Casper Ti. Vector 2 | % Public domain. 3 | 4 | \chapter{章节} 5 | \pkuthssffaq % 中文测试文字。 6 | 7 | % vim:ts=4:sw=4 8 | -------------------------------------------------------------------------------- /doc/example/chap/chap3.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2014,2016,2018 Casper Ti. Vector 2 | % Public domain. 3 | 4 | \chapter{结论和展望} 5 | \pkuthssffaq % 中文测试文字。 6 | 7 | % vim:ts=4:sw=4 8 | -------------------------------------------------------------------------------- /doc/example/chap/copy.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2008-2009 solvethis 2 | % Copyright (c) 2010-2017,2021 Casper Ti. Vector 3 | % All rights reserved. 4 | % 5 | % Redistribution and use in source and binary forms, with or without 6 | % modification, are permitted provided that the following conditions are 7 | % met: 8 | % 9 | % * Redistributions of source code must retain the above copyright notice, 10 | % this list of conditions and the following disclaimer. 11 | % * Redistributions in binary form must reproduce the above copyright 12 | % notice, this list of conditions and the following disclaimer in the 13 | % documentation and/or other materials provided with the distribution. 14 | % * Neither the name of Peking University nor the names of its contributors 15 | % may be used to endorse or promote products derived from this software 16 | % without specific prior written permission. 17 | % 18 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 19 | % IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20 | % THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 | % PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 22 | % CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 | % EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | % PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 | % PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 | % LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | % NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | % SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | % 此处不用 \specialchap,因为学校要求目录不包括其自己及其之前的内容。 31 | \chapter*{版权声明} 32 | % 综合学校的书面要求及 Word 模版来看,版权声明页不用加页眉、页脚。 33 | \thispagestyle{empty} 34 | 35 | 任何收存和保管本论文各种版本的单位和个人, 36 | 未经本论文作者同意,不得将本论文转借他人, 37 | 亦不得随意复制、抄录、拍照或以任何方式传播。 38 | 否则,引起有碍作者著作权之问题,将可能承担法律责任。 39 | 40 | % 若须排版二维码,请将二维码图片重命名为“barcode”, 41 | % 转为合适的图片格式,并放在当前目录下,然后去掉下面 2 行的注释。 42 | %\vfill\noindent 43 | %\includegraphics[height = 5em]{barcode} 44 | 45 | % vim:ts=4:sw=4 46 | -------------------------------------------------------------------------------- /doc/example/chap/encl1.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2014,2016 Casper Ti. Vector 2 | % Public domain. 3 | 4 | \chapter{附件} 5 | \pkuthssffaq % 中文测试文字。 6 | 7 | % vim:ts=4:sw=4 8 | -------------------------------------------------------------------------------- /doc/example/chap/origin.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2008-2009 solvethis 2 | % Copyright (c) 2010-2017,2021 Casper Ti. Vector 3 | % Copyright (c) 2021 Kurapica 4 | % All rights reserved. 5 | % 6 | % Redistribution and use in source and binary forms, with or without 7 | % modification, are permitted provided that the following conditions are 8 | % met: 9 | % 10 | % * Redistributions of source code must retain the above copyright notice, 11 | % this list of conditions and the following disclaimer. 12 | % * Redistributions in binary form must reproduce the above copyright 13 | % notice, this list of conditions and the following disclaimer in the 14 | % documentation and/or other materials provided with the distribution. 15 | % * Neither the name of Peking University nor the names of its contributors 16 | % may be used to endorse or promote products derived from this software 17 | % without specific prior written permission. 18 | % 19 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 20 | % IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 21 | % THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 | % PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 23 | % CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24 | % EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25 | % PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 26 | % PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 27 | % LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 | % NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | % SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | { 32 | \ctexset{section = { 33 | format+ = {\centering}, beforeskip = {40bp}, afterskip = {15bp} 34 | }} 35 | \specialchap{北京大学学位论文原创性声明和使用授权说明} 36 | 37 | % 学校书面要求本页面不要页码,但在给出的 Word 模版中又有页码。 38 | % 此处以学校书面要求为准。 39 | \thispagestyle{empty} 40 | \mbox{}\vspace*{-3em} 41 | \section*{原创性声明} 42 | 43 | 本人郑重声明: 44 | 所呈交的学位论文,是本人在导师的指导下,独立进行研究工作所取得的成果。 45 | 除文中已经注明引用的内容外, 46 | 本论文不含任何其他个人或集体已经发表或撰写过的作品或成果。 47 | 对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。 48 | 本声明的法律结果由本人承担。 49 | \vskip 1em 50 | \rightline{% 51 | 论文作者签名:\hspace{5em}% 52 | 日期:\hspace{2em}年\hspace{2em}月\hspace{2em}日% 53 | } 54 | 55 | \section*{% 56 | 学位论文使用授权说明\\[-0.33em] 57 | \textmd{\zihao{5}(必须装订在提交学校图书馆的印刷本)}% 58 | } 59 | 60 | 本人完全了解北京大学关于收集、保存、使用学位论文的规定,即: 61 | \begin{itemize} 62 | \item 按照学校要求提交学位论文的印刷本和电子版本; 63 | \item 学校有权保存学位论文的印刷本和电子版, 64 | 并提供目录检索与阅览服务,在校园网上提供服务; 65 | \item 学校可以采用影印、缩印、数字化或其它复制手段保存论文; 66 | \item 因某种特殊原因须要延迟发布学位论文电子版, 67 | 授权学校 $\Box$\nobreakspace{}一年 / 68 | $\Box$\nobreakspace{}两年 / 69 | $\Box$\nobreakspace{}三年以后,在校园网上全文发布。 70 | \end{itemize} 71 | \centerline{(保密论文在解密后遵守此规定)} 72 | \vskip 1em 73 | \rightline{% 74 | 论文作者签名:\hspace{5em}导师签名:\hspace{5em}% 75 | 日期:\hspace{2em}年\hspace{2em}月\hspace{2em}日% 76 | } 77 | 78 | % 若须排版二维码,请将二维码图片重命名为“barcode”, 79 | % 转为合适的图片格式,并放在当前目录下,然后去掉下面 2 行的注释。 80 | %\vfill\noindent 81 | %\includegraphics[height = 5em]{barcode} 82 | } 83 | 84 | % vim:ts=4:sw=4 85 | -------------------------------------------------------------------------------- /doc/example/ctex-fontset-pkuthss.def: -------------------------------------------------------------------------------- 1 | \ProvidesExplFile{\ExplFileName}{}{}{} 2 | 3 | \sys_if_engine_pdftex:TF 4 | { 5 | \ctex_zhmap_case:nnn 6 | { 7 | \ctex_punct_set:n { windows } 8 | \setCJKmainfont 9 | [ BoldFont = simhei.ttf , ItalicFont = simkai.ttf ] { simsun.ttc } 10 | \setCJKsansfont { simhei.ttf } 11 | \setCJKmonofont { simfang.ttf } 12 | \setCJKfamilyfont { zhkai } { simkai.ttf } 13 | \setCJKfamilyfont { zhfs } { simfang.ttf } 14 | \setCJKfamilyfont { zhsong } { simsun.ttc } 15 | \setCJKfamilyfont { zhhei } { simhei.ttf } 16 | %\setCJKfamilyfont { zhli } { simli.ttf } 17 | %\setCJKfamilyfont { zhyou } { simyou.ttf } 18 | \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } 19 | \ctex_punct_map_family:nn { \CJKsfdefault } { zhhei } 20 | \ctex_punct_map_family:nn { \CJKttdefault } { zhfs } 21 | \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } 22 | \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei } 23 | } 24 | { 25 | \ctex_load_zhmap:nnnn { rm } { zhhei } { zhfs } { windows } 26 | \ctex_punct_set:n { windows } 27 | \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } 28 | \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei } 29 | \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } 30 | } 31 | { 32 | \tl_set:Nn \CJKrmdefault { rm } 33 | \tl_set:Nn \CJKsfdefault { sf } 34 | \tl_set:Nn \CJKttdefault { tt } 35 | } 36 | } 37 | { 38 | \setCJKmainfont 39 | [ BoldFont = SimHei , ItalicFont = KaiTi ] { SimSun } 40 | \setCJKsansfont { SimHei } 41 | \setCJKmonofont { FangSong } 42 | \setCJKfamilyfont { zhsong } { SimSun } 43 | \setCJKfamilyfont { zhhei } { SimHei } 44 | \setCJKfamilyfont { zhkai } { KaiTi } 45 | \setCJKfamilyfont { zhfs } { FangSong } 46 | %\setCJKfamilyfont { zhli } { LiSu } 47 | %\setCJKfamilyfont { zhyou } { YouYuan } 48 | } 49 | 50 | \NewDocumentCommand \songti { } { \CJKfamily { zhsong } } 51 | \NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } 52 | \NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } 53 | \NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } 54 | %\NewDocumentCommand \lishu { } { \CJKfamily { zhli } } 55 | %\NewDocumentCommand \youyuan { } { \CJKfamily { zhyou } } 56 | 57 | \endinput 58 | % vim:ft=tex:ts=2:sw=2:et 59 | -------------------------------------------------------------------------------- /doc/example/ctexopts.cfg: -------------------------------------------------------------------------------- 1 | \ProvidesExplFile{\ExplFileName}{}{}{} 2 | \keys_set:nn { ctex / option } { fontset = pkuthss } 3 | \endinput 4 | % vim:ft=tex 5 | -------------------------------------------------------------------------------- /doc/example/latexmkrc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019 Casper Ti. Vector 2 | # Public domain. 3 | 4 | @default_files = ('thesis'); 5 | # 5:xelatex;3:latex(+ dvipdfmx);1:pdflatex。 6 | $pdf_mode = 5; 7 | # 用 latex 模式编译时,使用 dvipdfmx 而非默认的 dvipdf。 8 | $dvipdf = "dvipdfmx %O -o %D %S"; 9 | # 此选项相关说明见 texdoc latexmk。 10 | $bibtex_use = 1.5; 11 | $biber = "biber -l zh__pinyin --output-safechars %O %S"; 12 | # latexmk -c 时自动删除 .run.xml 文件。 13 | $clean_ext = "run.xml"; 14 | 15 | -------------------------------------------------------------------------------- /doc/example/spine.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2018-2019,2022 Casper Ti. Vector 2 | % Public domain. 3 | 4 | \documentclass[UTF8, zihao = -4]{ctexart} 5 | \usepackage{calc, geometry, graphicx} 6 | % 如须用 xelatex 编译,请参考 pkuthss.cls 修改字体设置。 7 | \usepackage{textcomp, mathptmx} 8 | \usepackage[scaled = 0.95]{helvet} 9 | \pagestyle{empty} 10 | \newlength{\colpad} 11 | \newcommand{\colwidth}{0.99\ccwd} 12 | 13 | % 设定论文纸尺寸。 14 | \geometry{paperwidth = 460mm, paperheight = 297mm, margin = 0cm} 15 | % 设定页面宽度、背面 logo 直径和书脊上下边界宽度。 16 | \newcommand{\miniwidth}{210mm} 17 | \newcommand{\logowidth}{64mm} 18 | \newcommand{\vertmargin}{\fill} 19 | % 减号前的值为论文厚度。 20 | \setlength{\colpad}{(10mm - \colwidth) / 2} 21 | 22 | \begin{document} 23 | \centering 24 | \begin{minipage}[b][\textheight][b]{\miniwidth} 25 | \vspace*{\fill}\par 26 | \centerline{\includegraphics[width = \logowidth]{pkulogo}}\par 27 | \vspace*{\fill}\par 28 | \end{minipage} 29 | \hspace{\colpad} 30 | \begin{minipage}[b][\textheight][b]{\colwidth} 31 | \bfseries\linespread{1}\selectfont 32 | \vspace*{\vertmargin}\par 33 | % 标题、年份和学号。 34 | 测试文档\par\vfill 35 | \rotatebox{-90}{2018}\par\vfill\rotatebox{-90}{0123456789}\par 36 | \vspace*{\vertmargin}\par 37 | \end{minipage} 38 | \hspace{\colpad} 39 | \begin{minipage}[b][\textheight][b]{\miniwidth} 40 | % thesis.pdf 应事先编译好,此处会自动提取其首页。 41 | % 因为要插入 pdf 图片,本文档应用 pdflatex 编译。 42 | \includegraphics[height = \textheight, page = 1]{thesis} 43 | \end{minipage} 44 | \end{document} 45 | 46 | % vim:ts=4:sw=4 47 | -------------------------------------------------------------------------------- /doc/example/thesis.bib: -------------------------------------------------------------------------------- 1 | @article{test-en, 2 | author = {Author}, 3 | title = {Title}, 4 | type = {J}, 5 | journal = {Journal}, 6 | date = {2014-04-01}, 7 | language = {english}, 8 | } 9 | 10 | @article{test-zh, 11 | author = {作者}, 12 | title = {标题}, 13 | type = {J}, 14 | journal = {期刊}, 15 | date = {2014-04-01}, 16 | language = {chinese}, 17 | } 18 | 19 | % vim:ts=4:sw=4 20 | -------------------------------------------------------------------------------- /doc/example/thesis.tex: -------------------------------------------------------------------------------- 1 | % Copyright (c) 2008-2009 solvethis 2 | % Copyright (c) 2010-2016,2018-2019,2021-2022,2024 Casper Ti. Vector 3 | % Copyright (c) 2021 Kurapica 4 | % Public domain. 5 | % 6 | % 使用前请先仔细阅读 pkuthss 和 biblatex-caspervector 的文档, 7 | % 特别是其中的 FAQ 部分和用红色强调的部分。 8 | % 两者可在终端/命令提示符中用 9 | % texdoc pkuthss 10 | % texdoc biblatex-caspervector 11 | % 调出。 12 | 13 | % 如果格式审查提示字号不严格符合标准,可以在 [] 中加入“ugly”选项。 14 | \documentclass[UTF8]{pkuthss} 15 | % 如果的确须要使脚注按页编号的话,可以去掉后面 footmisc 包的注释。 16 | %\usepackage[perpage]{footmisc} 17 | 18 | % 使用 biblatex 排版参考文献,并规定其格式(详见 biblatex-caspervector 的文档)。 19 | % 这里按照西文文献在前,中文文献在后排序(“sorting = ecnyt”); 20 | % 若须按照中文文献在前,西文文献在后排序,请设置“sorting = cenyt”; 21 | % 若须按照引用顺序排序,请设置“sorting = none”。 22 | % 若须在排序中实现更复杂的需求,请参考 biblatex-caspervector 的文档。 23 | % biblatex-caspervector 也有一个“ugly”选项,使其更像国标格式;此外也可考虑 24 | % 改用 style = gb7714-2015 并去掉之后两选项,详见 biblatex-gb7714-2015 的文档。 25 | \usepackage[backend = biber, style = caspervector, utf8, sorting = ecnyt]{biblatex} 26 | 27 | % 对于 linespread 值的计算过程有兴趣的同学可以参考 pkuthss.cls。 28 | \renewcommand*{\bibfont}{\zihao{5}\linespread{1.27}\selectfont} 29 | % 按学校要求设定参考文献列表的段间距。 30 | \setlength{\bibitemsep}{3bp} 31 | 32 | % 如是双盲版论文,将 \blindfalse 改为 \blindtrue。后面可用 33 | % \ifblind 根据是否双盲来条件地启用代码(参见本文件后面部分)。 34 | \newif\ifblind\blindfalse 35 | % 设定文档的基本信息。 36 | \pkuthssinfo{ 37 | cthesisname = {博士学位论文}, ethesisname = {Doctor Thesis}, 38 | thesiscover = {博士研究生学位论文}, 39 | % 长标题可用 \thssnl 强制换行,不能用“\\”(双盲版会出错)。 40 | ctitle = {测试文档}, 41 | etitle = {Test Document}, 42 | cauthor = {某某}, eauthor = {Test}, date = {某年某月}, 43 | studentid = {0123456789}, school = {某某学院}, 44 | cmajor = {某某专业}, emajor = {Some Major}, 45 | direction = {某某方向}, mentorlines = {2}, 46 | cmentor = {某甲教授\\某乙教授}, 47 | ementor = {Prof.\ Somebody and Prof.\ Someone}, 48 | ckeywords = {其一,其二}, 49 | ekeywords = {First, Second}, 50 | % 1:学术学位,2:专业学位,0:不显示学位类型。 51 | degreetype = {1}, 52 | % 以下两项无双盲评审需求的用户可保持原状。 53 | % 注意 discipline/major 分别指一/二级学科。 54 | blindid = {9876543210}, discipline = {某某学科} 55 | } 56 | % 载入参考文献数据库(注意不要省略“.bib”)。 57 | \addbibresource{thesis.bib} 58 | 59 | % 普通用户可删除此段,并相应地删除 chap/*.tex 中的 60 | % “\pkuthssffaq % 中文测试文字。”一行。 61 | \usepackage{color} 62 | \def\pkuthssffaq{% 63 | \emph{\textcolor{red}{pkuthss 文档模版最常见问题:}} 64 | 65 | \texttt{\string\cite}、\texttt{\string\parencite} % 66 | 和 \texttt{\string\supercite} 三个命令分别产生% 67 | 未格式化的、带方括号的和上标且带方括号的引用标记:% 68 | \cite{test-en},\parencite{test-zh}、\supercite{test-en, test-zh}。 69 | 70 | 若格式审查时提示字号或其它格式细节问题,请启用 pkuthss 的 \texttt{ugly} 71 | 选项,同时可以考虑启用 biblatex-caspervector 的 \texttt{ugly} 选项 72 | 或者换用 biblatex-gb7714-2015,详见 \texttt{thesis.tex} 中相关注释。 73 | 74 | 生成的 PDF 文件中标记链接的彩色框不会出现在打印版论文中。 75 | 如仍须去掉,可在 \texttt{thesis.tex} 导言区加入 76 | \texttt{\string\hypersetup\string{hidelinks\string}}。 77 | 78 | 若要避免章末空白页,请在调用 pkuthss 文档类时加入 \texttt{openany} 选项。 79 | 80 | 如果编译时不出参考文献, 81 | 请参考 \texttt{texdoc pkuthss}“问题及其解决”一章 82 | “上游宏包可能引起的问题”一节中关于 biber 的说明。 83 | 84 | 因无法假定用户使用哪种方式排版表格,用户须自行保证表格字号符合学校规定。% 85 | } 86 | 87 | \begin{document} 88 | % 以下为正文之前的部分,默认不进行章节编号。 89 | \frontmatter 90 | % 此后到下一 \pagestyle 命令之前不排版页眉或页脚。 91 | \pagestyle{empty} 92 | % 自动生成封面。 93 | \ifblind\makeblind\else\maketitle\fi 94 | % 版权声明。封面要求单面打印,故须新开右页。 95 | \cleardoublepage 96 | \include{chap/copy} 97 | 98 | % 此后到下一 \pagestyle 命令之前正常排版页眉和页脚。 99 | \cleardoublepage 100 | \pagestyle{plain} 101 | % 重置页码计数器,用大写罗马数字排版此部分页码。 102 | \setcounter{page}{0} 103 | \pagenumbering{Roman} 104 | % 中西文摘要。 105 | \include{chap/abs} 106 | % 自动生成目录。 107 | \tableofcontents 108 | 109 | % 以下为正文部分,默认要进行章节编号。 110 | \mainmatter 111 | % 各章节。 112 | \include{chap/chap1} 113 | \include{chap/chap2} 114 | \include{chap/chap3} 115 | 116 | % 正文中的附录部分。 117 | \appendix 118 | % 排版参考文献列表。bibintoc 选项使“参考文献”出现在目录中; 119 | % 如果同时要使参考文献列表参与章节编号,可将“bibintoc”改为“bibnumbered”。 120 | \printbibliography[heading = bibintoc, title = {参考文献}] 121 | % 各附录。 122 | \include{chap/encl1} 123 | 124 | % 以下为正文之后的部分,默认不进行章节编号。 125 | \backmatter 126 | % 致谢。 127 | \ifblind\else\include{chap/ack}\fi 128 | % 原创性声明和使用授权说明。 129 | \include{chap/origin} 130 | \end{document} 131 | 132 | % vim:ts=4:sw=4 133 | -------------------------------------------------------------------------------- /doc/readme/ChangeLog-upto-1.3.txt: -------------------------------------------------------------------------------- 1 | 2011/12/21,ver 1.3(包括前面所有 alpha、beta 和 rc 版本): 2 | --- 进一步重构, 3 | 将核心设置集中于 pkuthss 文档类中, 4 | 常见的额外设置集中于 pkuthss-extra 宏包中。 5 | --- 统一宏的命名规则。 6 | --- 支持使用 key=val 语法进行文档信息的设置,使文档结构更加清晰。 7 | --- 设定 pdf 元数据时使用英文的文档信息,绕过字符编码的问题。 8 | --- 在文档中加入一份代码的 listing, 9 | 以尽量避免不断有人抱怨的文档类代码“乱码”的问题。 10 | --- 去掉了 FAQ 部分, 11 | 因为其中内容或是比较陈旧,或是已经在前面提到。 12 | --- 重新选择 license,尽量减少对用户不必要的约束。 13 | 14 | 2010/11/30,ver 1.2(包括前面所有 beta 版本): 15 | --- 支持 UTF-8 和 GBK 编码。 16 | 支持 XeLaTeX(但不可和 GBK 同用)。 17 | --- 较大规模重构: 18 | 定义了一些新命令以实现一些重复的代码的功能, 19 | 删除了冗余代码和一些用处不大的旧命令,调整了目录结构。 20 | --- 将部分重复代码统一, 21 | 并把一些将来可能引起不兼容的命令以标准 LaTeX 命令代替。 22 | --- 考虑到现在的 ctex 宏包已经对中文排版的格式做出了较好的设定, 23 | 并且已经较好地支持了 hyperref, 24 | 删除了类文件中规定排版格式的部分代码, 25 | 且去除了对 ifpdf 宏包的直接依赖。 26 | --- 统一各处的长度单位,均使用 pt 或 em,以免引起困惑。 27 | --- 从美的角度调整了部分排版格式, 28 | 特别是去掉了所有用 poor man's bold 实现的“粗宋体”。 29 | 30 | 2008/03/13,ver 1.1: 31 | --- 更正了“geometry”,将纸张大小设为“a4paper”。 32 | --- 更新了 chaps/mydefs.tex,将“colorlinks”设为“false”, 33 | 因为带颜色的链接在黑白打印机上打出来往往颜色很浅。 34 | --- 更正了 chaps/sample.bib,将“SOURCE”改为“URL”。 35 | 这样 BibTeX 虽然又会 Warning,不过这样概念上更正确, 36 | 而且结果还不错。 37 | --- 删除了 pkuthss.cls 和 pkuthss.def 的部分内容, 38 | 因为最后的两个声明都不必装订到论文中。 39 | 40 | 2007/12/12,ver 1.0 rc4: 41 | --- 将“\bibstyle”设为“chinesebst”。 42 | 43 | 2007/09/05,ver 1.0 rc3: 44 | --- 封面页作了小的调整,当标题只有一行时也不会产生 Warning。 45 | 现在的实现方法使用的是标准的 LaTeX box。 46 | --- 加入了“graphicx”的版本要求。 47 | 48 | 2007/09/04,ver 1.0 rc2: 49 | --- 在 preamble 部分现在可使用中文。 50 | --- 更正了版心尺寸,即在“geometry”的选项中加入“includeheadfoot”。 51 | --- 改进了 pkulogo.ps ,并提供了 img/Makefile。 52 | 53 | 2007/09/02,ver 1.0 rc1: 54 | --- 由于“\ifx\pdfoutput\undefined”在 teTeX-3.0 中不起作用, 55 | 改为使用“ifpdf”宏包。 56 | --- sample.tex and chaps/1.tex changed accordingly。 57 | --- Linux/Unix 的默认编译方式改为使用 pdflatex,见 Makefile。 58 | --- 消除了运行 BibTeX 时出现的一个 Warning。 59 | 60 | 2007/09/01,ver 1.0 beta: 61 | --- 最初的尝试。 62 | 63 | # vim:ts=4:sw=4 64 | -------------------------------------------------------------------------------- /doc/readme/ChangeLog.txt: -------------------------------------------------------------------------------- 1 | 2024-03-07, v1.9.4 2 | 3 | * API changes: 4 | - Display the degree type on the cover page. 5 | 6 | * Changes to example template: 7 | - thesis.tex: also set bibliography title with eg. gb7714. 8 | 9 | * Misc: 10 | - Minor fixes and cosmetics. 11 | 12 | 2022-10-30, v1.9.3 13 | 14 | * Changes to package code: 15 | - Get rid of newtx completely (thank @CastleStar14654). 16 | - pkuthss.cls: fix scrextend, better footnotes (thank @CastleStar14654). 17 | 18 | * Misc: 19 | - Minor fixes and cosmetics. 20 | 21 | 2022-05-04, v1.9.2 22 | 23 | * Changes to package code: 24 | - Support pkufont via unicode-math instead of newtx when using xelatex. 25 | 26 | 2021-10-16, v1.9.1 27 | 28 | * API changes: 29 | - Support `mentorlines' like casthss. 30 | 31 | * Changes to example template: 32 | - thesis.tex: more obvious hints on `ugly', new note on `hidelinks'. 33 | - copy.tex, origin.tex: minor update according to school requirements. 34 | 35 | * Changes to package code: 36 | - Merge common parts from pkuthss-*.def into pkuthss.def. 37 | - Also "uglify" the keywords label. 38 | 39 | * Misc: 40 | - ChangeLog.txt: typo (thank @fjn308). 41 | - Minor fixes and cosmetics. 42 | 43 | 2021-03-29, v1.9.0 44 | 45 | * API changes: 46 | - Add support for double-blind review (thank @Kurapikov). 47 | - Add `\thesiscover' for possibly different thesis name on the cover. 48 | 49 | * Changes to package code: 50 | - Greatly improve format compliance (thank @Kurapikov). 51 | 52 | * Changes to documentation: 53 | - More notes about table font and GB/T 7714. 54 | - Avoid undefined `\textepsilon'. 55 | 56 | * Misc: 57 | - Minor fixes and cosmetics. 58 | 59 | 2020-11-02, v1.8.3 60 | 61 | * Changes to example template: 62 | - ctex-fontset-pkuthss.def: update `\ctex_load_zhmap' usage. 63 | - Remove Makefile. 64 | 65 | * Changes to package code: 66 | - pkuthss.cls: do not let ulem mess with `\emph'. 67 | - pkuthss.cls: make `ugly' title page more compliant. 68 | 69 | * Changes to documentation: 70 | - pkuthss-chap[12].tex: `须'/`需' typo. 71 | - Remove space around `\zhdigits' in date. 72 | - Add pkuthss.bib to copyright lines. 73 | 74 | * Misc: 75 | - Minor fixes and cosmetics. 76 | 77 | 2019-11-17, v1.8.2 78 | 79 | * Misc: 80 | - CTAN now also wants README in the TDS archive. 81 | - `README' -> `README.txt' do avoid collision with the `readme' directory. 82 | - Fix ignored `\docversion' update. 83 | 84 | 2019-11-15, v1.8.1 85 | 86 | * Changes to example template: 87 | - Migrate to latexmk (also for packaging). 88 | - ctex-fontset-pkuthss.def: `[ simkai.ttf ]' etc is no longer supported. 89 | - spine.tex: fix garbled characters and hbox warnings with pdflatex. 90 | 91 | * Changes to package code: 92 | - pkuthss.cls: work around the `\lvert already defined' error. 93 | - pkuthss.cls: fix section title spacing below the page header. 94 | - pkuthss.cls: adjust titlepage spacing. 95 | 96 | * Changes to documentation: 97 | - Synchronise with the current code. 98 | - Use \mbox around \supercite by default. 99 | - Improve verbatims. 100 | 101 | * Misc: 102 | - Completion of some previous commits. 103 | - Migrate to Gitea, "for obvious reasons". 104 | - Minor fixes and cosmetics. 105 | 106 | 2018-07-02, v1.8.0 107 | 108 | * Changes to example template: 109 | - Add the spine template. 110 | 111 | * Changes to package code: 112 | - Fix footnote format, in multiple aspects. 113 | - pkuthss.cls: fix header/footer spacing. 114 | - pkuthss.cls: fix displaymath spacing. 115 | - pkuthss.cls: adjust list margins. 116 | - pkuthss.cls: make chapter pages more tolerant of vertical spacing. 117 | 118 | * Changes to documentation: 119 | - pkuthss.bib: use the `edition' field now supported by blx-caspervector. 120 | - doc: fix "需"/"须" typo. 121 | 122 | * Misc: 123 | - qa: automate the `需'/`须' check, and do not check whitespaces in patches. 124 | - Minor fixes and cosmetics. 125 | 126 | 2018-06-12, v1.7.6 127 | 128 | * Changes to example template: 129 | - nty -> nyt sorting following biblatex-caspervector upstream. 130 | - doc: shorten chapter filenames. 131 | - Assign numbers to `intro' and `concl' by default. 132 | - Makefile: `JOBNAME' -> `JOB', saving some typing. 133 | - Fix Makefile portability. 134 | - doc: "英文" -> "西文". 135 | 136 | * Changes to package code: 137 | - pkuthss.cls: fix spacing between chapter mark/name. 138 | - pkuthss.cls: fix toc depth and format. 139 | - pkuthss.cls: simplify page style setup. 140 | - `pkuthss@...' -> `thss@...' 141 | 142 | * Misc: 143 | - Minor fixes and cosmetics. 144 | 145 | 2018-05-12, v1.7.5 146 | 147 | * Changes to example template: 148 | - doc: Fix missing accented characters with xelatex. 149 | - Remove ctex-xecjk-winfonts.def for ctex < v2.x. 150 | - Make.bat: support xelatex now that we no longer provide the GBK example. 151 | - thesis.tex: fix FAQ subsection reference (thank @peiyangium). 152 | 153 | * Changes to package code: 154 | - pkuthss.cls: fix subsubsection captions. 155 | - pkuthss.cls: remove kludge for tocloft with ctex < v2.x. 156 | 157 | * Changes to documentation: 158 | - Add patch file for English dissertations. 159 | 160 | * Misc: 161 | - (A lot?) more HTTPS. 162 | - Minor fixes and cosmetics. 163 | 164 | 2017-03-01, v1.7.4 165 | 166 | * API changes: 167 | - pkuthss.cls: provide undocumented option for uglification. 168 | 169 | * Changes to example template: 170 | - ctex-fontset-pkuthss.def: follow LaTeX3 change. 171 | - copyright.tex: fix now inaccurate comment. 172 | 173 | * Changes to package code: 174 | - Remove support for ctex < v2.x. 175 | - Replace CJKfntef's `\CJKunderline' with ulem's `\uline'. 176 | - pkuthss.cls: tweak newtxmath setup. 177 | 178 | * Misc: 179 | - Minor fixes and cosmetics. 180 | 181 | 2016-05-24, v1.7.3 182 | 183 | * Changes to package code: 184 | - Replace subfig with subcaption. 185 | - pkuthss.cls: fix `PDF destination not defined' regression. 186 | - pkuthss.cls: add code in case the font size infractions get caught. 187 | 188 | * Changes to documentation: 189 | - pkuthss-chap2.tex: add hint about copying internal files before changes. 190 | - Sanitise the README bibliography. 191 | 192 | * Misc: 193 | - Minor fixes and cosmetics. 194 | 195 | 2016-03-22, v1.7.2 196 | 197 | * Changes to documentation: 198 | - pkuthss-chap1.tex: note biblatex-caspervector's dependence on biber. 199 | 200 | * Misc: 201 | - Fix missing bib due to inconsistency on author's computer. 202 | - Minor fixes and cosmetics. 203 | 204 | 2016-03-17, v1.7.1 205 | 206 | * Changes to example template: 207 | - Fix TOC and heading of copyright / originauth pages. 208 | - Also remind user to remove `\pkuthssffaq' from chap/. 209 | 210 | * Changes to package code: 211 | - pkuthss.cls: load ifpdf and ifxetex by ourselves (thank @LeoLiu). 212 | 213 | * Changes to documentation: 214 | - pkuthss.tex: follow biblatex-caspervector change about name sorting. 215 | - Update hint about split sorting. 216 | 217 | * Misc: 218 | - Minor fixes and cosmetics. 219 | 220 | 2015-12-16, v1.7.0 221 | 222 | * API changes: 223 | - pkuthss-extra.sty merged into pkuthss.cls; `extra' removed accordingly. 224 | - `footfmt' renamed to `pkufoot'; `colorlinks' removed. 225 | 226 | * Changes to example template: 227 | - {,pkuthss-}copyright.tex: use `\specialchap'. 228 | 229 | * Changes to package code: 230 | - pkuthss.cls: fix pdf bookmark level. 231 | 232 | * Changes to documentation: 233 | - Format overhaul of documentation code. 234 | 235 | * Misc: 236 | - Minor fixes and cosmetics. 237 | 238 | 2015-12-15, v1.6.4 239 | 240 | * API changes: 241 | - New package option: `pkufont'. 242 | 243 | * Changes to example template: 244 | - Loading of newtx packages moved into package code. 245 | - originauth.tex: `\square' -> `\Box'. 246 | - ctex-fontset-pkuthss.def: comment out li/you to avoid surprises. 247 | 248 | * Changes to package code: 249 | - Fix maths fonts with newtx when using XeLaTeX, thanks to @LeoLiu. 250 | - pkuthss.cls: work around non-hyperlinked citations. 251 | - `\pkuthssextra@int@boolopt' -> `\pkuthss@int@boolopt'. 252 | - pkuthss.cls: remove unnecessary `\AtEndofClass'. 253 | 254 | * Changes to documentation: 255 | - pkuthss.bib: pku-thesisstyle updated to v2.0, no substantial changes. 256 | - pkuthss-acknowledge.tex: some "lyric" text. 257 | 258 | * Misc: 259 | - Homepage moved to GitLab. 260 | - Minor fixes and cosmetics. 261 | 262 | 2015-06-30, v1.6.3 263 | 264 | * Changes to documentation: 265 | - Disambiguate file names wrt CTAN recommendation. 266 | - pkuthss-chap2.tex: fix some minor details. 267 | 268 | * Misc: 269 | - dist: reduce duplication in zipballs according to CTAN recommendation. 270 | 271 | 2015-05-30, v1.6.2 272 | 273 | * Changes to example template: 274 | - Template in GBK no longer provided because of UTF-8 popularisation. 275 | - Add font configuration files. 276 | - Previously overlooked format update about `copyright' and `originauth'. 277 | - Make.bat: add `pause' to ease debugging; `clear' -> `clean'. 278 | 279 | * Changes to package code: 280 | - pkuthss.cls: refine `beforeskip' for `\chapter'. 281 | 282 | * Changes to documentation: 283 | - Makefile: default to the latex/biber/xelatex/xelatex procedure. 284 | - acknowledge.tex: Casper was here. 285 | 286 | * Misc: 287 | - Adapt to ctex 2.x. 288 | - Somehow alleviate the sorting issue with biblatex 3.0. 289 | - Minor fixes and cosmetics. 290 | 291 | 2015-05-16, v1.6.1 292 | 293 | * Changes to example template: 294 | - Fix support for `openany'. 295 | - Use more lightweight `latexsym' instead of `amssymb' for `\Box'. 296 | 297 | * Changes to package code: 298 | - Fix support for `openany'. 299 | 300 | * Changes to documentation: 301 | - Add note (and rant) about required format of bibliographies. 302 | 303 | * Misc: 304 | - Remove bibtex support because of upstream changes. 305 | - Minor fixes and cosmetics. 306 | 307 | 2015-04-28, v1.6.0 308 | 309 | * API changes: 310 | - New package option: `footfmt' and `pkuspace'. 311 | - `tightlist' option merged into `spacing'; `caption' option removed. 312 | 313 | * Changes to example template: 314 | - Some changes regarding updates in school regulation. 315 | - thesis.tex: add color package for `\pkuthssffaq' with noncolorlinks. 316 | - chap/: again try to make enca(1) happy. 317 | 318 | * Changes to package code: 319 | - Major changes regarding updates in school regulation. 320 | 321 | * Changes to documentation: 322 | - Reorganise section tree. 323 | 324 | * Misc: 325 | - Update URL of project homepage. 326 | - Fixes to packaging scripts regarding CTAN requirements. 327 | - Minor fixes and aesthetic improvements. 328 | 329 | 2014-07-07, v1.5.5 330 | 331 | * Changes to example template: 332 | - Use the most frequently asked questions as the sample text. 333 | - Revert the black TOC, considering the new sample text. 334 | 335 | * Changes to package code: 336 | - pkuthss.cls: use `\PassOptionsToPackage' for *packages*. 337 | - pkuthss-extra.sty: `hidelinks' does not hold a value. 338 | 339 | * Changes to documentation: 340 | - Update info on `colorlinks'. 341 | 342 | * Misc: 343 | - Minor improvements. 344 | 345 | 2014-07-04, v1.5.4 346 | 347 | * Changes to example template: 348 | - Make TOC black, as stupidly required by PKU Library. 349 | 350 | * Changes to documentation: 351 | - Re-sort and re-organise common problems. 352 | 353 | * Misc: 354 | - Minor fixes and improvements. 355 | 356 | 2014-05-23, v1.5.3 357 | 358 | * Changes to example template: 359 | - No longer require gbk2uni. 360 | - Exemplify `\cite', `\parencite' and `\supercite'. 361 | 362 | * Changes to package code: 363 | - Use `\newcommand*'/`\renewcommand*' when appropriate. 364 | - Fix bookmarks in pdflatex/gbk compilation by introducing xCJK2uni. 365 | 366 | * Changes to documentation: 367 | - No longer recommend the CTeX Suite. 368 | - Remove installation hints (already included in TeX Live). 369 | - Discourage bibtex usage with UTF-8. 370 | - hologo is back, and now we have proper XeLaTeX logo. 371 | 372 | * Misc: 373 | - Minor fixes and improvements. 374 | 375 | 2014-04-17, v1.5.2 376 | 377 | * Changes to example template: 378 | - Barcode moved to current dir instead of (removed) img/. 379 | 380 | * Misc: 381 | - dist: fix zipball permissions. 382 | - README: previously forgotten updates. 383 | - Minor improvements. 384 | 385 | 2014-04-16, v1.5.1 386 | 387 | * API changes: 388 | - pkulogo and pkuword are moved into tex/ and relicensed to LPPL. 389 | 390 | * Changes to package code: 391 | - Improve eps-to-pdf related script. 392 | 393 | * Changes to documentation: 394 | - Remove now legacy package code listings. 395 | 396 | * Misc: 397 | - qa: fix whitespace check. 398 | - Minor improvements. 399 | 400 | 2014-04-11, v1.5.0 401 | 402 | * Changes to example template: 403 | - Just split from documentation. 404 | - Now also offer pdf for the example template. 405 | 406 | * Changes to documentation: 407 | - Relicense to LPPL v1.3+ (not including the example template). 408 | 409 | * Misc: 410 | - Switch to the x.y.z version scheme, thus no longer use alpha/beta/rc. 411 | - Utility Makefiles easier to reason about. 412 | - Minor improvements. 413 | 414 | 2014-04-11, v1.4 415 | 416 | * Changes to package code: 417 | - pkuthss.cls: do not disable `\uppercase' in `nouppermark' mode. 418 | 419 | * Changes to documentation: 420 | - Remove support for CRLF (except for Windows .bat's), as required by CTAN. 421 | 422 | * Misc: 423 | - Minor fixes and improvements. 424 | 425 | 2013-12-26, v1.4 rc4 426 | 427 | * API changes: 428 | - Add `caption' option to customise caption fonts. 429 | - Remove `\label@cmentorb'; `\label@cmentora' -> `\label@cmentor'. 430 | - Move `[no]uppermark' to pkuthss.cls. 431 | 432 | * Changes to package code: 433 | - Consider `oneside' in page style. 434 | 435 | * Changes to documentation: 436 | - Add support for 2-dimensional bar code. 437 | - Add and refine lots of hints. 438 | 439 | * Misc: 440 | - Minor fixes and improvements. 441 | 442 | 2013-04-07, v1.4 rc3 443 | 444 | * Misc: 445 | - Update copyright notices. 446 | - Minor fixes and improvements. 447 | 448 | 2013-03-30, v1.4 rc2 449 | 450 | * Changes to package code: 451 | - Use the internal hyperref support in ctex 1.02c+. 452 | - Remove usage of etoolbox. 453 | 454 | * Changes to documentation: 455 | - Add hint for split sorting with biblatex. 456 | 457 | * Misc: 458 | - Minor improvements. 459 | 460 | 2013-01-10, v1.4 rc1 461 | 462 | * Changes to documentation: 463 | - Remove troublesome `hologo' package. 464 | - chap3.tex: add notice about biblatex's `\bibname' issue. 465 | - introduction.tex: update info about location of example source code. 466 | 467 | * Misc: 468 | - README: add not-intended-as-documentation notice. 469 | 470 | 2012-11-12, v1.4 beta3 471 | 472 | * Misc: 473 | - Fix incorrect CTAN support. 474 | - utils/dist: Fix date conversion code again. 475 | 476 | 2012-10-11, v1.4 beta2 477 | 478 | * Changes to package code: 479 | - Adjust pkulogo/pkuword typesetting according to 480 | 481 | 482 | * Changes to documentation: 483 | - Add (more) useful notices and hints. 484 | - Bibliography sanitation. 485 | 486 | * Misc: 487 | - Add CTAN support. 488 | - utils/bump: Improve date conversion code. 489 | 490 | 2012-05-31, v1.4 beta1 491 | 492 | * Changes to documentation: 493 | - Use `biber -l zh__pinyin'. 494 | - Add notice for biber in the "compilation" section. 495 | - Recommend users to use standalone TeXLive. 496 | - Minor adjustment to documentation order. 497 | 498 | * Misc: 499 | - Minor fixes and improvements. 500 | - Add QA test for biblatex-caspervector version. 501 | - Remove spaces and tabs on blank lines, add related QA check. 502 | 503 | 2012-05-30, v1.4 alpha3 504 | 505 | * API changes: 506 | - `[no]tocbibind' -> `[no]pdftoc', functionality reduced (see below). 507 | - `[no]upcite' removed since biblatex supports it quite flexibly. 508 | 509 | * Changes to package code: 510 | - Remove uses of tocbibind because it crashes with biblatex. 511 | 512 | * Changes to documentation: 513 | - Use biblatex for bibliography formatting. 514 | - Add instructions for natbib, remove instructions for natbib. 515 | - (Re)add the FAQ section. 516 | - Use more printer-friendly colours. 517 | - Enhance `doc/Make.bat' with bat's `call'. 518 | - Use the hologo package for TeX logos. 519 | - Use tabs in `pkuthss.bib'. 520 | - Update bib file for Casper's biblatex style. 521 | - `thanks.tex' -> `acknowledge.tex' 522 | - Use better determined format for .bib files. 523 | 524 | * Misc: 525 | - Split Makefile functionalities to executable in `utils/'. 526 | - `maintcheck' -> `qa', `revbump' -> `bump'. 527 | - Split encoding and line terminator stuffs to `enclt'. 528 | - `dist' now automatically joins biblatex-caspervector files. 529 | - Update find(1) usage. 530 | - QA script updated. 531 | - Use sed(1)'s `y' instead of python's `str.translate()' in `bump'. 532 | - Add appropriate copyright notices. 533 | - Add indentation modelines. 534 | 535 | 2012-05-12, v1.4 alpha2 536 | 537 | * Changes to package code: 538 | - Fix positioning of boxes on title page. 539 | - Unify code that fill in blanks on the title page. 540 | - Merge ctex-kit updates with minor modifications. 541 | 542 | * Changes to documentation: 543 | - Add indication for customising title page by modifying `pkuthss.cls'. 544 | 545 | * Misc: 546 | - Add `maintcheck' and `revbump' to root Makefile to ease automation. 547 | 548 | 2012-04-13, v1.4 alpha1 549 | 550 | * API changes: 551 | - `[no]linkcolor' -> `[no]colorlinks'. 552 | - `[no]pdfmeta' -> `[no]pdfprop'. 553 | - `\setpdfmetadata' -> `\setpdfproperties'. 554 | 555 | * Changes to package code: 556 | - Simplify package code with `\@nameuse' and `\@namedef'. 557 | - Use `导\hspace{2em}师:' for title page and `导师:' for abstract. 558 | 559 | * Changes to documentation: 560 | - Fix typos: "模板" -> "模版". 561 | - Indicate that `texdoc' requires pkuthss be installed "regular"ly. 562 | - Improve spacing details. 563 | 564 | * Misc: 565 | - Update copyright notices. 566 | - Revise Makefiles. 567 | 568 | # vim:ts=4:sw=4 569 | -------------------------------------------------------------------------------- /doc/readme/chap/origin.tex: -------------------------------------------------------------------------------- 1 | ../../example/chap/origin.tex -------------------------------------------------------------------------------- /doc/readme/chap/pkuthss-abs.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2014,2021 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \begin{cabstract} 31 | 本文介绍了 pkuthss 文档模版所提供的功能。 32 | \end{cabstract} 33 | 34 | \ifblind\begin{beabstract}\else\begin{eabstract}\fi 35 | This document describes the the functions provided by 36 | the pkuthss document template. 37 | \ifblind\end{beabstract}\else\end{eabstract}\fi 38 | 39 | % vim:ts=4:sw=4 40 | -------------------------------------------------------------------------------- /doc/readme/chap/pkuthss-ack.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2012,2015,2021,2024 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \chapter{致谢} 31 | 32 | 感谢北大未名 BBS 上 MathTools 版和 Thesis 版诸位同学的支持。 33 | 特别感谢 pkuthss 模版的最初创作者 solvethis 网友, 34 | 不断地对 Casper 提出的诸多问题予以解答的 cauchy 网友, 35 | 以及在论文格式合规性和双盲版论文格式上有主要贡献的 Kurapica 网友~:) 36 | 37 | 此外还要感谢 \parencite{pku-thesisstyle, pku-degreetype} 的作者, 38 | 让我校在学位论文格式要求的繁复程度上离隔壁更近了一步, 39 | 同时还达成了用 \hologo{TeX} 排版出和 M\$ Word 一样审美水平论文的伟大成就。 40 | 41 | 最后要感谢 \verb|sed|、\verb|grep|、\verb|sort| 这些 Unix 工具, 42 | 它们每天陪伴 Casper,从不让 Casper 对它们的期望落空,它是 Casper 最好的朋友。 43 | 44 | \vspace{1em} 45 | \begin{quotation} 46 | \small This series of books is affectionately dedicated to the 47 | Type 650 computer once installed at Case Institute of Technology, 48 | in remembrance of many pleasant evenings. 49 | 50 | \rightline{--- Donald E.\ Knuth, \emph{The Art of Computer Programming}} 51 | \end{quotation} 52 | 53 | % vim:ts=4:sw=4 54 | -------------------------------------------------------------------------------- /doc/readme/chap/pkuthss-chap1.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2019 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \chapter{使用介绍} 31 | \section{系统要求}\label{sec:req} 32 | 33 | 正确编译需要以下几部分: 34 | \begin{itemize} 35 | \item 一个基本的 \hologo{TeX} 发行版。 36 | \item CJK 或 XeCJK(供 \hologo{XeLaTeX} 使用)宏包。 37 | \item ctex\cupercite{ctex} 宏包(提供了 ctexbook 文档类)。 38 | \item 中文字体。 39 | \item 如果要使用 biblatex 进行文献列表和引用的排版的话, 40 | 还需要 biblatex\cupercite{biblatex} 宏包; 41 | \item 如果要对中文文献进行按汉语拼音的排序的话, 42 | 还需要 biber\cupercite{biber} 程序。 43 | \item 如果使用默认的文献列表和引用样式的话,还需要作者编写的 biblatex 样式 44 | (biblatex-caspervector\cupercite{biblatex-caspervector}), 45 | 此样式要求使用 biber 程序。 46 | \item 如果须要使用 latexmk 来实现自动编译,还需要 latexmk 工具。 47 | \end{itemize} 48 | 49 | \myemph{最新}的\myemph{完全版} \hologo{TeX} Live 系统(\myemph{% 50 | 注:某些 Linux 发行版软件仓库中的 \hologo{TeX} Live 有问题, 51 | 建议使用独立安装版的 \hologo{TeX} Live% 52 | \unemph{\footnote{\url{https://www.tug.org/texlive/}.}}。% 53 | })都已经包含除中文字体之外所有要求的项目。% 54 | \myemph{% 55 | 为了获得最好的支持, 56 | 我们建议用户使用最新、完全版的 \hologo{TeX} 系统和各宏包。% 57 | } 58 | 59 | 中文字体需要用户自行获得。\myemph{% 60 | 注:一些中文字体的字库不全,只有 GB2312 字符集内字符的字体信息。 61 | 这种情况通常会造成编译生成的 pdf 文件中缺少部分字符, 62 | 其中一种典型症状是“〇”字显示不出来。 63 | 如果要使用中易公司的字体, 64 | 则建议使用 Windows Vista 及其以后版本提供的宋体、黑体、楷体和仿宋体, 65 | 以及 Microsoft Office 2003 及其以后版本提供的隶书和幼圆体, 66 | 这些字体是 GB18030 字符集的,不存在上述问题。% 67 | } 68 | 69 | \section{模版文件}\label{sec:doc-dir} 70 | 71 | 在正确安装 pkuthss 文档模版之后,在终端/命令提示符中执行 72 | \begin{Verbatim} 73 | texdoc pkuthss 74 | \end{Verbatim} 75 | 打开的 pdf 文件所在目录中包含两个子目录和相应的两个 pdf 文件, 76 | 其中 \verb|readme/| 为说明文档(即本文档)的源代码,% 77 | \verb|example/| 为文档模版的源代码,% 78 | \verb|pkuthss.pdf| 和 \verb|example.pdf| 79 | 分别为说明文档和文档模版的 pdf 文件。 80 | 81 | \verb|example/| 目录下的源代码使用的是 UTF-8 编码, 82 | 在现在 \hologo{TeX} 用户常用的编辑器中均已经有了良好的支持。 83 | 用户可以将 \verb|example/| 中的所有内容复制到合适的目录, 84 | 并在此目录中根据模版修改出自己的论文。 85 | 86 | \myemph{% 87 | 注意:在 1.4 rc4 之后版本的 pkuthss 文档模版中, 88 | 除了 \texttt{Make.bat} 之外,所有文件均是 LF(\texttt{\string\n})换行。 89 | 在 Windows 下用“记事本”打开这些文件时, 90 | 所有的换行会变成某个奇怪的字符,而所有文字会挤在一行上。 91 | 这是“记事本”的固有问题, 92 | 因此 pkuthss 文档模版的作者建议用户使用支持 LF 换行的文本编辑器编辑文件。% 93 | } 94 | 95 | 模版中的关键文件有: 96 | \begin{itemize} 97 | \item \verb|ctexopts.cfg|、\verb|ctex-fontset-pkuthss.def|: 98 | 比较常用的字体配置,适用于 2.0 及以后版本的 99 | ctex\cupercite{ctex} 宏包。 100 | \item \verb|latexmkrc|: 101 | 被 latexmk 工具读取的配置文件,用于使编译工作自动化。 102 | \item \verb|Make.bat|:% 103 | 方便 Windows 用户使用的批处理文件,会调用 latexmk。 104 | \item \verb|spine.tex|:书脊的源文件,具体用法请参考其中代码。 105 | \item \verb|thesis.tex|:示例模版的主文件。 106 | 107 | \item \verb|chap/|:目录,包含各章节内容: 108 | \begin{itemize} 109 | \item \verb|copy.tex|:版权声明部分。 110 | \item \verb|origin.tex|: 111 | 原创性声明和使用授权说明部分\cupercite{pku-originauth}。 112 | \end{itemize} 113 | \myemph{% 114 | 注:pkuthss 文档模版可排版学校要求的二维码, 115 | 请参考 \texttt{copy.tex} 和 \texttt{origin.tex} 中的相关注释。% 116 | } 117 | \end{itemize} 118 | 119 | \section{编译方式}\label{sec:compile} 120 | 121 | pkuthss 文档模版支持三种编译方式,即 122 | \begin{itemize} 123 | \item \hologo{LaTeX} -- dvipdfmx 方式:\\ 124 | 依次执行 \verb|latex|,\verb|biber|,% 125 | \verb|latex|,\verb|latex| 和 \verb|dvipdfmx|。 126 | \item \hologo{pdfLaTeX} 方式:\\ 127 | 依次执行 \verb|pdflatex|,\verb|biber|,% 128 | \verb|pdflatex| 和 \verb|pdflatex|。 129 | \item \hologo{XeLaTeX} 方式:\\ 130 | 依次执行 \verb|xelatex|,\verb|biber|,% 131 | \verb|xelatex| 和 \verb|xelatex|。 132 | \end{itemize} 133 | \myemph{% 134 | 注意:在特定情形下,\texttt{latex}/\texttt{pdflatex}/\texttt{xelatex} 135 | 步骤可能须要执行多于 2 次,而下文推荐的 latexmk 工具会自动处理这类情形。 136 | 此外,\hologo{XeLaTeX} 对非 UTF-8 编码的支持不好, 137 | 因此 \hologo{XeLaTeX} 方式的编译不支持 GBK 编码。% 138 | } 139 | 140 | pkuthss 文档模版附带的 \verb|latexmkrc| 中已经对这三种编译方式进行了完整的 141 | 配置。用户只须要在 \verb|latexmkrc| 中通过设定变量 \verb|default_files| 142 | 的值指定被编译的主文件名,并通过设定变量 \verb|pdf_mode| 的值指定采用 143 | 哪种编译方式,即可通过在主文件所在目录调用 latexmk 工具来实现自动编译: 144 | 类 UNIX 环境下大致如下 145 | \begin{Verbatim} 146 | cd /path/to/directory/with/thesis.tex 147 | latexmk 148 | \end{Verbatim} 149 | 而在 Windows 环境下大致如下 150 | \begin{Verbatim} 151 | cd \path\to\directory\with\thesis.tex 152 | latexmk 153 | \end{Verbatim} 154 | 155 | Windows 用户也可以使用批处理文件 \verb|Make.bat|: 156 | 在主文件所在目录双击此文件,它便会调用 latexmk 进行编译。\myemph{% 157 | 注意:% 158 | Windows 批处理对于 LF(\texttt{\string\n})换行的批处理文件支持有问题。 159 | 在命令提示符(cmd)下执行这些批处理文件时没有问题, 160 | 但双击文件图标执行时可能就会出错。 161 | \hologo{TeX} Live 中安装的 \texttt{Make.bat} 和 162 | CTAN 上提供的压缩包里的 \texttt{Make.bat} 163 | 在正常情况下应该是 CRLF(\texttt{\string\r\string\n})换行的。% 164 | } 165 | 166 | % vim:ts=4:sw=4 167 | -------------------------------------------------------------------------------- /doc/readme/chap/pkuthss-chap2.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2019,2021-2022,2024 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \chapter{pkuthss 文档模版提供的功能} 31 | \section{pkuthss 文档类提供的选项}\label{sec:options} 32 | 33 | 除非特别说明,否则这一节提到的选项中都是不带“\verb|no|”的版本被启用。 34 | 35 | \begin{itemize} 36 | \item \textbf{\texttt{[no]uppermark}}: 37 | 是否在页眉中将章节名中的小写字母转换为大写字母。 38 | 就目前而言,这样的转换存在着一些较为严重的缺陷\footnote{% 39 | 准确地说是 \texttt{\string\MakeUppercase} 宏的问题: 40 | 其在某些地方的转换不够健壮, 41 | 例如 \texttt{\string\cite\string{ctex\string}} 42 | 会被转换成 \texttt{\string\cite\string{CTEX\string}}。% 43 | },因此不建议使用。 44 | 基于上述考虑,\myemph{% 45 | pkuthss 文档类默认启用 \texttt{nouppermark} 选项, 46 | 即不在页眉中使用大写的章节名% 47 | }。 48 | 49 | \item \textbf{\texttt{[no]pkufont}}: 50 | 是否根据学校对论文格式的要求\cupercite{pku-thesisstyle}% 51 | 将西文字体改为类似于 Times New Roman / Arial 的字体。 52 | 53 | \item \textbf{\texttt{[no]pkufoot}}\footnote{% 54 | 此选项等价于 1.6.4 及以前版本 pkuthss-extra 宏包的 55 | \texttt{[no]footfmt} 选项; 56 | 更改名称是为了使文档类选项名更加规则。% 57 | }: 58 | 是否根据学校对论文格式的要求\cupercite{pku-thesisstyle}% 59 | 修改和脚注相关的一些格式。 60 | 具体地说,启用 \verb|pkufoot| 选项后会进行以下几项设置: 61 | \begin{itemize} 62 | \item 脚注参用带圈的编号。 63 | \item 页脚中脚注编号使用正文(而非上标)字体。 64 | \item 页脚中脚注编号和脚注文本之间默认间隔一个空格。 65 | \end{itemize} 66 | 67 | \item \textbf{\texttt{[no]pkuspace}}: 68 | 是否根据学校对论文格式的要求\cupercite{pku-thesisstyle}% 69 | 修改排版中的一些间距及相关设置。 70 | 具体地说,启用 \verb|pkuspace| 选项后会按 71 | \parencite{pku-thesisstyle} 中的要求修改以下几项设置: 72 | \begin{itemize} 73 | \item 正文的行距。 74 | \item 目录中条目的缩进方式。 75 | \item 图表标题的字号,以及标题中编号和标题文字之间的间隔方式 76 | (例如图 \ref{fig:example} 所示)。 77 | \end{itemize} 78 | 79 | \begin{figure}[htbp!] 80 | \centering 81 | \includegraphics[width = 0.5\textwidth]{pkuword} 82 | \caption{示例插图}\label{fig:example} 83 | \end{figure} 84 | 85 | \item \textbf{\texttt{[no]spacing}}\footnote{% 86 | 因为代码重构的缘故, 87 | 此选项同时提供 1.5.5 及以前版本 pkuthss-extra 宏包 88 | 中 \texttt{[no]tightlist} 选项所提供的功能。% 89 | }: 90 | 是否采用一些常用的调整间距的额外版式设定。 91 | 具体地说,启用 \verb|spacing| 选项后会进行以下几项设置: 92 | \begin{itemize} 93 | \item 调用 setspace 宏包以使某些细节处的空间安排更美观。 94 | \item 采用比 \hologo{LaTeX} 默认设定更加紧密的枚举环境% 95 | \footnote{% 96 | 在枚举环境(itemize、enumerate 和 description)中, 97 | 每个条目的内容较少时,条目往往显得稀疏; 98 | 在参考文献列表中也有类似的现象。 99 | 启用 \texttt{spacing} 选项后, 100 | 将去掉这些环境中额外增加的(垂直)间隔。% 101 | }。 102 | \item 调整枚举环境的缩进,以适应中文排版中的习惯。 103 | \end{itemize} 104 | 105 | \item \textbf{\texttt{[no]spechap}}\footnote{% 106 | “spechap”是“\textbf{spec}ial \textbf{chap}ter”的缩写。% 107 | }: 108 | 是否启用第 \ref{ssec:misc} 小节中介绍的 \verb|\specialchap| 命令。 109 | 110 | \item \textbf{\texttt{[no]pdftoc}}\footnote{% 111 | 此选项部分等价于 1.4 alpha2 及以前版本 pkuthss-extra 宏包 112 | 的 \texttt{[no]tocbibind} 选项。 113 | 因为 tocbibind 宏包和 biblatex 宏包冲突,% 114 | pkuthss 文档类不再调用 tocbibind 宏包。% 115 | }: 116 | 启用 \verb|pdftoc| 选项后, 117 | 用 \verb|\tableofcontents| 命令生成目录时会自动添加“目录”的 pdf 书签。 118 | 119 | \item \textbf{\texttt{[no]pdfprop}}: 120 | 是否自动根据设定的论文文档信息(如作者、标题等) 121 | 设置生成的 pdf 文档的相应属性。\myemph{% 122 | 注意:该选项实际上是在 \texttt{\string\maketitle} 时生效的, 123 | 这是因为考虑到 124 | 通常用户在调用 \texttt{\string\maketitle} 前 125 | 已经设置好所有的文档信息。 126 | 若用户不调用 \texttt{\string\maketitle}, 127 | 则须在设定完文档信息之后自行调用 128 | 第 \ref{ssec:misc} 小节中介绍的 129 | \texttt{\string\setpdfproperties} 命令以完成 130 | pdf 文档属性的设定。% 131 | } 132 | 133 | \item \textbf{其余文档类选项}:% 134 | pkuthss 文档类以 ctexbook 文档类为基础, 135 | 其接受的其余所有文档类选项均被传递给 ctexbook。 136 | 其中可能最常用的选项是 \verb|GBK| 和 \verb|UTF8|: 137 | 它们选择源代码使用的字符编码,默认使用 \verb|GBK|。 138 | \end{itemize} 139 | 140 | 例如,如果须要使用 UTF-8 编码撰写论文, 141 | 则应在载入 pkuthss 文档类时加上 \verb|UTF8| 选项: 142 | \begin{Verbatim} 143 | \documentclass[UTF8, ...]{pkuthss} % “...”代表其它的选项。 144 | \end{Verbatim} 145 | 146 | 又例如,文档默认情况下是双面模式,每章都从右页(奇数页)开始。 147 | 如果希望改成一章可以从任意页开始,可以这样设置: 148 | \begin{Verbatim} 149 | \documentclass[openany, ...]{pkuthss} % 每章从任意页开始。 150 | \end{Verbatim} 151 | 152 | \section{pkuthss 文档类提供的命令和环境} 153 | \subsection{设定文档信息的命令}\label{ssec:set-cmd} 154 | 155 | 这一类命令的语法为 156 | \begin{Verbatim} 157 | \commandname{具体信息} % commandname 为具体命令的名称。 158 | \end{Verbatim} 159 | 160 | 这些命令总结如下: 161 | \begin{itemize} 162 | \item \texttt{\bfseries\string\ctitle}:设定论文中文标题\footnote{% 163 | 因为 pkuthss 内部实现机制的缘故,\myemph{双盲版论文的(中文和西文) 164 | 标题如须强制换行,必须使用 pkuthss 提供的 \texttt{\string\thssnl} 165 | 命令而非 \texttt{\string\\}},否则会出错。% 166 | }; 167 | \item \texttt{\bfseries\string\etitle}:设定论文西文标题; 168 | \item \texttt{\bfseries\string\cauthor}:设定作者的中文名; 169 | \item \texttt{\bfseries\string\eauthor}:设定作者的西文名; 170 | \item \texttt{\bfseries\string\date}:设定日期; 171 | \item \texttt{\bfseries\string\studentid}:设定作者的学号; 172 | \item \texttt{\bfseries\string\school}:设定作者的学院名; 173 | \item \texttt{\bfseries\string\cmajor}:设定作者专业(二级学科)的中文名; 174 | \item \texttt{\bfseries\string\emajor}:设定作者专业(二级学科)的西文名; 175 | \item \texttt{\bfseries\string\direction}:设定作者的研究方向; 176 | \item \texttt{\bfseries\string\cmentor}:设定导师的中文名; 177 | \item \texttt{\bfseries\string\ementor}:设定导师的西文名; 178 | \item \texttt{\bfseries\string\ckeywords}:设定中文关键词; 179 | \item \texttt{\bfseries\string\ekeywords}:设定西文关键词; 180 | \item \texttt{\bfseries\string\degreetype}: 181 | 设定学位类型(1 为学术学位,2 为专业学位,设为 0 则不显示学位类型); 182 | \item \texttt{\bfseries\string\blindid}:设定论文编号(双盲评审用); 183 | \item \texttt{\bfseries\string\discipline}:设定一级学科(双盲评审用)。 184 | \end{itemize} 185 | 排版双盲版论文时除了要去掉致谢等章节、隐去论文中其它可能泄露个人信息的部分外, 186 | 还应注意在排版封面时须使用 \verb|\makeblind| 而非 \verb|\maketitle| 命令。 187 | 188 | 例如,如果要设定专业为“化学”(“Chemistry”),则可以使用以下命令: 189 | \begin{Verbatim} 190 | \cmajor{化学} 191 | \emajor{Chemistry} 192 | \end{Verbatim} 193 | 194 | \subsection{自身存储文档信息的命令} 195 | 196 | 这一类命令的语法为 197 | \begin{Verbatim} 198 | % commandname 为具体的命令名。 199 | \renewcommand{\commandname}{具体信息} 200 | \end{Verbatim} 201 | 202 | 这些命令总结如下: 203 | \begin{itemize} 204 | \item \texttt{\bfseries\string\cuniversity}:大学的中文名。 205 | \item \texttt{\bfseries\string\euniversity}:大学的西文名。 206 | \item \texttt{\bfseries\string\cthesisname}:论文类别的中文名。 207 | \item \texttt{\bfseries\string\ethesisname}:论文类别的西文名。 208 | \item \texttt{\bfseries\string\thesiscover}:封面显示的论文类别\footnote{% 209 | 出于兼容性的考虑,如果 \texttt{\string\thesiscover} 为空, 210 | 那么封面将显示 \texttt{\string\cthesisname}。% 211 | }。 212 | \item \texttt{\bfseries\string\mentorlines}:封面“导师”部分的行数。 213 | \item \texttt{\bfseries\string\cabstractname}:摘要的中文标题。 214 | \item \texttt{\bfseries\string\eabstractname}:摘要的西文标题。 215 | \end{itemize} 216 | 217 | 例如,如果要设定论文的类别为“博士学位论文”(“Doctor Thesis”), 218 | 但封面要显示“博士研究生学位论文”,则可以使用以下命令: 219 | \begin{Verbatim} 220 | \renewcommand{\cthesisname}{博士学位论文} 221 | \renewcommand{\ethesisname}{Doctor Thesis} 222 | \renewcommand{\thesiscover}{博士研究生学位论文} 223 | \end{Verbatim} 224 | 225 | \subsection{以“key = value”格式设置文档信息} 226 | 227 | 用户可以通过 \verb|\pkuthssinfo| 命令集中设定文档信息,其语法为: 228 | \begin{Verbatim} 229 | % key1、key2、value1、value2 等为具体文档信息的项目名和内容。 230 | \pkuthssinfo{key1 = value1, key2 = value2, ...} 231 | \end{Verbatim} 232 | 其中文档信息的项目名为前面提到的设定文档信息的命令名 233 | 或自身存储文档信息的命令名(不带反斜杠)。 234 | 235 | 当文档信息的内容包含了逗号等有干扰的字符时, 236 | 可以用大括号将这一项文档信息的全部内容括起来。\myemph{% 237 | 我们建议用户总用大括号将文档信息的内容括起来, 238 | 以避免很多不必要的麻烦。% 239 | } 240 | 241 | 例如,前面提到的文档信息的设置可以集中地写成: 242 | \begin{Verbatim} 243 | \pkuthssinfo{ 244 | ..., % “...”代表其它的设定。 245 | cthesisname = {本科生毕业论文}, 246 | ethesisname = {Undergraduate Thesis}, 247 | cmajor = {化学}, emajor = {Chemistry} 248 | } 249 | \end{Verbatim} 250 | 251 | \subsection{其它命令和环境}\label{ssec:misc} 252 | 253 | \texttt{\bfseries cabstract} 和 \texttt{\bfseries eabstract} 环境用于编写 254 | 中西文摘要;\texttt{\bfseries beabstract} 环境用于编写双盲评审版的西文摘要。 255 | 用户只须要写摘要的正文;标题、作者、导师、专业等部分会自动生成。 256 | 257 | \texttt{\bfseries\string\specialchap} 命令 258 | 用于开始不进行标号但计入目录的一章, 259 | 并合理安排其页眉。\myemph{% 260 | 注意:须要启用 \texttt{spechap} 选项才能使用此命令。 261 | 另外,在此章内的节或小节等命令应使用带星号的版本, 262 | 例如 \texttt{\string\section\string*} 等, 263 | 以免造成章节编号混乱。% 264 | }% 265 | 例如,本文档中的“序言”一章就是用 \verb|\specialchap{序言}| 266 | 这条命令开始的。% 267 | 268 | \texttt{\bfseries\string\setpdfproperties} 命令 269 | 用于根据用户设定的文档信息自动设定生成的 pdf 文档的属性。 270 | 此命令会在用户调用 \verb|\maketitle| 命令时被自动调用, 271 | 因此通常不需要用户自己使用; 272 | 但用户有时可能不须要输出封面,从而不会调用 \verb|\maketitle| 命令, 273 | 此时就须要在设定完文档信息之后调用 \verb|\setpdfproperties|。% 274 | \myemph{注意:须要启用 \texttt{pdfprop} 选项才能使用此命令。} 275 | 276 | \texttt{\bfseries\string\thssnl} 命令用于在双盲版论文的(中文和西文)标题中 277 | 强制换行,见第 \ref{ssec:set-cmd} 小节中关于 \verb|\ctitle| 说明的脚注。 278 | 279 | \section{从其它文档类和宏包继承的功能}\label{sec:thirdparty} 280 | 281 | pkuthss 文档类建立在 ctexbook\cupercite{ctex} 文档类之上, 282 | 并调用了 geometry\cupercite{geometry}、fancyhdr\cupercite{fancyhdr}、% 283 | hyperref\cupercite{hyperref}、graphicx\cupercite{graphicx} 284 | 和 ulem\cupercite{ulem} 等几个宏包。 285 | 因此,ctexbook 文档类和这些宏包所提供的功能均可以使用。 286 | 287 | 例如,用户如果想将目录的标题改为“目{\quad\quad}录”, 288 | 则可以使用 ctexbook 文档类提供的 \verb|\ctexset| 命令: 289 | \begin{Verbatim} 290 | \ctexset[contentsname = {目{\quad\quad}录}] 291 | \end{Verbatim} 292 | 293 | 在默认的配置下,% 294 | pkuthss 文档模版使用作者编写的 biblatex\cupercite{biblatex} 样式% 295 | \cupercite{biblatex-caspervector}进行参考文献和引用的排版, 296 | 用户可以使用它以及 biblatex 本身所提供的功能。 297 | 例如,用户可以分别使用 \verb|\cite|、\verb|\parencite| 和 \verb|\supercite| 298 | 生成未格式化的、带方括号的和上标且带方括号的引用标记: 299 | \begin{Verbatim} 300 | \cite{ctex},\parencite{ctex},\supercite{ctex} 301 | \end{Verbatim} 302 | 在本文中将产生“\cite{ctex},\parencite{ctex},\supercite{ctex}”。 303 | 304 | 就目前而言,在 biblatex 中,通过更复杂的设置, 305 | 还可以满足例如被引用的文献按照引用顺序排序, 306 | 而未引用的文献按照西文文献在前、中文文献在后排序这样的需求, 307 | 详见 biblatex-caspervector 的文档\cupercite{biblatex-caspervector}。 308 | 309 | 除此之外,pkuthss 文档类还可能调用以下这些宏包: 310 | \begin{itemize} 311 | \item 启用 \verb|pkufont| 选项时会调用 unicode-math 312 | \cupercite{unicode-math} 宏包(\hologo{XeLaTeX} 编译)或 313 | mathptmx/helvet\cupercite{psnfss} 和 textcomp 宏包(非 314 | \hologo{XeLaTeX} 编译),此外在非 \hologo{XeLaTeX} 编译或不启用 315 | \verb|pkufont| 选项时均会调用 amssymb\cupercite{amssymb} 宏包。 316 | \item 启用 \verb|pkufoot| 选项时会调用 317 | tikz\cupercite{tikz} 和 scrextend\cupercite{scrextend} 宏包。 318 | \item 启用 \verb|pkuspace| 选项时会调用 319 | tocloft\cupercite{tocloft}、caption\cupercite{caption} 和 320 | subcaption\cupercite{subcaption} 宏包。 321 | \item 启用 \verb|spacing| 选项时会调用 setspace 和 322 | enumitem\cupercite{enumitem} 宏包。 323 | \end{itemize} 324 | 因此在启用相应选项时,用户可以使用对应宏包所提供的功能。 325 | 326 | \section{高级设置}\label{sec:advanced} 327 | 328 | pkuthss 文档模版的实现是简洁、清晰、灵活的。 329 | 当一些细节的自定义无法通过模版提供的外部接口实现时, 330 | 我们鼓励用户(在适当理解相关部分代码的前提下) 331 | 通过修改 pkuthss 文档类的源文件进行自定义。 332 | 在目前常用的 \hologo{TeX} 系统中, 333 | 假设 pkuthss 的说明文档所在目录具有下述形式的路径: 334 | \begin{Verbatim} 335 | # 说明文档所在目录($TEXMFDIST 的形式见下面几行): 336 | $TEXMFDIST/doc/latex/pkuthss/ 337 | # 若用户使用 Windows 下的 TeX Live 系统,则 $TEXMFDIST 一般类似于: 338 | C:\texlive\2015\texmf-dist 339 | # 若用户使用类 Unix 下的 TeX Live 系统,则 $TEXMFDIST 一般类似于: 340 | /usr/local/texlive/2015/texmf-dist 341 | \end{Verbatim} 342 | 则其源文件所在目录应该位于以下目录: 343 | \begin{Verbatim} 344 | $TEXMFDIST/tex/latex/pkuthss/ 345 | \end{Verbatim} 346 | 347 | 如果的确须要修改 pkuthss 文档类的源文件,\myemph{% 348 | 建议用户将 \texttt{pkuthss.cls} 或其它须要修改的文件 349 | 复制到被编译的主文件所在的目录, 350 | 然后对此副本进行修改% 351 | }\footnote{% 352 | 能这样做的原因是目前常用的 \hologo{TeX} 系统在读取编译用到的文件时, 353 | 会优先考虑工作目录(即主文件所在目录)中的文件。% 354 | }。这样做的目的主要是使用户不必在每次调整文档类文件时都去上述路径修改; 355 | 同时这样也可以在(万一须要)更新 \hologo{TeX} 系统时, 356 | 防止用户修改过的文档类文件在更新中被自动覆盖掉。 357 | 358 | 一个常见的需求是封面中部分内容(特别是论文的标题、专业和研究方向)太长, 359 | 超出了在预设的空间。 360 | 此时,用户可以修改 \verb|pkuthss.cls| 里 \verb|\maketitle| 定义中 361 | \verb|\thss@int@fillinblank| 宏的参数来改变带下划线的空白的行数和行宽, 362 | 具体方法可以参考该文件中和 \verb|\mentorlines| 相关的代码。 363 | 364 | % vim:ts=4:sw=4 365 | -------------------------------------------------------------------------------- /doc/readme/chap/pkuthss-chap3.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2019,2021-2022 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \chapter{问题及其解决} 31 | \section{文档中已经提到的常见问题(按重要性排序)} 32 | 33 | 文档默认情况下是双面模式,章末可能产生空白页, 34 | 解决方式见第 \ref{sec:options} 节。 35 | 36 | 双盲版论文的(中文和西文)标题只能使用 pkuthss 提供的 37 | \verb|\thssnl| 命令而非 \verb|\\| 换行,见第 \ref{sec:options} 节。 38 | 39 | 通过一些设置,还可以满足例如被引用的文献按照引用顺序排序, 40 | 而未引用的文献按照西文文献在前、中文文献在后排序这样的需求, 41 | 见第 \ref{sec:thirdparty} 节。 42 | 43 | 一些高级设置,如封面中部分内容长度超过预设空间容量时的设置, 44 | 见第 \ref{sec:advanced} 节。 45 | 46 | 中文字体字库不全(只包含 GB2312 字符集内字符)时, 47 | 生成的 pdf 文档中可能缺少部分字符,解决方式见第 \ref{sec:req} 节。 48 | 使用过旧的 \hologo{TeX} 系统和各宏包, 49 | 或使用某些 Linux 发行版软件仓库所提供的 \hologo{TeX} Live 时, 50 | 可能引起一些问题,详见第 \ref{sec:req} 节。 51 | 52 | Windows 批处理对于 LF(\texttt{\string\n})换行的批处理文件支持有问题, 53 | 诊断方式见第 \ref{sec:compile} 节。 54 | Windows 的“记事本”程序在查看 LF(\texttt{\string\n}) 55 | 换行的文本文件时存在着一些问题, 56 | 因此建议用户使用支持 LF 换行的文本编辑器编辑文件, 57 | 详见第 \ref{sec:doc-dir} 节。 58 | 59 | \section{上游宏包可能引起的问题} 60 | 61 | biblatex\cupercite{biblatex} 宏包会自行设定 \verb|\bibname|, 62 | 故会覆盖通过 \verb|\ctexset| 设定的参考文献列表标题。 63 | 使用 biblatex 的用户可以使用 \verb|\printbibliography| 的 64 | \verb|title| 选项来手动设定参考文献列表的标题,例如: 65 | \begin{Verbatim} 66 | \printbibliography[title = {文献}, ...] % “...”为其它选项。 67 | \end{Verbatim} 68 | 69 | hyperref\cupercite{hyperref} 宏包和一些宏包可能发生冲突。 70 | 关于如何避免这些冲突, 71 | 可以参考 hyperref 宏包 README 文件中的“Package Compatibility”一节。 72 | 此文件通常和执行 \verb|texdoc hyperref| 73 | 时打开的 pdf 文件位于同一目录中。 74 | hyperref 默认会在输出的 pdf 文件中用彩色框来标记链接, 75 | 这些彩色框只会显示在屏幕上,不会被打印出来; 76 | 如有特殊需求,也可以在文章的导言区加入以下代码以完全去掉彩色框: 77 | \begin{Verbatim} 78 | \hypersetup{hidelinks} 79 | \end{Verbatim} 80 | 81 | biber 运行时有一定概率出现形如(目录名可能稍有不同) 82 | \begin{Verbatim} 83 | data source .../par-xxxxxxxx/cache-xxxxxxxx/ 84 | inc/lib/Biber/LaTeX/recode_data.xml not found in . 85 | \end{Verbatim} 86 | 的错误。 87 | 这种错误一般是 biber 在自解压阶段被终止之后, 88 | 未删除 \verb|.../par-xxxxxxxx/| 这个临时目录就重新运行 biber 时出现。 89 | 遇到这种情况时,删除掉上述临时目录及其所有内容, 90 | 再重新运行 biber 通常便可解决问题。 91 | 92 | \section{文档格式可能存在的问题} 93 | 94 | 目前在 \hologo{LaTeX} 中似乎没有一个可以很好地替代其它各类似宏包的 95 | 用于排版表格的宏包,而 pkuthss 文档模版的作者也无意假定用户使用 96 | 某一个宏包,因此模版并未尝试设定表格的默认字号,\myemph{用户 97 | 须自行按学校规定\cupercite{pku-thesisstyle}进行设置}。 98 | 99 | 学校对学位论文格式的规定显然没有考虑到非 MS Word 类排版工具的工作方式, 100 | 因此 pkuthss 文档模版只是对其要求的格式进行模仿, 101 | 而在一些小的细节上可能有所出入。 102 | 103 | biblatex-caspervector\cupercite{biblatex-caspervector} 104 | 所实现的格式和 \parencite{pku-thesisstyle} 的规定并不一致, 105 | 但其作者没有精力也不愿意去实现后者所规定的比原格式更丑陋得多的格式。 106 | 国标 GB/T 7714-2015 现在已经有了 biblatex-gb7714-2015% 107 | \cupercite{biblatex-gb7714-2015} 这一 biblatex 实现,用户也可以考虑使用。 108 | 109 | \section{反馈意见和建议} 110 | 111 | 关于 pkuthss 文档模版的意见和建议, 112 | 请在北大未名 BBS 的 MathTools 版或 pkuthss 项目主页的 issue tracker% 113 | \footnote{\url{https://gitea.com/CasperVector/pkuthss/issues}.}% 114 | 上提出, 115 | 或通过电子邮件\footnote% 116 | {\href{mailto:CasperVector@gmail.com}{\texttt{CasperVector@gmail.com}}.}% 117 | 告知模版维护者。 118 | 上述三种反馈方法中,建议用户尽量采用靠前的方法。 119 | 120 | 在进行反馈时,请尽量确保已经仔细阅读本文档中的说明。 121 | 如果是通过 BBS 或电子邮件进行反馈, 122 | 请在标题中说明是关于 pkuthss 文档模版的反馈; 123 | 如果是错误报告,请说明所使用 pkuthss 模版的版本、 124 | 自己使用的操作系统和 \hologo{TeX} 系统的类型和版本; 125 | 同时强烈建议附上一个出错的最小例子及其相应的编译日志(\verb|.log| 文件), 126 | 在文件较长时请使用附件。 127 | 128 | % vim:ts=4:sw=4 129 | -------------------------------------------------------------------------------- /doc/readme/chap/pkuthss-concl.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2012 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \specialchap{结论} 31 | 32 | pkuthss 文档模版结构较为简洁、清晰、灵活,较为易于学习和使用。 33 | 希望它能为各位须要使用 \hologo{LaTeX} 撰写学位论文的同学提供一些帮助。 34 | 35 | % vim:ts=4:sw=4 36 | -------------------------------------------------------------------------------- /doc/readme/chap/pkuthss-copy.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2016 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \chapter*{版权声明} 31 | \thispagestyle{empty} 32 | 33 | 版权所有 \copyright\ 2008--2009 solvethis 34 | \par 35 | 版权所有 \copyright\ 2010--2022 Casper Ti. Vector 36 | \par 37 | 版权所有 \copyright\ 2021 Kurapica 38 | \vskip 1em 39 | 40 | pkuthss 文档类及其说明文档均以 \hologo{LaTeX} Project Public License 发布。 41 | 随 pkuthss 提供的模版源代码中,除以下文件 42 | \begin{itemize} 43 | \item \verb|chap/copy.tex| 44 | \item \verb|chap/origin.tex| 45 | \end{itemize} 46 | 以 New BSD License 发布, 47 | 以及参考文献和引用列表使用的样式文件版权声明见相应文件中说明以外, 48 | 其余所有文件发布在公有领域(public domain)。 49 | 50 | % vim:ts=4:sw=4 51 | -------------------------------------------------------------------------------- /doc/readme/chap/pkuthss-encl1.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2012,2014 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \chapter{更新记录} 31 | \raggedbottom 32 | 33 | \section{1.3 版以后的更新记录} 34 | \VerbatimInput{ChangeLog.txt} 35 | 36 | \section{1.3 及其以前版本的更新记录} 37 | \VerbatimInput[baselinestretch = 1.1]{ChangeLog-upto-1.3.txt} 38 | 39 | \flushbottom 40 | 41 | % vim:ts=4:sw=4 42 | -------------------------------------------------------------------------------- /doc/readme/chap/pkuthss-intro.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2012,2014-2015,2018-2019,2022,2024 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \specialchap{序言} 31 | 32 | 本文档是北京大学论文文档模版 pkuthss 的说明文档。 33 | 34 | pkuthss 文档模版由三部分构成: 35 | \begin{itemize} 36 | \item \textbf{pkuthss 文档类}: 37 | 其中根据学校的格式规范\cupercite{pku-thesisstyle, pku-degreetype}% 38 | 实现了学位论文所需的基本格式要求, 39 | 主要包括对排版格式的设定和提供设置论文信息的命令; 40 | 此外也实现了学位论文中用户可能较多用到的一些额外功能, 41 | 例如自动在目录中加入参考文献和索引的条目和 42 | 自动根据用户设定的文档信息对所生成 pdf 的作者、标题等属性进行设置等。 43 | \item \textbf{说明文档}: 44 | 说明文档即本文档, 45 | 在安装(见第 \ref{sec:req} 节)之后应该可以用 \hologo{TeX} 系统提供的 46 | \verb|texdoc| 命令调出: 47 | \begin{Verbatim} 48 | texdoc pkuthss 49 | \end{Verbatim} 50 | \item \textbf{论文模版}: 51 | 模版的源代码(及由此生成的 pdf 文档) 52 | 和本文档的 pdf 文件处于同一目录下。 53 | 用户只须按照模版中的框架修改代码,即可写出自己的论文。 54 | \end{itemize} 55 | 56 | 在此之前,包括 dypang\cupercite{dypang}、FerretL\cupercite{FerretL}、% 57 | lwolf\cupercite{lwolf}、Langpku\cupercite{Langpku}、% 58 | solvethis\cupercite{solvethis} 等的数位网友均做过学位论文模版的工作。 59 | 本论文模版是 solvethis 的 pkuthss 模版的更新版本, 60 | 更新的重点是重构和对新文档类、宏包的支持。 61 | 62 | pkuthss 文档模版现在的维护者是 Casper Ti. Vector\footnote% 63 | {\href{mailto:CasperVector@gmail.com}{\texttt{CasperVector@gmail.com}}.}。% 64 | pkuthss 文档模版目前托管在 Gitea 上, 65 | 其项目主页是:\\ 66 | \hspace*{\parindent}\url{https://gitea.com/CasperVector/pkuthss}。 67 | 68 | % vim:ts=4:sw=4 69 | -------------------------------------------------------------------------------- /doc/readme/ctex-fontset-pkuthss.def: -------------------------------------------------------------------------------- 1 | ../example/ctex-fontset-pkuthss.def -------------------------------------------------------------------------------- /doc/readme/ctexopts.cfg: -------------------------------------------------------------------------------- 1 | ../example/ctexopts.cfg -------------------------------------------------------------------------------- /doc/readme/latexmkrc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019 Casper Ti. Vector 2 | # Public domain. 3 | 4 | @default_files = ('pkuthss'); 5 | $pdf_mode = 5; 6 | $dvipdf = "dvipdfmx %O -o %D %S"; 7 | $bibtex_use = 1.5; 8 | $biber = "biber -l zh__pinyin --output-safechars %O %S"; 9 | $clean_ext = "run.xml"; 10 | 11 | -------------------------------------------------------------------------------- /doc/readme/pkuthss-english.patch: -------------------------------------------------------------------------------- 1 | diff --git a/doc/example/chap/abs.tex b/doc/example/chap/abs.tex 2 | index ea215a8..8ad4294 100644 3 | --- a/doc/example/chap/abs.tex 4 | +++ b/doc/example/chap/abs.tex 5 | @@ -2,7 +2,7 @@ 6 | % Public domain. 7 | 8 | \begin{cabstract} 9 | - \pkuthssffaq % 中文测试文字。 10 | + 中文摘要。 11 | \end{cabstract} 12 | 13 | \ifblind\begin{beabstract}\else\begin{eabstract}\fi 14 | diff --git a/doc/example/chap/ack.tex b/doc/example/chap/ack.tex 15 | index 4af4d39..09de33d 100644 16 | --- a/doc/example/chap/ack.tex 17 | +++ b/doc/example/chap/ack.tex 18 | @@ -1,7 +1,7 @@ 19 | % Copyright (c) 2014,2016 Casper Ti. Vector 20 | % Public domain. 21 | 22 | -\chapter{致谢} 23 | -\pkuthssffaq % 中文测试文字。 24 | +\chapter{Acknowledgements} 25 | +Test text. 26 | 27 | % vim:ts=4:sw=4 28 | diff --git a/doc/example/chap/chap1.tex b/doc/example/chap/chap1.tex 29 | index 3d631f3..6e46b13 100644 30 | --- a/doc/example/chap/chap1.tex 31 | +++ b/doc/example/chap/chap1.tex 32 | @@ -1,7 +1,7 @@ 33 | % Copyright (c) 2014,2016,2018 Casper Ti. Vector 34 | % Public domain. 35 | 36 | -\chapter{引言} 37 | -\pkuthssffaq % 中文测试文字。 38 | +\chapter{Introduction} 39 | +Test text. 40 | 41 | % vim:ts=4:sw=4 42 | diff --git a/doc/example/chap/chap2.tex b/doc/example/chap/chap2.tex 43 | index 85f7008..da8c177 100644 44 | --- a/doc/example/chap/chap2.tex 45 | +++ b/doc/example/chap/chap2.tex 46 | @@ -1,7 +1,7 @@ 47 | % Copyright (c) 2014,2016 Casper Ti. Vector 48 | % Public domain. 49 | 50 | -\chapter{章节} 51 | -\pkuthssffaq % 中文测试文字。 52 | +\chapter{Some chapter} 53 | +Test text. 54 | 55 | % vim:ts=4:sw=4 56 | diff --git a/doc/example/chap/chap3.tex b/doc/example/chap/chap3.tex 57 | index ed66f12..ae221d6 100644 58 | --- a/doc/example/chap/chap3.tex 59 | +++ b/doc/example/chap/chap3.tex 60 | @@ -1,7 +1,7 @@ 61 | % Copyright (c) 2014,2016,2018 Casper Ti. Vector 62 | % Public domain. 63 | 64 | -\chapter{结论和展望} 65 | -\pkuthssffaq % 中文测试文字。 66 | +\chapter{Conclusion} 67 | +Test text. 68 | 69 | % vim:ts=4:sw=4 70 | diff --git a/doc/example/chap/encl1.tex b/doc/example/chap/encl1.tex 71 | index 9834829..4296e9a 100644 72 | --- a/doc/example/chap/encl1.tex 73 | +++ b/doc/example/chap/encl1.tex 74 | @@ -1,7 +1,7 @@ 75 | % Copyright (c) 2014,2016 Casper Ti. Vector 76 | % Public domain. 77 | 78 | -\chapter{附件} 79 | -\pkuthssffaq % 中文测试文字。 80 | +\chapter{Some appendix} 81 | +Test text. 82 | 83 | % vim:ts=4:sw=4 84 | diff --git a/doc/example/thesis.bib b/doc/example/thesis.bib 85 | index ac5b0c9..9d2ad60 100644 86 | --- a/doc/example/thesis.bib 87 | +++ b/doc/example/thesis.bib 88 | @@ -7,13 +7,4 @@ 89 | language = {english}, 90 | } 91 | 92 | -@article{test-zh, 93 | - author = {作者}, 94 | - title = {标题}, 95 | - type = {J}, 96 | - journal = {期刊}, 97 | - date = {2014-04-01}, 98 | - language = {chinese}, 99 | -} 100 | - 101 | % vim:ts=4:sw=4 102 | diff --git a/doc/example/thesis.tex b/doc/example/thesis.tex 103 | index dbfd379..6a8767a 100644 104 | --- a/doc/example/thesis.tex 105 | +++ b/doc/example/thesis.tex 106 | @@ -14,36 +14,43 @@ 107 | \documentclass[UTF8]{pkuthss} 108 | % 如果的确须要使脚注按页编号的话,可以去掉后面 footmisc 包的注释。 109 | %\usepackage[perpage]{footmisc} 110 | - 111 | -% 使用 biblatex 排版参考文献,并规定其格式(详见 biblatex-caspervector 的文档)。 112 | -% 这里按照西文文献在前,中文文献在后排序(“sorting = ecnyt”); 113 | -% 若须按照中文文献在前,西文文献在后排序,请设置“sorting = cenyt”; 114 | -% 若须按照引用顺序排序,请设置“sorting = none”。 115 | -% 若须在排序中实现更复杂的需求,请参考 biblatex-caspervector 的文档。 116 | -% biblatex-caspervector 也有一个“ugly”选项,使其更像国标格式;此外也可考虑 117 | -% 改用 style = gb7714-2015 并去掉之后两选项,详见 biblatex-gb7714-2015 的文档。 118 | -\usepackage[backend = biber, style = caspervector, utf8, sorting = ecnyt]{biblatex} 119 | +% 使用 biblatex 排版参考文献,并规定其格式(详见 biblatex 的文档)。 120 | +\usepackage[backend = biber]{biblatex} 121 | 122 | % 对于 linespread 值的计算过程有兴趣的同学可以参考 pkuthss.cls。 123 | \renewcommand*{\bibfont}{\zihao{5}\linespread{1.27}\selectfont} 124 | % 按学校要求设定参考文献列表的段间距。 125 | \setlength{\bibitemsep}{3bp} 126 | 127 | +\ctexset{ 128 | + contentsname = {Contents}, 129 | + listfigurename = {List of Figures}, 130 | + listtablename = {List of Tables}, 131 | + figurename = {Figure}, 132 | + tablename = {Table}, 133 | + indexname = {Index}, 134 | + appendixname = {Appendix}, 135 | + part/name = {\partname\space}, 136 | + part/number = {\thepart}, 137 | + chapter/name = {\chaptername\space}, 138 | + chapter/number = {\thechapter}, 139 | +} 140 | + 141 | % 如是双盲版论文,将 \blindfalse 改为 \blindtrue。后面可用 142 | % \ifblind 根据是否双盲来条件地启用代码(参见本文件后面部分)。 143 | \newif\ifblind\blindfalse 144 | % 设定文档的基本信息。 145 | \pkuthssinfo{ 146 | - cthesisname = {博士学位论文}, ethesisname = {Doctor Thesis}, 147 | - thesiscover = {博士研究生学位论文}, 148 | + ethesisname = {Doctor Thesis}, 149 | % 长标题可用 \thssnl 强制换行,不能用“\\”(双盲版会出错)。 150 | - ctitle = {测试文档}, 151 | etitle = {Test Document}, 152 | - cauthor = {某某}, eauthor = {Test}, date = {某年某月}, 153 | - studentid = {0123456789}, school = {某某学院}, 154 | - cmajor = {某某专业}, emajor = {Some Major}, 155 | - direction = {某某方向}, mentorlines = {2}, 156 | - cmentor = {某甲教授\\某乙教授}, 157 | + eauthor = {Test}, 158 | + date = {Month Year}, studentid = {0123456789}, 159 | + school = {Some School}, 160 | + emajor = {Some Major}, 161 | + direction = {Some Research Division}, 162 | + mentorlines = {2}, 163 | + cmentor = {Prof.\ Somebody\\Prof.\ Someone}, 164 | ementor = {Prof.\ Somebody and Prof.\ Someone}, 165 | ckeywords = {其一,其二}, 166 | ekeywords = {First, Second}, 167 | @@ -54,34 +61,6 @@ 168 | % 载入参考文献数据库(注意不要省略“.bib”)。 169 | \addbibresource{thesis.bib} 170 | 171 | -% 普通用户可删除此段,并相应地删除 chap/*.tex 中的 172 | -% “\pkuthssffaq % 中文测试文字。”一行。 173 | -\usepackage{color} 174 | -\def\pkuthssffaq{% 175 | - \emph{\textcolor{red}{pkuthss 文档模版最常见问题:}} 176 | - 177 | - \texttt{\string\cite}、\texttt{\string\parencite} % 178 | - 和 \texttt{\string\supercite} 三个命令分别产生% 179 | - 未格式化的、带方括号的和上标且带方括号的引用标记:% 180 | - \cite{test-en},\parencite{test-zh}、\supercite{test-en, test-zh}。 181 | - 182 | - 若格式审查时提示字号或其它格式细节问题,请启用 pkuthss 的 \texttt{ugly} 183 | - 选项,同时可以考虑启用 biblatex-caspervector 的 \texttt{ugly} 选项 184 | - 或者换用 biblatex-gb7714-2015,详见 \texttt{thesis.tex} 中相关注释。 185 | - 186 | - 生成的 PDF 文件中标记链接的彩色框不会出现在打印版论文中。 187 | - 如仍须去掉,可在 \texttt{thesis.tex} 导言区加入 188 | - \texttt{\string\hypersetup\{hidelinks\}}。 189 | - 190 | - 若要避免章末空白页,请在调用 pkuthss 文档类时加入 \texttt{openany} 选项。 191 | - 192 | - 如果编译时不出参考文献, 193 | - 请参考 \texttt{texdoc pkuthss}“问题及其解决”一章 194 | - “上游宏包可能引起的问题”一节中关于 biber 的说明。 195 | - 196 | - 因无法假定用户使用哪种方式排版表格,用户须自行保证表格字号符合学校规定。% 197 | -} 198 | - 199 | \begin{document} 200 | % 以下为正文之前的部分,默认不进行章节编号。 201 | \frontmatter 202 | diff --git a/tex/pkuthss-utf8.def b/tex/pkuthss-utf8.def 203 | index e1d9566..7cfbd32 100644 204 | --- a/tex/pkuthss-utf8.def 205 | +++ b/tex/pkuthss-utf8.def 206 | @@ -27,13 +27,13 @@ 207 | [2021/10/16 v1.9.1 Labels and captions in UTF-8 encoding 208 | for the pkuthss document class] 209 | 210 | -\def\label@ctitle{题目:} 211 | -\def\label@cauthor{姓\hphantom{汉字}名:} 212 | -\def\label@studentid{学\hphantom{汉字}号:} 213 | -\def\label@school{院\hphantom{汉字}系:} 214 | -\def\label@cmajor{专\hphantom{汉字}业:} 215 | -\def\label@direction{研究方向:} 216 | -\def\label@cmentor{导\hphantom{汉字}师:} 217 | +\def\label@ctitle{Title: } 218 | +\def\label@cauthor{Name} 219 | +\def\label@studentid{Student ID} 220 | +\def\label@school{Affiliation} 221 | +\def\label@cmajor{Major} 222 | +\def\label@direction{Research Division} 223 | +\def\label@cmentor{Supervisor} 224 | \def\label@ckeywords{关键词:} 225 | \def\label@blindcover{(匿名评阅论文封面)} 226 | \def\label@blindctitle{中文题目:} 227 | diff --git a/tex/pkuthss.cls b/tex/pkuthss.cls 228 | index 5aaf3ae..68bc3a4 100644 229 | --- a/tex/pkuthss.cls 230 | +++ b/tex/pkuthss.cls 231 | @@ -332,7 +332,7 @@ 232 | \fancyhf{}\renewcommand*{\headrulewidth}{0.75bp} 233 | \fancyfoot[C]{\zihao{5}\normalfont{\thepage}} 234 | \if@twoside 235 | - \fancyhead[CE]{\zihao{5}\normalfont{\cuniversity\cthesisname}} 236 | + \fancyhead[CE]{\zihao{5}\normalfont{{\euniversity} {\ethesisname}}} 237 | \fancyhead[CO]{\zihao{5}\normalfont\thss@int@setcase{\leftmark}} 238 | \else 239 | \fancyhead[C]{\zihao{5}\normalfont\thss@int@setcase{\leftmark}} 240 | @@ -382,14 +382,14 @@ 241 | \zihao{1}\includegraphics[height = 2.4em]{pkulogo}\hspace{0.4em}% 242 | \raisebox{0.4em}{\includegraphics[height = 1.6em]{pkuword}}\\[0.8em] 243 | \fi% 244 | - {\bfseries\ifx\thesiscover\empty{\cthesisname}\else{\thesiscover}\fi}% 245 | + {\bfseries\ethesisname}% 246 | } 247 | \vfill 248 | % Title of the thesis. 249 | {% 250 | \ifthss@opt@ugly\zihao{-1}\else\zihao{2}\fi% 251 | \linespread{1.6}\selectfont{\label@ctitle}% 252 | - \thss@int@fillinblank{2}{0.64\textwidth}{\textbf{\@ctitle}}% 253 | + \thss@int@fillinblank{2}{0.64\textwidth}{\textbf{\@etitle}}% 254 | } 255 | \vfill 256 | % Information about the author. 257 | @@ -397,18 +397,18 @@ 258 | % Slightly adjust the line skip when using new font size. 259 | \zihao{3}\linespread{1.75}\selectfont 260 | \def\thss@tmp@len{0.56\textwidth} 261 | - \begin{tabular}{l@{\extracolsep{0.2em}}c} 262 | - {\bfseries\label@cauthor} & 263 | - \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@cauthor} \\ 264 | - {\bfseries\label@studentid} & 265 | + \begin{tabular}{c@{\extracolsep{0.2em}}c@{\extracolsep{0.2em}}c} 266 | + {\bfseries\label@cauthor} & : & 267 | + \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@eauthor} \\ 268 | + {\bfseries\label@studentid} & : & 269 | \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@studentid} \\ 270 | - {\bfseries\label@school} & 271 | + {\bfseries\label@school} & : & 272 | \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@school} \\ 273 | - {\bfseries\label@cmajor} & 274 | - \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@cmajor} \\ 275 | - {\bfseries\label@direction} & 276 | + {\bfseries\label@cmajor} & : & 277 | + \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@emajor} \\ 278 | + {\bfseries\label@direction} & : & 279 | \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@direction} \\ 280 | - {\bfseries\label@cmentor} & 281 | + {\bfseries\label@cmentor} & : & 282 | \thss@int@fillinblank{\mentorlines}% 283 | {\thss@tmp@len}{\fangsong\@cmentor} \\ 284 | \end{tabular}% 285 | -------------------------------------------------------------------------------- /doc/readme/pkuthss.bib: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2022,2024 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | @online{amssymb, 31 | author = {{American Mathematical Society}}, 32 | title = {The amssymb package}, 33 | edition = {Ver.~3.0.1}, 34 | type = {M/OL}, 35 | date = {2013-01-14}, 36 | url = {https://ctan.org/pkg/amsfonts}, 37 | urldate = {2024-02-28}, 38 | language = {english}, 39 | } 40 | 41 | @online{biber, 42 | author = {Kime, Philip and Charette, Fran\c{c}ois}, 43 | title = {Biber: A backend bibliography processor for biblatex}, 44 | edition = {Ver.~2.7}, 45 | type = {M/OL}, 46 | date = {2016-12-05}, 47 | url = {https://ctan.org/pkg/biber}, 48 | urldate = {2017-03-01}, 49 | language = {english}, 50 | } 51 | 52 | @online{biblatex, 53 | author = {Lehman, Philipp}, 54 | title = {The biblatex Package: Programmable Bibliographies and Citations}, 55 | edition = {Ver.~3.7}, 56 | type = {M/OL}, 57 | date = {2016-11-16}, 58 | url = {https://ctan.org/pkg/biblatex}, 59 | urldate = {2017-03-01}, 60 | language = {english}, 61 | } 62 | 63 | @online{biblatex-caspervector, 64 | author = {Vector, Casper Ti.}, 65 | title = {biblatex 参考文献和引用样式:caspervector}, 66 | edition = {Ver.~0.3.3}, 67 | type = {M/OL}, 68 | date = {2018-06-29}, 69 | url = {https://ctan.org/pkg/biblatex-caspervector}, 70 | urldate = {2018-07-02}, 71 | language = {chinese}, 72 | } 73 | 74 | @online{biblatex-gb7714-2015, 75 | author = {胡振震}, 76 | title = {符合 GB/T 7714-2015 标准的 biblatex 参考文献样式}, 77 | edition = {Ver.~0.1w}, 78 | type = {M/OL}, 79 | date = {2021-01-19}, 80 | url = {https://ctan.org/pkg/biblatex-gb7714-2015}, 81 | urldate = {2021-03-04}, 82 | language = {chinese}, 83 | } 84 | 85 | @online{caption, 86 | author = {Sommerfeldt, Alex}, 87 | title = {Customizing captions of floating environments}, 88 | edition = {Ver.~3.6}, 89 | type = {M/OL}, 90 | date = {2022-02-20}, 91 | url = {https://ctan.org/pkg/caption}, 92 | urldate = {2022-05-04}, 93 | language = {english}, 94 | } 95 | 96 | @online{ctex, 97 | author = {{ctex.org}}, 98 | title = {\CTeX 宏集手册}, 99 | edition = {Ver.~2.4.8}, 100 | type = {M/OL}, 101 | date = {2017-02-23}, 102 | url = {https://ctan.org/pkg/ctex}, 103 | urldate = {2017-03-01}, 104 | language = {chinese}, 105 | } 106 | 107 | @online{enumitem, 108 | author = {Bezos, Javier}, 109 | title = {Customizing lists with the enumitem package}, 110 | edition = {Ver.~3.5.2}, 111 | type = {M/OL}, 112 | date = {2011-09-28}, 113 | url = {https://ctan.org/pkg/enumitem}, 114 | urldate = {2017-03-01}, 115 | language = {english}, 116 | } 117 | 118 | @online{fancyhdr, 119 | author = {van Oostrum, Piet}, 120 | title = {Page layout in \hologo{LaTeX}}, 121 | edition = {Ver.~3.8}, 122 | type = {M/OL}, 123 | date = {2016-09-06}, 124 | url = {https://ctan.org/pkg/fancyhdr}, 125 | urldate = {2017-03-01}, 126 | language = {english}, 127 | } 128 | 129 | @online{geometry, 130 | author = {Umeki, Hideo}, 131 | title = {The geometry package}, 132 | edition = {Ver.~5.6}, 133 | type = {M/OL}, 134 | date = {2010-09-12}, 135 | url = {https://ctan.org/pkg/geometry}, 136 | urldate = {2017-03-01}, 137 | language = {english}, 138 | } 139 | 140 | @online{graphicx, 141 | author = {Carlisle, D. P. and Rahtz, S. P. Q.}, 142 | title = {The graphicx package}, 143 | edition = {Ver.~1.2d}, 144 | type = {M/OL}, 145 | date = {2021-09-16}, 146 | url = {https://ctan.org/pkg/graphicx}, 147 | urldate = {2022-05-06}, 148 | language = {english}, 149 | } 150 | 151 | @online{hyperref, 152 | author = {Rahtz, Sebastian and Oberdiek, Heiko}, 153 | title = {Hypertext marks in \hologo{LaTeX}: a manual for hyperref}, 154 | edition = {Ver.~6.82q}, 155 | type = {M/OL}, 156 | date = {2012-11}, 157 | url = {https://ctan.org/pkg/hyperref}, 158 | urldate = {2017-03-01}, 159 | language = {english}, 160 | } 161 | 162 | @online{psnfss, 163 | author = {Schmidt, Walter}, 164 | title = {Using common PostScript fonts with \hologo{LaTeX}}, 165 | edition = {Ver.~9.3}, 166 | type = {M/OL}, 167 | date = {2020-03-25}, 168 | url = {https://ctan.org/pkg/psnfss}, 169 | urldate = {2022-05-06}, 170 | language = {english}, 171 | } 172 | 173 | @online{scrextend, 174 | author = {Kohm, Markus}, 175 | title = {KOMA-Script: a versatile \hologo{LaTeX2e} bundle}, 176 | edition = {Ver.~3.35}, 177 | type = {M/OL}, 178 | date = {2021-11-13}, 179 | url = {https://ctan.org/pkg/koma-script}, 180 | urldate = {2022-05-04}, 181 | language = {english}, 182 | } 183 | 184 | @online{subcaption, 185 | author = {Sommerfeldt, Alex}, 186 | title = {The subcaption package}, 187 | edition = {Ver.~1.1-75}, 188 | type = {M/OL}, 189 | date = {2013-04-16}, 190 | url = {https://ctan.org/pkg/subcaption}, 191 | urldate = {2017-03-01}, 192 | language = {english}, 193 | } 194 | 195 | @online{tikz, 196 | author = {Till Tantau}, 197 | title = {The TikZ and PGF Packages}, 198 | edition = {Ver.~3.0.1a}, 199 | type = {M/OL}, 200 | date = {2015-08-29}, 201 | url = {https://ctan.org/pkg/pgf}, 202 | urldate = {2017-03-01}, 203 | language = {english}, 204 | } 205 | 206 | @online{tocloft, 207 | author = {Robertson, Will}, 208 | title = {The tocloft package}, 209 | edition = {Ver.~2.3f}, 210 | type = {M/OL}, 211 | date = {2013-05-02}, 212 | url = {https://ctan.org/pkg/tocloft}, 213 | urldate = {2017-03-01}, 214 | language = {english}, 215 | } 216 | 217 | @online{ulem, 218 | author = {Arseneau, Donald}, 219 | title = {The ulem package: underlining for emphasis}, 220 | type = {M/OL}, 221 | date = {2011-03-18}, 222 | url = {https://ctan.org/pkg/ulem}, 223 | urldate = {2017-03-01}, 224 | language = {english}, 225 | } 226 | 227 | @online{unicode-math, 228 | author = {Robertson, Will and Stephani, Philipp and Wright, Joseph and Hosny, Khaled}, 229 | title = {Experimental Unicode mathematical typesetting: The unicode-math package}, 230 | edition = {Ver.~0.8q}, 231 | type = {M/OL}, 232 | date = {2020-01-31}, 233 | url = {https://ctan.org/pkg/unicode-math}, 234 | urldate = {2022-05-04}, 235 | language = {english}, 236 | } 237 | 238 | @online{dypang, 239 | author = {dypang}, 240 | title = {北京大学硕博论文模版(测试版)}, 241 | type = {EB/OL}, 242 | date = {2005-04-05}, 243 | url = {https://bdwm.net/a.php?b/Thesis/M.1112645491.A/D10F612.rar}, 244 | urldate = {2017-03-01}, 245 | language = {chinese}, 246 | } 247 | 248 | @online{FerretL, 249 | author = {FerretL}, 250 | title = {新的 pku 博士论文模板}, 251 | type = {EB/OL}, 252 | date = {2007-03-27}, 253 | url = {https://bdwm.net/a.php?b/Thesis/M.1174982168.A/4270722.rar}, 254 | urldate = {2017-03-01}, 255 | language = {chinese}, 256 | } 257 | 258 | @online{lwolf, 259 | author = {lwolf}, 260 | title = {学士(硕/博)毕业论文模板 [基于 dypang 的模板]}, 261 | type = {EB/OL}, 262 | date = {2007-05-15}, 263 | url = {https://bdwm.net/a.php?b/MathTools/M.1179239165.A/5A2D5A2.rar}, 264 | urldate = {2017-03-01}, 265 | language = {chinese}, 266 | } 267 | 268 | @online{Langpku, 269 | author = {Langpku}, 270 | title = {Re: 关于置底模版的问题和一些修改}, 271 | type = {EB/OL}, 272 | date = {2007-06-01}, 273 | url = {https://bdwm.net/a.php?b/MathTools/M.1180676700.A/DBB7810.zip}, 274 | urldate = {2017-03-01}, 275 | language = {chinese}, 276 | } 277 | 278 | @online{solvethis, 279 | author = {solvethis}, 280 | title = {Re: 学位论文模板更新}, 281 | type = {EB/OL}, 282 | date = {2008-03-13}, 283 | url = {https://bdwm.net/a.php?b/Thesis/M.1205377509.A/9413ED2.rar}, 284 | urldate = {2017-03-01}, 285 | language = {chinese}, 286 | } 287 | 288 | @online{pku-degreetype, 289 | author = {北京大学学位办公室}, 290 | title = {关于完善研究生学位论文封面的通知}, 291 | type = {EB/OL}, 292 | date = {2024-02-28}, 293 | url = {https://grs.pku.edu.cn/xwgz11/xwsy11/bsxw111/gztz09/376720.htm}, 294 | urldate = {2024-03-07}, 295 | language = {chinese}, 296 | } 297 | 298 | @online{pku-originauth, 299 | author = {北京大学研究生院}, 300 | title = {北京大学学位论文原创性声明和使用授权说明(末页限重新申请学位使用)}, 301 | type = {EB/OL}, 302 | date = {2014-04-16}, 303 | url = {http://grs.pku.edu.cn/document/20140416144734027222.doc}, 304 | urldate = {2015-04-26}, 305 | language = {chinese}, 306 | } 307 | 308 | @online{pku-thesisstyle, 309 | author = {北京大学学位办公室}, 310 | title = {北京大学研究生学位论文写作指南}, 311 | edition = {Ver.~2.0}, 312 | type = {M/OL}, 313 | date = {2015-06-11}, 314 | url = {http://grs.pku.edu.cn/document/20150611115317661150.pdf}, 315 | urldate = {2015-12-14}, 316 | language = {chinese}, 317 | } 318 | 319 | % vim:ts=4:sw=4 320 | -------------------------------------------------------------------------------- /doc/readme/pkuthss.tex: -------------------------------------------------------------------------------- 1 | % Documentation for pkuthss. 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2016,2018-2019,2021,2024 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.tex 19 | % pkuthss.bib 20 | % chap/pkuthss-copy.tex 21 | % chap/pkuthss-abs.tex 22 | % chap/pkuthss-intro.tex 23 | % chap/pkuthss-chap1.tex 24 | % chap/pkuthss-chap2.tex 25 | % chap/pkuthss-chap3.tex 26 | % chap/pkuthss-concl.tex 27 | % chap/pkuthss-encl1.tex 28 | % chap/pkuthss-ack.tex 29 | 30 | \documentclass[UTF8]{pkuthss} 31 | \usepackage[ 32 | backend = biber, style = caspervector, utf8, 33 | sorting = ecnyt, giveninits = true, sortgiveninits = true 34 | ]{biblatex} 35 | \usepackage{iftex, fancyvrb, hologo} 36 | 37 | \hypersetup{colorlinks = true, allcolors = blue} 38 | \ctexset{linestretch = 2\ccwd} 39 | \setlength{\hfuzz}{3pt} 40 | \setlength{\bibitemsep}{3bp} 41 | \renewcommand*{\bibfont}{\zihao{5}\linespread{1.27}\selectfont} 42 | 43 | \newcommand*{\cupercite}[1]{\supercite{#1}\mbox{}} 44 | \newcommand{\myemph}[1]{\emph{\textcolor{red}{#1}}} 45 | \newcommand{\unemph}[1]{\textup{\textcolor{black}{#1}}} 46 | \RecustomVerbatimEnvironment{Verbatim}{Verbatim}% 47 | {frame = single, tabsize = 4, formatcom = {\ifXeTeX\xeCJKVerbAddon\fi}} 48 | \RecustomVerbatimCommand{\VerbatimInput}{VerbatimInput}{ 49 | fontsize = {\small}, baselinestretch = 1, 50 | tabsize = 4, formatcom = {\ifXeTeX\xeCJKVerbAddon\fi} 51 | } 52 | 53 | \newif\ifblind\blindfalse 54 | \newcommand*{\docversion}{v1.9.4} 55 | \pkuthssinfo{ 56 | cthesisname = {本科生毕业论文}, ethesisname = {Undergraduate Thesis}, 57 | ctitle = {北京大学学位论文模版{\thssnl}pkuthss \docversion}, 58 | etitle = {% 59 | PKU dissertation document class% 60 | \texorpdfstring{\thssnl}{: }pkuthss \docversion% 61 | }, 62 | cauthor = {盖茨波·钛·维克托}, eauthor = {Casper Ti.\ Vector}, 63 | date = {\zhdigits{2024}年\zhnumber{3}月}, 64 | studentid = {00910???}, school = {化学与分子工程学院}, 65 | cmajor = {应用化学}, emajor = {Applied Chemistry}, 66 | direction = {据说 Casper 自己也不知道}, mentorlines = {2}, 67 | cmentor = {XX 教授\\YY 教授}, 68 | ementor = {Prof.\ XX and Prof.\ YY}, 69 | ckeywords = {\hologo{LaTeX},排版,文档类,\CTeX{}}, 70 | ekeywords = {\hologo{LaTeX}, Typesetting, Document class, \CTeX{}}, 71 | degreetype = {0}, blindid = {???01900}, discipline = {化学} 72 | } 73 | \addbibresource{pkuthss.bib} 74 | 75 | \begin{document} 76 | \frontmatter 77 | \pagestyle{empty} 78 | \ifblind\makeblind\else\maketitle\fi 79 | \cleardoublepage 80 | \include{chap/pkuthss-copy} 81 | 82 | \cleardoublepage 83 | \pagestyle{plain} 84 | \setcounter{page}{0} 85 | \pagenumbering{Roman} 86 | \include{chap/pkuthss-abs} 87 | \tableofcontents 88 | 89 | \mainmatter 90 | \include{chap/pkuthss-intro} 91 | \include{chap/pkuthss-chap1} 92 | \include{chap/pkuthss-chap2} 93 | \include{chap/pkuthss-chap3} 94 | \include{chap/pkuthss-concl} 95 | 96 | \appendix 97 | \printbibliography[heading = bibintoc] 98 | \include{chap/pkuthss-encl1} 99 | 100 | \backmatter 101 | \ifblind\else\include{chap/pkuthss-ack}\fi 102 | \include{chap/origin} 103 | \end{document} 104 | 105 | % vim:ts=4:sw=4 106 | -------------------------------------------------------------------------------- /tex/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2008-2009 solvethis 2 | # Copyright (c) 2010-2012,2014 Casper Ti. Vector 3 | # Public domain. 4 | 5 | PDFS = pkulogo.pdf pkuword.pdf 6 | PS2PDF = ps2pdf -dEPSCrop 7 | 8 | all: $(PDFS) 9 | 10 | %.pdf: %.eps 11 | $(PS2PDF) $< $@ 12 | 13 | clean: 14 | $(RM) $(PDFS) 15 | 16 | # vim:ts=4:sw=4 17 | -------------------------------------------------------------------------------- /tex/pkulogo.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-2.0 EPSF-2.0 2 | %%BoundingBox: 0 0 400 400 3 | %%Pages: 1 4 | %%Page: 1 1 5 | 6 | % Peking University dissertation document class 7 | % 8 | % Copyright (c) 2008-2009 solvethis 9 | % Copyright (c) 2010-2012,2014 Casper Ti. Vector 10 | % 11 | % This work may be distributed and/or modified under the conditions of the 12 | % LaTeX Project Public License, either version 1.3 of this license or (at 13 | % your option) any later version. 14 | % The latest version of this license is in 15 | % https://www.latex-project.org/lppl.txt 16 | % and version 1.3 or later is part of all distributions of LaTeX version 17 | % 2005/12/01 or later. 18 | % 19 | % This work has the LPPL maintenance status `maintained'. 20 | % The current maintainer of this work is Casper Ti. Vector. 21 | % 22 | % This work consists of the following files: 23 | % pkuthss.cls 24 | % pkuthss.def 25 | % pkuthss-gbk.def 26 | % pkuthss-utf8.def 27 | % pkulogo.eps 28 | % pkuword.eps 29 | 30 | % 设置北大红的色值(http://web5.pku.edu.cn/bs/cjwt/,问题 5)。 31 | % 要想将颜色改为黑色,只须将下面一行改为“0 setgray”即可。 32 | 0.0 1.0 1.0 0.45 setcmykcolor 33 | % 设置线的属性。 34 | 1 setlinecap 35 | 1 setlinejoin 36 | 37 | % 将坐标原点移到图片的中心。 38 | 200 200 translate 39 | % 作出外圆。 40 | newpath 41 | 6 setlinewidth 42 | 0 0 195 0 360 arc 43 | stroke 44 | % 作出内圆。 45 | newpath 46 | 5 setlinewidth 47 | 0 0 143 0 360 arc 48 | stroke 49 | 50 | % 描出“北大”字样。 51 | newpath 52 | 0 setlinewidth 53 | -10 101 moveto 54 | -10 101 -10 38 lineto 55 | -10 35 -14 29 -19 28 curveto 56 | -30 28 -60 15 -89 -26 curveto 57 | -104 -39 -108 -24 -105 -16 curveto 58 | -76 27 -36 45 -32 45 curveto 59 | -30 46 -29 47 -29 49 curveto 60 | -29 49 -29 68 lineto 61 | -29 69 -30 69 -31 69 curveto 62 | -38 67 -58 63 -83 42 curveto 63 | -95 35 -103 49 -94 57 curveto 64 | -72 74 -53 83 -31 88 curveto 65 | -30 88 -29 89 -29 90 curveto 66 | -29 90 -29 102 lineto 67 | -29 111 -10 111 -10 101 curveto 68 | 10 101 moveto 69 | 10 101 10 38 lineto 70 | 10 35 14 29 19 28 curveto 71 | 30 28 60 15 89 -26 curveto 72 | 104 -39 108 -24 105 -16 curveto 73 | 76 27 36 45 32 45 curveto 74 | 30 46 29 47 29 49 curveto 75 | 29 49 29 68 lineto 76 | 29 69 30 69 31 69 curveto 77 | 38 67 58 63 83 42 curveto 78 | 95 35 103 49 94 57 curveto 79 | 72 74 53 83 31 88 curveto 80 | 30 88 29 89 29 90 curveto 81 | 29 90 29 102 lineto 82 | 29 111 10 111 10 101 curveto 83 | -11 5 moveto 84 | -11 4 -11 4 -12 4 curveto 85 | -33 2 -65 -25 -80 -58 curveto 86 | -82 -71 -70 -74 -63 -64 curveto 87 | -45 -32 -27 -17 -12 -15 curveto 88 | -11 -15 -11 -15 -11 -16 curveto 89 | -11 -16 -11 -35 lineto 90 | -11 -38 -11 -38 -13 -40 curveto 91 | -28 -48 -34 -57 -45 -85 curveto 92 | -48 -97 -32 -103 -28 -94 curveto 93 | -15 -44 15 -44 28 -94 curveto 94 | 32 -103 48 -97 45 -85 curveto 95 | 34 -57 28 -48 13 -40 curveto 96 | 11 -38 11 -38 11 -35 curveto 97 | 11 -35 11 -16 lineto 98 | 11 -15 11 -15 12 -15 curveto 99 | 27 -17 45 -32 63 -64 curveto 100 | 70 -74 82 -71 80 -58 curveto 101 | 65 -25 33 2 12 4 curveto 102 | 11 4 11 4 11 5 curveto 103 | 11 5 11 12 lineto 104 | 11 25 -11 25 -11 12 curveto 105 | -11 12 -11 5 lineto 106 | 133 0 moveto 107 | 0 0 133 0 360 arc 108 | % 对刚作出的线条执行奇偶相间的填充,使中间空出的“北大”字样就是透明的。 109 | % 从而,即使页面带背景色,插入这个图片时也会很正常。 110 | eofill 111 | 112 | % 添加文字“PEKING UNIVERSITY 1898”。 113 | /Times-Bold findfont 40 scalefont setfont 114 | /offset { dup stringwidth pop 2 div neg 155 moveto show } def 115 | 116 | gsave 112 rotate (P) offset grestore 117 | gsave 98 rotate (E) offset grestore 118 | gsave 84 rotate (K) offset grestore 119 | gsave 70 rotate (I) offset grestore 120 | gsave 56 rotate (N) offset grestore 121 | gsave 41 rotate (G) offset grestore 122 | gsave 15 rotate (U) offset grestore 123 | gsave (N) offset grestore 124 | gsave -14 rotate (I) offset grestore 125 | gsave -28 rotate (V) offset grestore 126 | gsave -42 rotate (E) offset grestore 127 | gsave -56 rotate (R) offset grestore 128 | gsave -70 rotate (S) offset grestore 129 | gsave -84 rotate (I) offset grestore 130 | gsave -98 rotate (T) offset grestore 131 | gsave -112 rotate (Y) offset grestore 132 | 133 | /onset { dup stringwidth pop 2 div neg -182 moveto show } def 134 | 135 | gsave -24 rotate (1) onset grestore 136 | gsave -8 rotate (8) onset grestore 137 | gsave 8 rotate (9) onset grestore 138 | gsave 24 rotate (8) onset grestore 139 | 140 | showpage 141 | %%EOF 142 | -------------------------------------------------------------------------------- /tex/pkuthss-gbk.def: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CasperVector/pkuthss/86cd17d7ba5a6afb791e5797f8d32666f0b709f8/tex/pkuthss-gbk.def -------------------------------------------------------------------------------- /tex/pkuthss-utf8.def: -------------------------------------------------------------------------------- 1 | % Peking University dissertation document class 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2013,2015,2021,2024 Casper Ti. Vector 5 | % Copyright (c) 2021 Kurapica 6 | % 7 | % This work may be distributed and/or modified under the conditions of the 8 | % LaTeX Project Public License, either version 1.3 of this license or (at 9 | % your option) any later version. 10 | % The latest version of this license is in 11 | % https://www.latex-project.org/lppl.txt 12 | % and version 1.3 or later is part of all distributions of LaTeX version 13 | % 2005/12/01 or later. 14 | % 15 | % This work has the LPPL maintenance status `maintained'. 16 | % The current maintainer of this work is Casper Ti. Vector. 17 | % 18 | % This work consists of the following files: 19 | % pkuthss.cls 20 | % pkuthss.def 21 | % pkuthss-gbk.def 22 | % pkuthss-utf8.def 23 | % pkulogo.eps 24 | % pkuword.eps 25 | 26 | \ProvidesFile{pkuthss-utf8.def} 27 | [2024/03/07 v1.9.4 Labels and captions in UTF-8 encoding 28 | for the pkuthss document class] 29 | 30 | \def\label@ctitle{题目:} 31 | \def\label@cauthor{姓\hphantom{汉字}名:} 32 | \def\label@studentid{学\hphantom{汉字}号:} 33 | \def\label@school{院\hphantom{汉字}系:} 34 | \def\label@cmajor{专\hphantom{汉字}业:} 35 | \def\label@direction{研究方向:} 36 | \def\label@cmentor{导师姓名:} 37 | \def\label@ckeywords{关键词:} 38 | \def\label@blindcover{(匿名评阅论文封面)} 39 | \def\label@blindctitle{中文题目:} 40 | \def\label@blindetitle{英文题目:} 41 | \def\label@blinddiscipline{一级学科:} 42 | \def\label@blindmajor{二级学科:} 43 | \def\label@blindid{论文编号:} 44 | \def\label@academic{学术学位} 45 | \def\label@technical{专业学位} 46 | 47 | \def\titlepagename{封面} 48 | \def\cuniversity{北京大学} 49 | \def\cthesisname{博士学位论文} 50 | \def\cabstractname{摘要} 51 | 52 | \endinput 53 | % vim:ft=tex:ts=2:sw=2 54 | -------------------------------------------------------------------------------- /tex/pkuthss.cls: -------------------------------------------------------------------------------- 1 | % Peking University dissertation document class 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2022,2024 Casper Ti. Vector 5 | % Copyright (c) 2021 Kurapica 6 | % 7 | % This work may be distributed and/or modified under the conditions of the 8 | % LaTeX Project Public License, either version 1.3 of this license or (at 9 | % your option) any later version. 10 | % The latest version of this license is in 11 | % https://www.latex-project.org/lppl.txt 12 | % and version 1.3 or later is part of all distributions of LaTeX version 13 | % 2005/12/01 or later. 14 | % 15 | % This work has the LPPL maintenance status `maintained'. 16 | % The current maintainer of this work is Casper Ti. Vector. 17 | % 18 | % This work consists of the following files: 19 | % pkuthss.cls 20 | % pkuthss.def 21 | % pkuthss-gbk.def 22 | % pkuthss-utf8.def 23 | % pkulogo.eps 24 | % pkuword.eps 25 | 26 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 27 | \ProvidesClass{pkuthss} 28 | [2024/03/07 v1.9.4 Peking University dissertation document class] 29 | 30 | % eg. `\thss@int@boolopt{spacing}{true}' will expand to: 31 | % \newif\ifthss@opt@spacing \thss@opt@spacingtrue 32 | % \DeclareOption{spacing}{\thss@opt@spacingtrue} 33 | % \DeclareOption{nospacing}{\thss@opt@spacingfalse} 34 | \def\thss@int@boolopt#1#2{ 35 | \expandafter\newif\csname ifthss@opt@#1\endcsname 36 | \@nameuse{thss@opt@#1#2} 37 | \DeclareOption{#1}{\@nameuse{thss@opt@#1true}} 38 | \DeclareOption{no#1}{\@nameuse{thss@opt@#1false}} 39 | } 40 | % Process the encoding options. 41 | \newif\ifthss@opt@gbk \thss@opt@gbktrue 42 | \DeclareOption{GBK}{\thss@opt@gbktrue\PassOptionsToClass{GBK}{ctexbook}} 43 | \DeclareOption{UTF8}{\thss@opt@gbkfalse\PassOptionsToClass{UTF8}{ctexbook}} 44 | % Whether to enable `\Uppercase' (works problematically) in heading marks. 45 | \thss@int@boolopt{uppermark}{false} 46 | % Whether to modify fonts according to school regulation. 47 | \thss@int@boolopt{pkufont}{true} 48 | % Whether to modify footnote format according to school regulation. 49 | \thss@int@boolopt{pkufoot}{true} 50 | % Whether to modify spacing according to school regulation. 51 | \thss@int@boolopt{pkuspace}{true} 52 | % Whether to use some common settings for adjusting spacing. 53 | \thss@int@boolopt{spacing}{true} 54 | % Add PDF bookmark for table of contents. 55 | \thss@int@boolopt{pdftoc}{true} 56 | % Whether to enable the `\spacialchap' command. 57 | \thss@int@boolopt{spechap}{true} 58 | % Whether to automatically set up properties for generated PDF from user 59 | % defined document information (author, title, etc.). 60 | \thss@int@boolopt{pdfprop}{true} 61 | % Whether to disable some infractions intended to make the style less ugly. 62 | \thss@int@boolopt{ugly}{false} 63 | % Pass all other options to `ctexbook' document class. 64 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}} 65 | % Process all class options now. 66 | \ProcessOptions\relax 67 | 68 | % Work around the `\lvert already defined' error. 69 | % cf. . 70 | \ifthss@opt@pkufont\RequirePackage{amsmath}\fi 71 | % pkuthss is based on ctexbook; we use `xiao 4' as default font size. 72 | \LoadClass[zihao = -4]{ctexbook}[2014/03/06] 73 | % ctex 2.x no longer loads ifpdf and ifxetex by itself. 74 | \RequirePackage{ifpdf, ifxetex} 75 | % Provides support for `key = val' grammar. 76 | \RequirePackage{keyval} 77 | % Graphics support. 78 | \RequirePackage{graphicx}[1999/02/16] 79 | % Provides utilities for setting up page layout. 80 | \RequirePackage{geometry} 81 | % fancyhdr provides utilities for setting up headers and footers. 82 | \RequirePackage{fancyhdr} 83 | % Provides `\uline' used in `\maketitle' (but do not mess with `\emph'). 84 | \RequirePackage[normalem]{ulem} 85 | % `\AtEndOfClass' used to avoid `PDF destination not defined' with setspace. 86 | \AtEndOfClass{\RequirePackage{hyperref}} 87 | \input{pkuthss.def} 88 | 89 | \ifthss@opt@pkufont 90 | % Use Times New Roman / Arial according to school regulation. 91 | \ifxetex 92 | \RequirePackage{unicode-math} 93 | \setmathfont[ 94 | Extension = .otf, 95 | BoldFont = XITSMath-Bold 96 | ]{XITSMath-Regular} 97 | \DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n} 98 | \let\sumop\relax\let\prodop\relax 99 | \DeclareMathSymbol{\sumop}{\mathop}{CMlargesymbols}{"50} 100 | \DeclareMathSymbol{\prodop}{\mathop}{CMlargesymbols}{"51} 101 | \renewcommand{\Box}{\mdlgwhtsquare} 102 | \newcommand{\checkbox}{\checkmark\hspace{-0.85em}\Box} 103 | 104 | \setmainfont[ 105 | Extension = .otf, 106 | UprightFont = *-Regular, 107 | BoldFont = *-Bold, 108 | ItalicFont = *-Italic, 109 | BoldItalicFont = *-BoldItalic 110 | ]{XITS} 111 | \setsansfont[ 112 | Extension = .otf, 113 | UprightFont = *-regular, 114 | BoldFont = *-bold, 115 | ItalicFont = *-italic, 116 | BoldItalicFont = *-bolditalic, 117 | Scale = 0.95 118 | ]{texgyreheros} 119 | \else 120 | \RequirePackage{textcomp, mathptmx, amssymb} 121 | \RequirePackage[scaled = 0.95]{helvet} 122 | \newcommand{\checkbox}{\checkmark\hspace{-0.8em}\Box} 123 | \fi 124 | \else 125 | % Provides `\Box' for originauth.tex if unicode-math is absent. 126 | \RequirePackage{amssymb} 127 | \newcommand{\checkbox}{\checkmark\hspace{-0.8em}\Box} 128 | \fi 129 | 130 | \ifthss@opt@pkufoot 131 | % Handle the `Unparsed material' issue with latex/dvipdfmx compilation. 132 | \unless\ifxetex\unless\ifpdf 133 | \newcommand*{\pgfsysdriver}{pgfsys-dvipdfm.def} 134 | \fi\fi 135 | % Circled text, cf. . 136 | \RequirePackage{tikz} 137 | \newcommand*{\thss@int@circled}[1]{% 138 | \scalebox{0.8}{\tikz[baseline = {([yshift = -0.1\ccwd] char.base)}]{ 139 | \node[ 140 | shape = circle, draw = black, minimum size = 1.25\ccwd, inner sep = 0pt 141 | ] (char) {#1}; 142 | }}% 143 | } 144 | % Use circled numbers as footnote symbols. Does not affect title page, but 145 | % footnote is rarely used in dissertation covers ;) 146 | \renewcommand*{\thefootnote}% 147 | {\protect\thss@int@circled{\arabic{footnote}}} 148 | % Provides utility to modify footnote spacing. 149 | \RequirePackage{scrextend} 150 | % Set up footnote spacing: whole paragraph indent 1.5 ccwd, 0.5 ccwd after mark. 151 | \deffootnote{1.5\ccwd}{0pt}{\thefootnotemark\hspace{0.5\ccwd}} 152 | \fi 153 | 154 | \ifthss@opt@pkuspace 155 | % lineskip / baselineskip = 20 bp / (12 bp * (6 / 5)). 156 | \linespread{1.39}\selectfont 157 | % Provides utilities for setting TOC format; `titles' applied to avoid 158 | % interfering with LaTeX's own title mechanism. 159 | \RequirePackage[titles]{tocloft} 160 | \setlength{\cftbeforechapskip}{6bp plus 1bp} 161 | \setlength{\cftsecindent}{\ccwd} 162 | \setlength{\cftsubsecindent}{2\ccwd} 163 | \setlength{\cftsubsubsecindent}{4\ccwd} 164 | % `caption' modifies font size and separator of captions. `subcaption' 165 | % provides functions similar to `subfigure'/`subfig' but does not clash with 166 | % `tocloft'; it clashes with `subfigure'/`subfig', but the error message will 167 | % say they cannot be used simultaneously. 168 | \RequirePackage{caption, subcaption} 169 | \ifthss@opt@ugly 170 | \DeclareCaptionFont{capfsize}{\fontsize{11bp}{13.2bp}} 171 | \else 172 | \DeclareCaptionFont{capfsize}{\zihao{5}} 173 | \fi 174 | \DeclareCaptionLabelSeparator{quad}{\quad} 175 | \captionsetup{font = capfsize, labelsep = quad} 176 | \captionsetup[sub]{font = capfsize} 177 | \fi 178 | 179 | \ifthss@opt@spacing 180 | % Make spacing nicer in some situations (eg. footnotes and verbatims). 181 | \RequirePackage{setspace} 182 | % Remove superfluous spacing between footnotes. 183 | \setlength{\footnotesep}{0pt} 184 | % Lists often appear to be too sparse when items are just one or two lines 185 | % long. Here we cancel the extra vertical spacing between list items. 186 | % The list margin is adjusted due to Chinese typesetting traditions. 187 | \RequirePackage{enumitem} 188 | \setlist{nolistsep, leftmargin = 1.5\parindent} 189 | \fi 190 | 191 | \ifthss@opt@spechap 192 | % This command is used to start a chapter without numbering, and correctly set 193 | % up the headers and footers in the chapter. 194 | \newcommand{\specialchap}[1]{% 195 | \chapter*{#1}\addcontentsline{toc}{chapter}{#1} 196 | \markboth{#1}{}\phantomsection% 197 | } 198 | \fi 199 | 200 | \AtBeginDocument{ 201 | % Set up spacing for displayed formulae. 202 | \setlength{\abovedisplayskip}{\belowdisplayshortskip} 203 | \setlength{\belowdisplayskip}{\abovedisplayskip} 204 | 205 | \ifthss@opt@pdftoc 206 | % Add PDF bookmark for table of contents. 207 | \let\thss@tmp@tableofcontents\tableofcontents 208 | \renewcommand{\tableofcontents}{% 209 | \thss@int@pdfmark{\contentsname}{contents} 210 | \thss@tmp@tableofcontents% 211 | } 212 | \fi 213 | 214 | \ifthss@opt@pdfprop 215 | % Automatically generate properties for generated PDF. 216 | % Use English properties to avoid problems with character encodings. 217 | % `\setpdfproperties' is not called by `\makeblind', so the author 218 | % information does not leak into the blind version. 219 | \newcommand*{\setpdfproperties}{% 220 | \hypersetup{ 221 | pdfauthor = {\@eauthor}, pdftitle = {\@etitle}, 222 | pdfsubject = {\euniversity\ \ethesisname}, pdfkeywords = {\@ekeywords} 223 | }% 224 | } 225 | % Set up the properties when generating the title page because the document 226 | % information should have been all defined before this. 227 | \let\thss@tmp@maketitle\maketitle 228 | % NOTE: `\hypersetup' must appear before `\maketitle', otherwise it might 229 | % not act as expected. 230 | \renewcommand{\maketitle}{\setpdfproperties\thss@tmp@maketitle} 231 | \fi 232 | } 233 | 234 | % eg. `\thss@int@infoitema{ctitle}' will expand to: 235 | % \def\ctitle#1{\def\@ctitle{#1}} 236 | % \define@key{thss@info}{ctitle}{\ctitle{#1}} 237 | \def\thss@int@infoitema#1{ 238 | \@namedef{#1}##1{\@namedef{@#1}{##1}} 239 | \define@key{thss@info}{#1}{\@nameuse{#1}{##1}} 240 | } 241 | % eg. `\thss@int@infoitemb{cuniversity}' will expand to: 242 | % \define@key{thss@info}{cuniversity}{\def\cuniversity{#1}} 243 | \def\thss@int@infoitemb#1{ 244 | \define@key{thss@info}{#1}{\@namedef{#1}{##1}} 245 | } 246 | % Set up document information entries. 247 | \thss@int@infoitema{ctitle} 248 | \thss@int@infoitema{etitle} 249 | \thss@int@infoitema{cauthor} 250 | \thss@int@infoitema{eauthor} 251 | \thss@int@infoitema{studentid} 252 | \thss@int@infoitema{date} 253 | \thss@int@infoitema{school} 254 | \thss@int@infoitema{cmajor} 255 | \thss@int@infoitema{emajor} 256 | \thss@int@infoitema{direction} 257 | \thss@int@infoitema{cmentor} 258 | \thss@int@infoitema{ementor} 259 | \thss@int@infoitema{ckeywords} 260 | \thss@int@infoitema{ekeywords} 261 | \thss@int@infoitema{degreetype} 262 | \thss@int@infoitema{blindid} 263 | \thss@int@infoitema{discipline} 264 | \thss@int@infoitemb{cuniversity} 265 | \thss@int@infoitemb{euniversity} 266 | \thss@int@infoitemb{cthesisname} 267 | \thss@int@infoitemb{ethesisname} 268 | \thss@int@infoitemb{thesiscover} 269 | \thss@int@infoitemb{mentorlines} 270 | \thss@int@infoitemb{cabstractname} 271 | \thss@int@infoitemb{eabstractname} 272 | % Set up document information using the `key = value' grammar. 273 | \newcommand*{\pkuthssinfo}[1]{\setkeys{thss@info}{#1}} 274 | % Becomes \newline in the \makeblind scope. 275 | \newcommand{\thssnl}{\\} 276 | 277 | % Set up page layout. 278 | \geometry{a4paper, hmargin = 2.6cm, headheight = 0.5cm, headsep = 0.6cm} 279 | \ifthss@opt@ugly 280 | \geometry{top = 3.1cm, bottom = 3.0cm, footskip = 0.8cm} 281 | \else 282 | \geometry{top = 3.0cm, bottom = 3.1cm, footskip = 1.1cm} 283 | \fi 284 | 285 | % Set up chapter/section/... captions. 286 | % The `*skip' values are not supposed to be modified by the `ugly' option: 287 | % the actual style of the school's guide and Word template seem to be different 288 | % from the written specification (when applied verbatim in LaTeX), and here the 289 | % actual style is used. 290 | \setcounter{secnumdepth}{3} 291 | \setcounter{tocdepth}{2} 292 | \ctexset{ 293 | chapter = {beforeskip = {0bp}, afterskip = {18bp plus 0.2ex}}, 294 | section = 295 | {beforeskip = {20bp plus 1ex minus 0.2ex}, afterskip = {5bp plus 0.2ex}}, 296 | subsection = 297 | {beforeskip = {12bp plus 1ex minus 0.2ex}, afterskip = {5bp plus 0.2ex}}, 298 | subsubsection = 299 | {beforeskip = {12bp plus 1ex minus 0.2ex}, afterskip = {5bp plus 0.2ex}} 300 | } 301 | \ctexset{ 302 | chapter = {nameformat = {}, titleformat = {}}, 303 | subsubsection = {format = {\zihao{-4}\bfseries}} 304 | } 305 | \ifthss@opt@ugly 306 | \ctexset{ 307 | chapter = {format = {\zihao{3}\bfseries\centering}}, 308 | section = {format = {\zihao{4}\bfseries}}, 309 | subsection = {format = {\fontsize{13bp}{15.6bp}\selectfont\bfseries}} 310 | } 311 | \else 312 | \ctexset{ 313 | chapter = {format = {\zihao{-2}\bfseries\centering}}, 314 | section = {format = {\zihao{-3}\bfseries}}, 315 | subsection = {format = {\zihao{4}\bfseries}} 316 | } 317 | \fi 318 | 319 | % `\MakeUppercase' works problematically. 320 | % eg. it converts `\cite{ctex}' into `\cite{CTEX}'. 321 | % This option can disable `\MakeUppercase' in left/right heading marks. 322 | \ifthss@opt@uppermark 323 | \def\thss@int@setcase#1{#1} 324 | \else 325 | % Code copied from fancyhdr's `\nouppercase', with the redefinition of 326 | % `\uppercase' dropped to avoid disrupting CJKutf8. 327 | % cf. . 328 | \def\thss@int@setcase#1{% 329 | \let\MakeUppercase\relax% 330 | \expandafter\let\csname MakeUppercase \endcsname\relax% 331 | #1% 332 | } 333 | \fi 334 | % The actual page style setup. 335 | \fancypagestyle{plain}{ 336 | \fancyhf{}\renewcommand*{\headrulewidth}{0.75bp} 337 | \fancyfoot[C]{\zihao{5}\normalfont{\thepage}} 338 | \if@twoside 339 | \fancyhead[CE]{\zihao{5}\normalfont{\cuniversity\cthesisname}} 340 | \fancyhead[CO]{\zihao{5}\normalfont\thss@int@setcase{\leftmark}} 341 | \else 342 | \fancyhead[C]{\zihao{5}\normalfont\thss@int@setcase{\leftmark}} 343 | \fi 344 | } 345 | \pagestyle{plain} 346 | 347 | % This places a bookmark pointing to somewhere near the page header; 348 | % Result of simple `\chapter{...} \pdfbookmark{...}' does not look nice, 349 | % because the bookmark will point to somewhere below the chapter mark. 350 | \def\thss@int@pdfmark#1#2{% 351 | \if@openright\cleardoublepage\else\clearpage\fi 352 | \pdfbookmark[0]{#1}{#2}% 353 | } 354 | 355 | % Usage: \thss@int@fillinblank{(number of lines)}{(line width)}{(contents)} 356 | \def\thss@int@fillinblank#1#2#3{% 357 | \makebox[0pt][l]{\parbox[t]{#2}{\centering{#3}}}\mbox{}% 358 | \parbox[t]{#2}{% 359 | \newcount\thss@tmp@linecount 360 | \thss@tmp@linecount=#1 361 | \loop\ifnum\thss@tmp@linecount>0 362 | % Fill specified space with underline on the bottom line. `\underline' 363 | % draws line on the baseline (not the bottom line), and this is why 364 | % `\uline' is used here instead. 365 | \ifnum\thss@tmp@linecount=1 366 | \uline{\makebox[#2]{}} 367 | \else 368 | \uline{\makebox[#2]{}}\\ 369 | \fi 370 | \advance\thss@tmp@linecount by -1\relax 371 | \repeat% 372 | }% 373 | } 374 | 375 | % Set up format of the title page (cover). 376 | \renewcommand{\maketitle}{% 377 | \thss@int@pdfmark{\titlepagename}{titlepage} 378 | % Make the title page centered. 379 | \begin{titlepage}\centering 380 | % Emblem and inscription of the university, and type of thesis. 381 | {% 382 | \ifthss@opt@ugly% 383 | \zihao{-0}\includegraphics[height = 1.9em]{pkulogo}\hspace{0.3em}% 384 | \raisebox{0.32em}{\includegraphics[height = 1.3em]{pkuword}}\\[0.5em] 385 | \else% 386 | \zihao{1}\includegraphics[height = 2.4em]{pkulogo}\hspace{0.4em}% 387 | \raisebox{0.4em}{\includegraphics[height = 1.6em]{pkuword}}\\[0.8em] 388 | \fi% 389 | {\bfseries\ifx\thesiscover\empty{\cthesisname}\else{\thesiscover}\fi}% 390 | } 391 | \vfill 392 | % Title of the thesis. 393 | {% 394 | \ifthss@opt@ugly\zihao{-1}\else\zihao{2}\fi% 395 | \linespread{1.6}\selectfont{\label@ctitle}% 396 | \thss@int@fillinblank{2}{0.64\textwidth}{\textbf{\@ctitle}}% 397 | } 398 | \vfill 399 | % Information about the author. 400 | {% 401 | % Slightly adjust the line skip when using new font size. 402 | \zihao{3}\linespread{1.75}\selectfont 403 | \def\thss@tmp@len{0.56\textwidth} 404 | \begin{tabular}{l@{\extracolsep{0.2em}}c} 405 | {\bfseries\label@cauthor} & 406 | \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@cauthor} \\ 407 | {\bfseries\label@studentid} & 408 | \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@studentid} \\ 409 | {\bfseries\label@school} & 410 | \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@school} \\ 411 | {\bfseries\label@cmajor} & 412 | \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@cmajor} \\ 413 | {\bfseries\label@direction} & 414 | \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@direction} \\ 415 | {\bfseries\label@cmentor} & 416 | \thss@int@fillinblank{\mentorlines}% 417 | {\thss@tmp@len}{\fangsong\@cmentor} \\ 418 | \end{tabular}% 419 | } 420 | \vfill 421 | % Degree type. 422 | \ifnum\@degreetype=1% 423 | {\zihao{3}\fangsong$\checkbox$ \label@academic\qquad% 424 | $\Box$ \label@technical}\vfill 425 | \fi\ifnum\@degreetype=2% 426 | {\zihao{3}\fangsong$\Box$ \label@academic\qquad% 427 | $\checkbox$ \label@technical}\vfill 428 | \fi% 429 | % Date. 430 | {\ifthss@opt@ugly\zihao{3}\else\zihao{-2}\fi\@date} 431 | \par\end{titlepage}% 432 | } 433 | 434 | % Typeset the title page for double-blind review. 435 | \newcommand{\makeblind}{% 436 | \thss@int@pdfmark{\titlepagename}{titlepage} 437 | \begin{titlepage}\renewcommand{\thssnl}{\newline} 438 | \centering\zihao{3}\selectfont\fangsong\vspace*{0.5cm} 439 | {\zihao{-0}\heiti\cuniversity\cthesisname}\\[0.36\baselineskip] 440 | {\zihao{-2}\fangsong\label@blindcover}% 441 | \par\vspace{4\baselineskip} 442 | \renewcommand{\arraystretch}{1.25} 443 | \begin{tabular}{lp{0.75\textwidth}} 444 | \label@blindctitle & {\@ctitle} \\ 445 | \label@blindetitle & {\@etitle} \\\\ 446 | \label@blinddiscipline & {\@discipline} \\ 447 | \label@blindmajor & {\@cmajor} \\ 448 | \label@blindid & {\@blindid} \\ 449 | \end{tabular}\par\vfill 450 | \ifnum\@degreetype=1% 451 | $\checkbox$ \label@academic\qquad$\Box$ \label@technical% 452 | \fi\ifnum\@degreetype=2% 453 | $\Box$ \label@academic\qquad$\checkbox$ \label@technical% 454 | \fi\par\vfill 455 | {\@date}\par\vspace*{0.5cm} 456 | \end{titlepage}% 457 | } 458 | 459 | % Typeset the Chinese abstract. 460 | \newenvironment{cabstract}{% 461 | \thss@int@pdfmark{\cabstractname}{cabstract} 462 | \chapter*{\cabstractname}\markboth{\cabstractname}{}% 463 | }{% Keywords at the bottom of the page. 464 | \vfill\noindent\textbf{\label@ckeywords}{\@ckeywords}% 465 | } 466 | 467 | % Typeset the English abstract. 468 | \newenvironment{eabstract}{% 469 | \thss@int@pdfmark{\eabstractname}{eabstract} 470 | \chapter*{\sffamily\@etitle}\markboth{\eabstractname}{} 471 | \begin{center} 472 | {\@eauthor} ({\@emajor})\\ 473 | {\label@ementor}{\@ementor}\\[2em] 474 | \textbf{\sffamily\eabstractname} 475 | \end{center}\par% 476 | }{% Keywords at the bottom of the page. 477 | \vfill\noindent\textbf{\label@ekeywords}{\@ekeywords}% 478 | } 479 | 480 | % Typeset the English abstract for double-blind review. 481 | \newenvironment{beabstract}{% 482 | \thss@int@pdfmark{\eabstractname}{eabstract} 483 | \chapter*{\sffamily\@etitle}\markboth{\eabstractname}{} 484 | \begin{center}\textbf{\sffamily\eabstractname}\end{center}\par% 485 | }{% Keywords at the bottom of the page. 486 | \vfill\noindent\textbf{\label@ekeywords}{\@ekeywords}% 487 | } 488 | 489 | \endinput 490 | % vim:ft=tex:ts=2:sw=2 491 | -------------------------------------------------------------------------------- /tex/pkuthss.def: -------------------------------------------------------------------------------- 1 | % Peking University dissertation document class 2 | % 3 | % Copyright (c) 2008-2009 solvethis 4 | % Copyright (c) 2010-2013,2015,2021,2024 Casper Ti. Vector 5 | % 6 | % This work may be distributed and/or modified under the conditions of the 7 | % LaTeX Project Public License, either version 1.3 of this license or (at 8 | % your option) any later version. 9 | % The latest version of this license is in 10 | % https://www.latex-project.org/lppl.txt 11 | % and version 1.3 or later is part of all distributions of LaTeX version 12 | % 2005/12/01 or later. 13 | % 14 | % This work has the LPPL maintenance status `maintained'. 15 | % The current maintainer of this work is Casper Ti. Vector. 16 | % 17 | % This work consists of the following files: 18 | % pkuthss.cls 19 | % pkuthss.def 20 | % pkuthss-gbk.def 21 | % pkuthss-utf8.def 22 | % pkulogo.eps 23 | % pkuword.eps 24 | 25 | \ProvidesFile{pkuthss.def} 26 | [2024/03/07 v1.9.4 Labels and captions for the pkuthss document class] 27 | 28 | \def\label@ementor{Directed by\ } 29 | \def\euniversity{Peking University} 30 | \def\ethesisname{Doctor Thesis} 31 | \def\thesiscover{} 32 | \def\mentorlines{1} 33 | \def\eabstractname{ABSTRACT} 34 | 35 | \ifthss@opt@ugly 36 | \def\label@ekeywords{KEY WORDS:\ } 37 | \else 38 | \def\label@ekeywords{KEYWORDS:\ } 39 | \fi 40 | 41 | \ifthss@opt@gbk 42 | \input{pkuthss-gbk.def} 43 | \ifxetex 44 | % No support for XeLaTeX compilation in non-unicode encoding, i.e. GBK. 45 | \ClassError{pkuthss}% 46 | {XeLaTeX compilation is not supported without UTF-8}% 47 | {% 48 | XeLaTeX compilation without UTF-8 is very problematic.\MessageBreak 49 | Therefore please use UTF-8 encoding for the LaTeX code.% 50 | } 51 | \fi 52 | \else 53 | \input{pkuthss-utf8.def} 54 | \fi 55 | 56 | \endinput 57 | % vim:ft=tex:ts=2:sw=2 58 | -------------------------------------------------------------------------------- /tex/pkuword.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-2.0 EPSF-2.0 2 | %%BoundingBox: 0 0 525 150 3 | %%Pages: 1 4 | %%Page: 1 1 5 | 6 | % Peking University dissertation document class 7 | % 8 | % Copyright (c) 2008-2009 solvethis 9 | % Copyright (c) 2010-2012,2014 Casper Ti. Vector 10 | % 11 | % This work may be distributed and/or modified under the conditions of the 12 | % LaTeX Project Public License, either version 1.3 of this license or (at 13 | % your option) any later version. 14 | % The latest version of this license is in 15 | % https://www.latex-project.org/lppl.txt 16 | % and version 1.3 or later is part of all distributions of LaTeX version 17 | % 2005/12/01 or later. 18 | % 19 | % This work has the LPPL maintenance status `maintained'. 20 | % The current maintainer of this work is Casper Ti. Vector. 21 | % 22 | % This work consists of the following files: 23 | % pkuthss.cls 24 | % pkuthss.def 25 | % pkuthss-gbk.def 26 | % pkuthss-utf8.def 27 | % pkulogo.eps 28 | % pkuword.eps 29 | 30 | % 设置北大红的色值(http://web5.pku.edu.cn/bs/cjwt/,问题 5)。 31 | % 要想将颜色改为黑色,只须将下面一行改为“0 setgray”即可。 32 | 0.0 1.0 1.0 0.45 setcmykcolor 33 | % 缩放和平移。 34 | 0.702957 0.602957 scale 35 | -30 -9 translate 36 | 37 | % “北”。 38 | newpath 39 | 74 224 moveto 40 | 85.9 214.1 110.4 207.3 105 187 curveto 41 | 106 176.3 111.5 166.3 108 155 curveto 42 | 112.3 125.8 104.7 99 103 71 curveto 43 | 100.3 59.5 96.9 47.3 91 38 curveto 44 | 81.8 36 87.7 47.3 86 52 curveto 45 | 88.3 56.7 86.2 62 84 66 curveto 46 | 83 66 82 66 81 66 curveto 47 | 70.7 51.3 53.5 42.7 41 31 curveto 48 | 37.6 31.1 33.9 30.3 32 34 curveto 49 | 32.6 40.3 30.8 46.8 32 52 curveto 50 | 30.2 54 31.3 57.3 31 60 curveto 51 | 43.6 65.3 42.7 79.6 47 90 curveto 52 | 59 103.5 50 123.3 47 138 curveto 53 | 54.7 135.5 63.5 135.7 69 128 curveto 54 | 74.1 126.1 81.7 125.9 83 119 curveto 55 | 84.9 118.4 85.8 119.9 87 121 curveto 56 | 87 133.3 87 145.7 87 158 curveto 57 | 86.2 176.4 91.3 203.1 71 215 curveto 58 | 67.6 220.4 61.6 223.4 64 230 curveto 59 | 68.7 231.2 70.2 224.9 74 224 curveto 60 | 85 102 moveto 61 | 87.3 94.7 85.2 86.7 83 80 curveto 62 | 73.4 67.6 58.4 63.9 46 56 curveto 63 | 42.7 55.1 40.4 57.1 40 60 curveto 64 | 46 74 57.7 85.7 63 100 curveto 65 | 65.7 103 69.7 102.6 73 104 curveto 66 | 78.5 106.2 80.1 113.5 85 115 curveto 67 | 88 110.7 83.5 107 85 102 curveto 68 | eofill 69 | newpath 70 | 176 176 moveto 71 | 184.2 165.9 175.8 148 187 140 curveto 72 | 192.6 149.1 209.4 149.9 205 164 curveto 73 | 206 165.1 202.5 172.3 208 171 curveto 74 | 206.9 159.6 220 161 226 156 curveto 75 | 231.2 157.2 228.8 148.7 228 146 curveto 76 | 223.7 140 223 131.6 215 128 curveto 77 | 205 124.2 195.7 127.8 187 121 curveto 78 | 187 115 187 109 187 103 curveto 79 | 181.5 99.2 175.8 93.7 175 87 curveto 80 | 188.7 76.3 201.5 91.8 216 91 curveto 81 | 221.9 93 226.5 97.9 234 96 curveto 82 | 235.1 91.6 232.3 91.4 231 88 curveto 83 | 230 76.1 218.3 77.6 211 72 curveto 84 | 200.8 70.8 188.8 71.6 183 62 curveto 85 | 175.5 63.2 167.5 63 162 69 curveto 86 | 150.9 87.6 151.2 111 146 132 curveto 87 | 141.1 158 154 179.1 157 203 curveto 88 | 161.7 194.2 176.5 188.7 176 176 curveto 89 | closepath 90 | fill 91 | 92 | % “京”。 93 | newpath 94 | 351 221 moveto 95 | 349.4 215.9 349.3 209.3 343 207 curveto 96 | 332.9 217.2 312.8 180.1 322 206 curveto 97 | 322.3 218.3 314.3 227.2 311 238 curveto 98 | 309.3 244.7 315.9 244.8 320 243 curveto 99 | 329.3 239.7 338.7 234.2 346 228 curveto 100 | 346.6 225.2 350.4 223.8 351 221 curveto 101 | closepath 102 | fill 103 | newpath 104 | 361 183 moveto 105 | 352.3 176.8 341.6 170.9 333 162 curveto 106 | 329.4 152.3 319 150.7 312 145 curveto 107 | 300.2 142.3 291.2 148.7 284 155 curveto 108 | 282.8 159.1 287.7 161.1 290 163 curveto 109 | 303.2 171.4 320.3 170.3 333 180 curveto 110 | 341.8 183.3 351 185.6 361 186 curveto 111 | 361 185 361 184 361 183 curveto 112 | closepath 113 | fill 114 | newpath 115 | 357 135 moveto 116 | 361.8 126.8 349.9 127.4 347 122 curveto 117 | 341.4 114.9 332.9 110.9 329 104 curveto 118 | 327.3 101.3 322.5 100 324 96 curveto 119 | 326.1 92.8 330.4 96.3 333 98 curveto 120 | 337.3 100.7 341.7 97.3 346 97 curveto 121 | 343.8 86.8 332.7 85.7 326 80 curveto 122 | 322.5 79.3 318.3 77.9 317 74 curveto 123 | 312.2 64.9 322.3 60.7 321 52 curveto 124 | 323.8 41 328.2 28 325 17 curveto 125 | 317.4 16.8 319.5 25.8 314 29 curveto 126 | 311.8 32.7 304.6 30.9 306 37 curveto 127 | 309.5 37.7 313.7 39.1 315 43 curveto 128 | 314.3 48.7 316.7 55.6 313 60 curveto 129 | 311.1 60.3 309.6 59.5 308 59 curveto 130 | 293.5 46.9 284.8 31.5 271 20 curveto 131 | 264.2 18.7 260.4 24.7 259 30 curveto 132 | 257.8 32.6 258 35.9 258 39 curveto 133 | 276.8 39.2 288.7 56.3 304 65 curveto 134 | 307.5 64.9 309.3 69 312 71 curveto 135 | 313.3 74.6 309.9 76.3 309 79 curveto 136 | 308.3 85.9 319.3 93.8 311 98 curveto 137 | 306.6 97.1 300.6 97.6 299 92 curveto 138 | 304.1 80.4 294.9 72.3 289 64 curveto 139 | 287.6 63.3 287.4 65.7 286 65 curveto 140 | 277.5 80.5 281 99.7 283 117 curveto 141 | 287.1 115.7 290.3 112.3 294 110 curveto 142 | 309.9 114.8 321.3 130.8 337 136 curveto 143 | 343 134.2 351.6 135.3 357 135 curveto 144 | closepath 145 | fill 146 | newpath 147 | 374 62 moveto 148 | 374 57.7 374 53.3 374 49 curveto 149 | 368.6 46.4 362.1 40.9 357 48 curveto 150 | 351.7 57.8 341.8 69.4 350 81 curveto 151 | 359.3 77.8 371.6 73.3 374 62 curveto 152 | closepath 153 | fill 154 | 155 | % “大”。 156 | newpath 157 | 501 224 moveto 158 | 507.6 216 519.8 213 519 202 curveto 159 | 510.5 194.5 518.5 184 516 174 curveto 160 | 513.8 166.3 516.2 156.7 514 149 curveto 161 | 514.3 146.1 517.5 145.7 520 146 curveto 162 | 537.1 151 538.8 182.5 560 171 curveto 163 | 557.7 161.3 549.5 155.7 542 149 curveto 164 | 533.4 140.8 521.6 133.8 514 123 curveto 165 | 512.2 101.2 508.4 78.4 488 66 curveto 166 | 476 57.9 463 52.2 449 49 curveto 167 | 447.3 51.2 438.3 44.3 442 51 curveto 168 | 450.7 56.3 458.9 62.7 468 67 curveto 169 | 482.2 77.4 486.1 93.8 491 109 curveto 170 | 484.7 113.3 478.3 105.7 472 104 curveto 171 | 456.1 97.9 445.1 86.2 430 78 curveto 172 | 424.8 75.9 419.1 72.1 413 75 curveto 173 | 406.8 81.8 408.2 93 408 101 curveto 174 | 411.9 101.9 410.9 97.2 414 96 curveto 175 | 436.6 97.6 452.7 115.2 474 120 curveto 176 | 480.7 125.8 491.4 124.2 496 133 curveto 177 | 500.2 163 498.3 195.4 486 221 curveto 178 | 487.2 223.7 488.1 229.2 493 227 curveto 179 | 495 224.5 497.7 223.5 501 224 curveto 180 | closepath 181 | fill 182 | newpath 183 | 557 86 moveto 184 | 564 76.3 578.2 71.9 574 58 curveto 185 | 568.3 51.9 560.3 51.5 552 52 curveto 186 | 550.3 54.4 550.8 58.5 552 61 curveto 187 | 548.5 71.2 540.4 81.9 545 93 curveto 188 | 548.4 91.3 552.1 86.2 557 86 curveto 189 | closepath 190 | fill 191 | 192 | % 学。 193 | newpath 194 | 640 130 moveto 195 | 639.8 124 641.2 115.7 635 114 curveto 196 | 628.1 111.5 630.1 119.8 626 122 curveto 197 | 625.8 131.8 626.8 139.7 624 148 curveto 198 | 634.8 146.6 632.8 135.8 640 130 curveto 199 | closepath 200 | fill 201 | newpath 202 | 733 248 moveto 203 | 738 233.7 720.5 224.5 721 210 curveto 204 | 728.7 202 735.5 214.1 744 213 curveto 205 | 753.3 220.2 762.3 213.3 773 214 curveto 206 | 768.4 191.6 756.7 169.5 737 156 curveto 207 | 736.5 154.6 736.3 153.1 735 152 curveto 208 | 740.1 145.1 758.1 154.4 754 140 curveto 209 | 746.5 116.3 724.8 109.9 705 101 curveto 210 | 715.3 113.3 728.2 123.7 736 138 curveto 211 | 733 143.2 726.9 137.7 723 136 curveto 212 | 703.9 117.4 683.8 101.3 660 94 curveto 213 | 652.2 91.7 644 90.4 635 91 curveto 214 | 635.9 98.4 645.4 97.9 650 103 curveto 215 | 673.8 121.1 701.1 130.5 726 146 curveto 216 | 726.6 147.9 725.1 148.8 724 150 curveto 217 | 716.7 151.2 712 146 706 144 curveto 218 | 705.5 149.3 711 153.3 709 158 curveto 219 | 704 160 699.6 166.5 694 164 curveto 220 | 686.8 160.8 686.1 147.6 677 150 curveto 221 | 677.2 159.5 697.7 166.9 684 176 curveto 222 | 694.5 171.8 700.6 182.7 705 189 curveto 223 | 705.8 191.9 705.5 193 703 195 curveto 224 | 699.4 194.7 696.9 191.6 693 192 curveto 225 | 693.6 196.3 699.8 198.2 699 203 curveto 226 | 694.9 208.7 686.3 203.7 684 212 curveto 227 | 684.1 216.3 689.1 212.2 692 213 curveto 228 | 695.3 212 699.5 214.5 703 216 curveto 229 | 718.6 222.2 724.8 240.5 726 255 curveto 230 | 729.2 254.8 729.6 249.9 733 248 curveto 231 | 748 193 moveto 232 | 743.7 180.6 733.5 168.9 725 160 curveto 233 | 724.5 167.3 722.5 174 719 180 curveto 234 | 710.8 180.5 719.2 163.3 708 168 curveto 235 | 696.3 179.3 716.2 187.4 718 198 curveto 236 | 728 202.3 738 194.7 748 193 curveto 237 | eofill 238 | newpath 239 | 640 195 moveto 240 | 643.7 193 646.5 188.9 651 189 curveto 241 | 661.3 177.5 670.8 165.7 671 150 curveto 242 | 667.8 144.8 662.5 140.5 657 139 curveto 243 | 653.4 161.3 643.8 182 627 198 curveto 244 | 625.5 199.7 625.5 203.3 627 205 curveto 245 | 632.2 203.8 635.2 197.3 640 195 curveto 246 | closepath 247 | fill 248 | newpath 249 | 732 82 moveto 250 | 727.7 76.8 729.2 66.5 720 66 curveto 251 | 713.6 65.1 703.7 68.2 702 60 curveto 252 | 702.4 47.8 712 38.2 707 25 curveto 253 | 704 12.5 688.9 12 678 10 curveto 254 | 675.5 16.8 666.3 14.1 663 19 curveto 255 | 675.2 21.9 691.3 19.6 697 34 curveto 256 | 692.9 41.6 697.4 53.6 690 59 curveto 257 | 670.3 53.8 653.1 42.5 636 31 curveto 258 | 631.1 29.7 626.4 25.1 621 28 curveto 259 | 620.2 35.6 610.3 39.5 614 49 curveto 260 | 617.7 54.2 624 53 629 55 curveto 261 | 654.8 67.1 680.6 79.3 709 85 curveto 262 | 711.4 88.3 717 87.2 720 86 curveto 263 | 723.4 86.2 729.3 86.3 732 82 curveto 264 | closepath 265 | fill 266 | 267 | showpage 268 | %%EOF 269 | -------------------------------------------------------------------------------- /utils/bump: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # 3 | # Copyright (c) 2012-2016,2018 Casper Ti. Vector 4 | # Public domain. 5 | 6 | NUMDATE = $(shell date '+%Y/%m/%d') 7 | CNDATE = $(shell date '+\\zhdigits{%Y}年\\zhnumber{%-m}月') 8 | 9 | revbump: 10 | sed -i '/\\Provides/,+1 s;\[[^ ]* [^ ]*;[$(NUMDATE) v$(VERSION);g' \ 11 | tex/* 12 | sed -i -e '/date = / s;{[^,]\+},$$;{$(CNDATE)},;g' \ 13 | -e '/\\newcommand\*{\\docversion}/ s;{[^{}]\+}$$;{v$(VERSION)};g' \ 14 | doc/readme/pkuthss.tex 15 | @echo '$@: remember to update the change log and copyright lines' 16 | @echo '$@: remember to tag the commit and push tags' 17 | @echo '$@: remember to add new download on project homepage' 18 | 19 | # vim:ts=4:sw=4 20 | -------------------------------------------------------------------------------- /utils/dist: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # 3 | # Copyright (c) 2011-2015,2019 Casper Ti. Vector 4 | # Public domain. 5 | 6 | CP = cp -a 7 | MV = mv -f 8 | MD = mkdir -p 9 | RM = rm -rf 10 | ZIP = zip -rT 11 | MAKE = make 12 | LMK = latexmk 13 | SELF = utils/dist 14 | PERM = find . -type d -exec chmod 755 '{}' + && \ 15 | find . -type f -exec chmod 644 '{}' + 16 | 17 | dist: 18 | $(SELF) distclean 19 | $(SELF) dist-ctan 20 | $(SELF) clean 21 | 22 | tex-dist: tex/ 23 | $(CP) tex/ $@ 24 | cd $@ && $(MAKE) && rm -f Makefile 25 | 26 | doc-dist: doc/ 27 | # Make the directory. 28 | $(MD) $@/ 29 | # Example src and pdf. 30 | cd doc/example/ && $(LMK) && $(LMK) -c && $(RM) *.xdv 31 | $(MV) doc/example/$(EXAMPLE).pdf $@/example.pdf 32 | $(CP) doc/example/ $@/example 33 | # Readme src and pdf. 34 | cd doc/readme/ && $(LMK) && $(LMK) -c && $(RM) *.xdv 35 | $(MV) doc/readme/$(TITLE).pdf $@/ 36 | $(CP) doc/readme/ $@/readme 37 | 38 | dir-tds: README.txt tex-dist doc-dist 39 | $(MD) $@/tex/latex/ $@/doc/latex/ 40 | $(CP) tex-dist/ $@/tex/latex/$(TITLE) 41 | $(CP) doc-dist/ $@/doc/latex/$(TITLE) 42 | $(CP) README.txt $@/doc/latex/$(TITLE) 43 | 44 | dist-tds: $(TITLE).tds.zip 45 | $(TITLE).tds.zip: dir-tds 46 | cd $< && $(PERM) && $(ZIP) ../$@ tex/ doc/ 47 | 48 | dir-ctan: README.txt tex-dist doc-dist $(TITLE).tds.zip 49 | $(MD) $@/$(TITLE)/ 50 | $(CP) README.txt $@/$(TITLE)/ 51 | $(CP) tex-dist/ $@/$(TITLE)/tex 52 | $(CP) doc-dist/ $@/$(TITLE)/doc 53 | $(MV) $(TITLE).tds.zip $@/ 54 | 55 | dist-ctan: $(TITLE)-$(VERSION).zip 56 | $(TITLE)-$(VERSION).zip: dir-ctan 57 | cd $< && $(PERM) && \ 58 | $(ZIP) -y ../$@ $(TITLE)/ $(TITLE).tds.zip 59 | 60 | clean: 61 | cd doc/readme/ && $(LMK) -C 62 | cd doc/example/ && $(LMK) -C 63 | $(RM) dir-ctan/ dir-tds/ tex-dist/ doc-dist/ 64 | 65 | distclean: 66 | $(SELF) clean 67 | $(RM) $(TITLE).tds.zip $(TITLE)-$(VERSION).zip 68 | 69 | # vim:ts=4:sw=4 70 | -------------------------------------------------------------------------------- /utils/qa: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # 3 | # Copyright (c) 2012,2014,2018 Casper Ti. Vector 4 | # Public domain. 5 | 6 | FIND_GBK = '(' -name '*gbk*' -o -name '*.bat*' ')' 7 | FIND_CRLF = -name '*.bat*' 8 | FIND_VCS = '(' -type d -name '.git' -prune ')' 9 | 10 | # IGNORE "error"s intentionally. 11 | .IGNORE qa: enc lt sync spell blank tail 12 | 13 | enc: 14 | @echo '======================================================================' 15 | @echo '$@: check file encodings' 16 | @echo '----------------------------------------------------------------------' 17 | ! find . -not $(FIND_VCS) $(FIND_GBK) \ 18 | -type f -exec file '{}' '+' | grep -vE 'GB|ISO-8859|ASCII' 19 | ! find . -not $(FIND_VCS) -not $(FIND_GBK) \ 20 | -type f -exec file '{}' '+' | grep -E 'GB|ISO-8859' 21 | @echo 22 | 23 | lt: 24 | @echo '======================================================================' 25 | @echo '$@: check line terminators' 26 | @echo '----------------------------------------------------------------------' 27 | ! find . -not $(FIND_VCS) $(FIND_CRLF) \ 28 | -type f -exec file '{}' '+' | grep -vE 'CRLF' 29 | ! find . -not $(FIND_VCS) -not $(FIND_CRLF) \ 30 | -type f -exec file '{}' '+' | grep -E 'CRLF' 31 | @echo 32 | 33 | sync: 34 | @echo '======================================================================' 35 | @echo '$@: keep GBK and UTF-8 files synchronised' 36 | @echo '----------------------------------------------------------------------' 37 | iconv -f GBK tex/pkuthss-gbk.def | diff - tex/pkuthss-utf8.def 38 | @echo 39 | 40 | spell: 41 | @echo '======================================================================' 42 | @echo '$@: "模板" -> "模版"; "绪言" -> "序言"; maybe "需" -> "须"' 43 | @echo '----------------------------------------------------------------------' 44 | grep -rE --exclude-dir=.git '需|模板|绪言' . 45 | @echo 46 | 47 | blank: 48 | @echo '======================================================================' 49 | @echo '$@: check for trailing spaces and tabs' 50 | @echo '----------------------------------------------------------------------' 51 | ! grep -r --exclude-dir=.git '[ ]\+$$' --exclude '*.patch' . 52 | @echo 53 | 54 | tail: 55 | @echo '======================================================================' 56 | @echo '$@: remember to update documentation after modifications' 57 | @echo '$@: remember to update patch(es)' 58 | @echo '$@: remember to update copyright lines' 59 | @echo '$@: remember to review `git diff`' 60 | @echo '======================================================================' 61 | 62 | # vim:ts=4:sw=4 63 | --------------------------------------------------------------------------------