Merge the double-blind support into the main tree.

This commit is contained in:
Casper Ti. Vector 2021-03-06 00:35:46 +08:00
parent 97b4a9538b
commit f273839239
9 changed files with 71 additions and 95 deletions

View File

@ -1,5 +1,6 @@
% Copyright (c) 2008-2009 solvethis
% Copyright (c) 2010-2016,2018-2019,2021 Casper Ti. Vector
% Copyright (c) 2021 Kurapica
% Public domain.
%
% 使用前请先仔细阅读 pkuthss 和 biblatex-caspervector 的文档,
@ -28,10 +29,14 @@
% 按学校要求设定参考文献列表的段间距。
\setlength{\bibitemsep}{3bp}
% 如是双盲版论文,将 \blindfalse 改为 \blindtrue。后面可用
% \ifblind 根据是否双盲来条件地启用代码(参见本文件后面部分)。
\newif\ifblind\blindfalse
% 设定文档的基本信息。
\pkuthssinfo{
cthesisname = {博士学位论文}, ethesisname = {Doctor Thesis},
thesiscover = {博士研究生学位论文},
% 长标题可用 \newline 强制换行,不能用“\\”(双盲版会出错)。
ctitle = {测试文档},
etitle = {Test Document},
cauthor = {某某}, eauthor = {Test}, date = {某年某月},
@ -40,7 +45,9 @@
direction = {某某方向},
cmentor = {某某教授}, ementor = {Prof.\ Somebody},
ckeywords = {其一,其二},
ekeywords = {First, Second}
ekeywords = {First, Second},
% 以下两项无双盲评审需求的用户可保持原状。
blindid = {9876543210}, discipline = {某某学科}
}
% 载入参考文献数据库(注意不要省略“.bib”
\addbibresource{thesis.bib}
@ -71,7 +78,7 @@
% 此后到下一 \pagestyle 命令之前不排版页眉或页脚。
\pagestyle{empty}
% 自动生成封面。
\maketitle
\ifblind\makeblind\else\maketitle\fi
% 版权声明。封面要求单面打印,故须新开右页。
\cleardoublepage
\include{chap/copy}
@ -105,7 +112,7 @@
% 以下为正文之后的部分,默认不进行章节编号。
\backmatter
% 致谢。
\include{chap/ack}
\ifblind\else\include{chap/ack}\fi
% 原创性声明和使用授权说明。
\include{chap/origin}
\end{document}

View File

@ -31,7 +31,8 @@
感谢北大未名 BBS 上 MathTools 版和 Thesis 版诸位同学的支持。
特别感谢 pkuthss 模版的最初创作者 solvethis 网友,
以及不断地对 Casper 提出的诸多问题予以解答的 cauchy 网友 :)
不断地对 Casper 提出的诸多问题予以解答的 cauchy 网友,
以及在论文格式合规性和双盲版论文格式上有主要贡献的 Kurapica 网友~:)
此外还要感谢 \parencite{pku-thesisstyle} 的作者,
让我校在学位论文格式要求的繁复程度上离隔壁更近了一步,

View File

@ -159,7 +159,11 @@
这些命令总结如下:
\begin{itemize}
\item \texttt{\bfseries\string\ctitle}:设定论文中文标题;
\item \texttt{\bfseries\string\ctitle}:设定论文中文标题\footnote{%
因为 pkuthss 内部实现机制的缘故,%
\myemph{双盲版论文的(中文和西文)标题如须强制换行,必须使用
\texttt{\string\newline} 而非 \texttt{\string\\}},否则会出错。%
}
\item \texttt{\bfseries\string\etitle}:设定论文西文标题;
\item \texttt{\bfseries\string\cauthor}:设定作者的中文名;
\item \texttt{\bfseries\string\eauthor}:设定作者的西文名;
@ -172,8 +176,12 @@
\item \texttt{\bfseries\string\cmentor}:设定导师的中文名;
\item \texttt{\bfseries\string\ementor}:设定导师的西文名;
\item \texttt{\bfseries\string\ckeywords}:设定中文关键词;
\item \texttt{\bfseries\string\ekeywords}:设定西文关键词。
\item \texttt{\bfseries\string\ekeywords}:设定西文关键词;
\item \texttt{\bfseries\string\blindid}:设定论文编号(双盲评审用);
\item \texttt{\bfseries\string\discipline}:设定一级学科(双盲评审用)。
\end{itemize}
排版双盲版论文时除了要去掉致谢等章节、隐去论文中其它可能泄露个人信息的部分外,
还应注意在排版封面时须使用 \verb|\makeblind| 而非 \verb|\maketitle| 命令。
例如如果要设定专业为“化学”“Chemistry”则可以使用以下命令
\begin{Verbatim}

View File

@ -33,6 +33,9 @@
文档默认情况下是双面模式,章末可能产生空白页,
解决方式见第 \ref{sec:options} 节。
双盲版论文的(中文和西文)标题只能使用 \verb|\newline|
而非 \verb|\\| 换行,见第 \ref{sec:options} 节。
通过一些设置,还可以满足例如被引用的文献按照引用顺序排序,
而未引用的文献按照西文文献在前、中文文献在后排序这样的需求,
见第 \ref{sec:thirdparty} 节。
@ -109,7 +112,7 @@ data source .../par-xxxxxxxx/cache-xxxxxxxx/
biblatex-caspervector\cupercite{biblatex-caspervector}
所实现的格式和 \parencite{pku-thesisstyle} 的规定并不一致,
但其作者没有精力也不愿意去实现后者所规定的比原格式更丑陋得多的格式。
针对国标 GB/T 7714-2015现在已经有了 biblatex-gb7714-2015%
国标 GB/T 7714-2015 现在已经有了 biblatex-gb7714-2015%
\cupercite{biblatex-gb7714-2015} 这一 biblatex 实现,用户也可以考虑使用。
\section{反馈意见和建议}

View File

@ -1,81 +0,0 @@
diff --git a/doc/example/thesis.tex b/doc/example/thesis.tex
index 7c1b6bd..1196b85 100644
--- a/doc/example/thesis.tex
+++ b/doc/example/thesis.tex
@@ -1,5 +1,6 @@
% Copyright (c) 2008-2009 solvethis
% Copyright (c) 2010-2016,2018-2019,2021 Casper Ti. Vector
+% Copyright (c) 2021 Kurapica
% Public domain.
%
% 使用前请先仔细阅读 pkuthss 和 biblatex-caspervector 的文档,
@@ -20,10 +21,43 @@
% 若须在排序中实现更复杂的需求,请参考 biblatex-caspervector 的文档。
\usepackage[backend = biber, style = caspervector, utf8, sorting = ecnyt]{biblatex}
+% 双盲评审相关基础代码。
+\makeatletter
+\thss@int@infoitema{discipline}
+\thss@int@infoitema{blindid}
+\def\label@blindcover{(匿名评阅论文封面)}
+\def\label@blindctitle{中文题目:}
+\def\label@blindetitle{英文题目:}
+\def\label@blinddiscipline{一级学科:}
+\def\label@blindmajor{二级学科:}
+\def\label@blindid{论文编号:}
+\newcommand{\makeblind}{%
+ \thss@int@pdfmark{\titlepagename}{titlepage}
+ \begin{titlepage}\begingroup
+ \centering\zihao{3}\selectfont\fangsong\vspace*{0.5cm}
+ {\zihao{-0}\heiti\cuniversity\cthesisname}\\[0.36\baselineskip]
+ {\zihao{-2}\fangsong\label@blindcover}%
+ \par\vspace{4\baselineskip}
+ \renewcommand{\arraystretch}{1.25}
+ \begin{tabular}{lp{0.8\textwidth}}
+ \label@blindctitle & {\@ctitle} \\
+ \label@blindetitle & {\@etitle} \\\\
+ \label@blinddiscipline & {\@discipline} \\
+ \label@blindmajor & {\@cmajor} \\
+ \label@blindid & {\@blindid} \\
+ \end{tabular}\par\vfill
+ {\@date}\par\vspace*{0.5cm}
+ \endgroup\end{titlepage}%
+}
+\makeatother
+
% 对于 linespread 值的计算过程有兴趣的同学可以参考 pkuthss.cls。
\renewcommand*{\bibfont}{\zihao{5}\linespread{1.27}\selectfont}
% 按学校要求设定参考文献列表的段间距。
\setlength{\bibitemsep}{3bp}
+% 如是双盲版论文,将 \blindfalse 改为 \blindtrue。后面可用
+% \ifblind 根据是否双盲来条件地启用代码(参见本文件后面部分)。
+\newif\ifblind\blindfalse
% 设定文档的基本信息。
\pkuthssinfo{
@@ -35,6 +69,7 @@
studentid = {0123456789}, school = {某某学院},
cmajor = {某某专业}, emajor = {Some Major},
direction = {某某方向},
+ discipline = {某某学科}, blindid = {9876543210},
cmentor = {某某教授}, ementor = {Prof.\ Somebody},
ckeywords = {其一,其二},
ekeywords = {First, Second}
@@ -66,7 +101,7 @@
% 此后到下一 \pagestyle 命令之前不排版页眉或页脚。
\pagestyle{empty}
% 自动生成封面。
- \maketitle
+ \ifblind\makeblind\else\maketitle\fi
% 版权声明。封面要求单面打印,故须新开右页。
\cleardoublepage
\include{chap/copy}
@@ -100,7 +135,7 @@
% 以下为正文之后的部分,默认不进行章节编号。
\backmatter
% 致谢。
- \include{chap/ack}
+ \ifblind\else\include{chap/ack}\fi
% 原创性声明和使用授权说明。
\include{chap/origin}
\end{document}

View File

@ -50,29 +50,31 @@
tabsize = 4, formatcom = {\ifXeTeX\xeCJKVerbAddon\fi}
}
\newif\ifblind\blindfalse
\newcommand*{\docversion}{v1.8.3}
\pkuthssinfo{
cthesisname = {本科生毕业论文}, ethesisname = {Undergraduate Thesis},
ctitle = {北京大学学位论文模版\\pkuthss \docversion},
ctitle = {北京大学学位论文模版\newline{}pkuthss \docversion},
etitle = {%
PKU dissertation document class\texorpdfstring{\\}{: }%
pkuthss \docversion%
PKU dissertation document class%
\texorpdfstring{\newline}{: }pkuthss \docversion%
},
cauthor = {盖茨波·钛·维克托}, eauthor = {Casper Ti.\ Vector},
date = {\zhdigits{2020}\zhnumber{11}},
studentid = {00910???}, school = {化学与分子工程学院},
cmajor = {化学}, emajor = {Chemistry ... ?},
cmajor = {应用化学}, emajor = {Applied Chemistry},
direction = {据说 Casper 自己也不知道},
cmentor = {XX 教授}, ementor = {Prof.\ XX},
ckeywords = {\hologo{LaTeX},排版,文档类,\CTeX{}},
ekeywords = {\hologo{LaTeX}, Typesetting, Document class, \CTeX{}}
ekeywords = {\hologo{LaTeX}, Typesetting, Document class, \CTeX{}},
blindid = {???01900}, discipline = {化学}
}
\addbibresource{pkuthss.bib}
\begin{document}
\frontmatter
\pagestyle{empty}
\maketitle
\ifblind\makeblind\else\maketitle\fi
\cleardoublepage
\include{chap/pkuthss-copy}
@ -95,7 +97,7 @@
\include{chap/pkuthss-encl1}
\backmatter
\include{chap/pkuthss-ack}
\ifblind\else\include{chap/pkuthss-ack}\fi
\include{chap/origin}
\end{document}

View File

@ -2,6 +2,7 @@
%
% Copyright (c) 2008-2009 solvethis
% Copyright (c) 2010-2013,2015,2021 Casper Ti. Vector
% Copyright (c) 2021 Kurapica
%
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3 of this license or (at
@ -35,6 +36,12 @@
\def\label@ementor{Directed by\ }
\def\label@ckeywords{}
\def\label@ekeywords{KEYWORDS:\ }
\def\label@blindcover{}
\def\label@blindctitle{}
\def\label@blindetitle{}
\def\label@blinddiscipline{}
\def\label@blindmajor{}
\def\label@blindid{}
\def\titlepagename{}
\def\cuniversity{}

View File

@ -2,6 +2,7 @@
%
% Copyright (c) 2008-2009 solvethis
% Copyright (c) 2010-2013,2015,2021 Casper Ti. Vector
% Copyright (c) 2021 Kurapica
%
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3 of this license or (at
@ -35,6 +36,12 @@
\def\label@ementor{Directed by\ }
\def\label@ckeywords{}
\def\label@ekeywords{KEYWORDS:\ }
\def\label@blindcover{}
\def\label@blindctitle{}
\def\label@blindetitle{}
\def\label@blinddiscipline{}
\def\label@blindmajor{}
\def\label@blindid{}
\def\titlepagename{}
\def\cuniversity{}

View File

@ -241,6 +241,8 @@
\thss@int@infoitema{ementor}
\thss@int@infoitema{ckeywords}
\thss@int@infoitema{ekeywords}
\thss@int@infoitema{blindid}
\thss@int@infoitema{discipline}
\thss@int@infoitemb{cuniversity}
\thss@int@infoitemb{euniversity}
\thss@int@infoitemb{cthesisname}
@ -399,6 +401,26 @@
\par\endgroup\end{titlepage}%
}
% Typeset the title page for double-blind review.
\newcommand{\makeblind}{%
\thss@int@pdfmark{\titlepagename}{titlepage}
\begin{titlepage}\begingroup
\centering\zihao{3}\selectfont\fangsong\vspace*{0.5cm}
{\zihao{-0}\heiti\cuniversity\cthesisname}\\[0.36\baselineskip]
{\zihao{-2}\fangsong\label@blindcover}%
\par\vspace{4\baselineskip}
\renewcommand{\arraystretch}{1.25}
\begin{tabular}{lp{0.75\textwidth}}
\label@blindctitle & {\@ctitle} \\
\label@blindetitle & {\@etitle} \\\\
\label@blinddiscipline & {\@discipline} \\
\label@blindmajor & {\@cmajor} \\
\label@blindid & {\@blindid} \\
\end{tabular}\par\vfill
{\@date}\par\vspace*{0.5cm}
\endgroup\end{titlepage}%
}
% Typeset the Chinese abstract.
\newenvironment{cabstract}{%
\thss@int@pdfmark{\cabstractname}{cabstract}