Fix misuse of \newline in centring mode.

This commit is contained in:
Casper Ti. Vector 2021-03-25 01:54:45 +08:00
parent 4aad1737c7
commit d6747f52ad
5 changed files with 15 additions and 10 deletions

View File

@ -36,7 +36,7 @@
\pkuthssinfo{
cthesisname = {博士学位论文}, ethesisname = {Doctor Thesis},
thesiscover = {博士研究生学位论文},
% 长标题可用 \newline 强制换行,不能用“\\”(双盲版会出错)。
% 长标题可用 \thssnl 强制换行,不能用“\\”(双盲版会出错)。
ctitle = {测试文档},
etitle = {Test Document},
cauthor = {某某}, eauthor = {Test}, date = {某年某月},

View File

@ -150,7 +150,7 @@
\end{Verbatim}
\section{pkuthss 文档类提供的命令和环境}
\subsection{设定文档信息的命令}
\subsection{设定文档信息的命令}\label{ssec:set-cmd}
这一类命令的语法为
\begin{Verbatim}
@ -160,9 +160,9 @@
这些命令总结如下:
\begin{itemize}
\item \texttt{\bfseries\string\ctitle}:设定论文中文标题\footnote{%
因为 pkuthss 内部实现机制的缘故,%
\myemph{双盲版论文的(中文和西文)标题如须强制换行,必须使用
\texttt{\string\newline} 而非 \texttt{\string\\}},否则会出错。%
因为 pkuthss 内部实现机制的缘故,\myemph{双盲版论文的(中文和西文)
标题如须强制换行,必须使用 pkuthss 提供的 \texttt{\string\thssnl}
命令而非 \texttt{\string\\}},否则会出错。%
}
\item \texttt{\bfseries\string\etitle}:设定论文西文标题;
\item \texttt{\bfseries\string\cauthor}:设定作者的中文名;
@ -270,6 +270,9 @@
此时就须要在设定完文档信息之后调用 \verb|\setpdfproperties|。%
\myemph{注意:须要启用 \texttt{pdfprop} 选项才能使用此命令。}
\texttt{\bfseries\string\thssnl} 命令用于在双盲版论文的(中文和西文)标题中
强制换行,见第 \ref{ssec:set-cmd} 小节中关于 \verb|\ctitle| 说明的脚注。
\section{从其它文档类和宏包继承的功能}\label{sec:thirdparty}
pkuthss 文档类建立在 ctexbook\cupercite{ctex} 文档类之上,

View File

@ -33,8 +33,8 @@
文档默认情况下是双面模式,章末可能产生空白页,
解决方式见第 \ref{sec:options} 节。
双盲版论文的(中文和西文)标题只能使用 \verb|\newline|
而非 \verb|\\| 换行,见第 \ref{sec:options} 节。
双盲版论文的(中文和西文)标题只能使用 pkuthss 提供的
\verb|\thssnl| 命令而非 \verb|\\| 换行,见第 \ref{sec:options} 节。
通过一些设置,还可以满足例如被引用的文献按照引用顺序排序,
而未引用的文献按照西文文献在前、中文文献在后排序这样的需求,

View File

@ -54,10 +54,10 @@
\newcommand*{\docversion}{v1.8.3}
\pkuthssinfo{
cthesisname = {本科生毕业论文}, ethesisname = {Undergraduate Thesis},
ctitle = {北京大学学位论文模版\newline{}pkuthss \docversion},
ctitle = {北京大学学位论文模版{\thssnl}pkuthss \docversion},
etitle = {%
PKU dissertation document class%
\texorpdfstring{\newline}{: }pkuthss \docversion%
\texorpdfstring{\thssnl}{: }pkuthss \docversion%
},
cauthor = {盖茨波·钛·维克托}, eauthor = {Casper Ti.\ Vector},
date = {\zhdigits{2020}\zhnumber{11}},

View File

@ -252,6 +252,8 @@
\thss@int@infoitemb{eabstractname}
% Set up document information using the `key = value' grammar.
\newcommand*{\pkuthssinfo}[1]{\setkeys{thss@info}{#1}}
% Becomes \newline in the \makeblind scope.
\newcommand{\thssnl}{\\}
% Set up page layout.
\geometry{a4paper, hmargin = 2.6cm, headheight = 0.5cm, headsep = 0.6cm}
@ -404,7 +406,7 @@
% Typeset the title page for double-blind review.
\newcommand{\makeblind}{%
\thss@int@pdfmark{\titlepagename}{titlepage}
\begin{titlepage}\begingroup
\begin{titlepage}\begingroup\renewcommand{\thssnl}{\newline}
\centering\zihao{3}\selectfont\fangsong\vspace*{0.5cm}
{\zihao{-0}\heiti\cuniversity\cthesisname}\\[0.36\baselineskip]
{\zihao{-2}\fangsong\label@blindcover}%