texlive[60708] Master/texmf-dist: buctthesis (7oct21)

commits+karl at tug.org commits+karl at tug.org
Thu Oct 7 22:33:22 CEST 2021


Revision: 60708
          http://tug.org/svn/texlive?view=revision&revision=60708
Author:   karl
Date:     2021-10-07 22:33:22 +0200 (Thu, 07 Oct 2021)
Log Message:
-----------
buctthesis (7oct21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/buctthesis/ChangeLog.md
    trunk/Master/texmf-dist/doc/latex/buctthesis/app1.tex
    trunk/Master/texmf-dist/doc/latex/buctthesis/buctcover.tex
    trunk/Master/texmf-dist/doc/latex/buctthesis/buctthesis.pdf
    trunk/Master/texmf-dist/doc/latex/buctthesis/main.tex
    trunk/Master/texmf-dist/doc/latex/buctthesis/manual.sty
    trunk/Master/texmf-dist/doc/latex/buctthesis/mycfg.sty
    trunk/Master/texmf-dist/doc/latex/buctthesis/thesisbib.bib
    trunk/Master/texmf-dist/source/latex/buctthesis/buctthesis.dtx
    trunk/Master/texmf-dist/source/latex/buctthesis/buctthesis.ins
    trunk/Master/texmf-dist/tex/latex/buctthesis/buctcover.cls
    trunk/Master/texmf-dist/tex/latex/buctthesis/buctthesis.cls

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/buctthesis/resume.tex

Modified: trunk/Master/texmf-dist/doc/latex/buctthesis/ChangeLog.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/buctthesis/ChangeLog.md	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/doc/latex/buctthesis/ChangeLog.md	2021-10-07 20:33:22 UTC (rev 60708)
@@ -1,14 +1,25 @@
 # Changelog of BUCTthesis
 在这里记录 BUCTthesis 中较为重要的改动。
 
-## v1.1 - 2021/03/21.
+## v1.2 - 2021/09/10
 
 ### Added
 
-- 增加论文封面,仅支持硕博
+- 增加 `fontset` 选项,从而可在非 Windows 系统下选择**中文**字库。
 
+### Fixed
 
+- 封面的下划线现在支持动态调整,具体长度与标题首行相等
+- 英文摘要中的论文标题现在能正确换行了,且调整了垂直间距
 
+## v1.1 - 2021/03/29
+
+**本版本提交至CTAN**
+
+### Added
+
+- 增加论文封面,仅支持硕博
+
 ## v1.0 - 2021/02/18
 
 ### Added

Modified: trunk/Master/texmf-dist/doc/latex/buctthesis/app1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/buctthesis/app1.tex	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/doc/latex/buctthesis/app1.tex	2021-10-07 20:33:22 UTC (rev 60708)
@@ -37,7 +37,7 @@
 \zhlipsum[name = xiangyu]
 
 \begin{dfigure}[tbp]
-	\centering\includegraphics[height=.9\textwidth ,angle=-90]{worm gear.pdf}
+	\centering\includegraphics[height=.9\textwidth ,angle=-90]{worm-gear.pdf}
 	\caption{设计图纸测试}
 \end{dfigure}
 

Modified: trunk/Master/texmf-dist/doc/latex/buctthesis/buctcover.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/buctthesis/buctcover.tex	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/doc/latex/buctthesis/buctcover.tex	2021-10-07 20:33:22 UTC (rev 60708)
@@ -6,7 +6,7 @@
 	%%%%% 各选项之间不要留有空行,并以西文逗号“,”分隔 %%%%%
 	% 学号,位于右上角
 	studentid = {2021010234},
-	% 标题。封面的标题有两行,每一行控制在 13 个汉字长度以内
+	% 标题。封面的标题有两行,每一行控制在 18 个汉字长度以内
 	titleA = {一二三四五六七八九十甲乙丙},
 	titleB = {丁戊己庚辛壬癸一二三四五六},
 	% 作者

Modified: trunk/Master/texmf-dist/doc/latex/buctthesis/buctthesis.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/buctthesis/main.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/buctthesis/main.tex	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/doc/latex/buctthesis/main.tex	2021-10-07 20:33:22 UTC (rev 60708)
@@ -4,6 +4,7 @@
 	type = bachelor,	% bachelor | master | doctor
 	%submit,
 	%openany,			% openany | openright(default)
+	fontset = windows,  % fandol | windows (normal)
 ]{buctthesis}
 
 % 在这个文件里载入其他对写作有帮助的宏包,或自定义命令等
@@ -17,17 +18,17 @@
 	etitle		= {HOW TO \TeX\ WITH BUCTthesis: AN EXAMPLE},
 	% 作者姓名
 	cauthor		= {张三},
-	% 班级,仅本科
+	% 班级
 	class		= {某某1024},
-	% 学号,仅本科
+	%学号
 	studentid	= {2018020999},
-	% 学院,仅本科
+	% 学院
 	school		= {材料科学与工程学院},
-	% 专业名称,仅本科
+	% 专业名称
 	major		= {高分子材料与工程},
-	% 导师的姓名与职称,仅本科
+	% 导师的姓名与职称
 	supervisor	= {李四教授},
-	% 专业负责人姓名,仅本科
+	% 专业负责人姓名
 	msupervisor	= {王五},
 	% 中文、英文关键词,各关键词间以西文逗号“,”分隔
 	ckeywords   = {论文,\LaTeX{},模板},

Modified: trunk/Master/texmf-dist/doc/latex/buctthesis/manual.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/buctthesis/manual.sty	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/doc/latex/buctthesis/manual.sty	2021-10-07 20:33:22 UTC (rev 60708)
@@ -25,7 +25,7 @@
 %% 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\ProvidesPackage{manual}[2020/01/23 document style for BUCTthesis]
+\ProvidesPackage{manual}[2021/09/25 document style for BUCTthesis]
 \RequirePackage{hypdoc}
 \PassOptionsToPackage{AutoFakeSlant}{xeCJK}
 \RequirePackage[UTF8, heading, fontset = none, linespread = 1.2,]{ctex}
@@ -56,10 +56,14 @@
         name   = {第,节},
     },
 }
+\xeCJKDeclareCharClass{CJK}{"2460->"2469}
 \setcounter{secnumdepth}{4}
 \setcounter{tocdepth}{3}
-\setmainfont{Libertinus Serif}
-\setmathfont{LibertinusMath-Regular.otf}
+\setmainfont{TeX Gyre Pagella}
+\setmonofont[
+    HyphenChar = None ,
+    UprightFont=* Light, BoldFont=* Bold,
+    SlantedFont=* Light Oblique]{CMU Typewriter Text}
 \captionsetup{strut=off, labelsep=quad, labelfont+=bf}
 \lstdefinestyle{base}{
     aboveskip        = 0 pt,
@@ -97,6 +101,8 @@
 }
 \lstnewenvironment{latex}{\lstset{style=latex}}{}
 \lstnewenvironment{shell}{\lstset{style=shell}}{}
+\let\oldCodelineNo\theCodelineNo
+\def\theCodelineNo{\textcolor{gray}{\oldCodelineNo}}
 \setlist{
     leftmargin = 0em,
     nosep
@@ -154,7 +160,7 @@
     \ctexset{section/numbering=false}%
 }
 \hypersetup{
-    pdftitle  = {BUCTthesis: 北京化工大学学位论文模板},
+    pdftitle  = {BUCTthesis:北京化工大学学位论文模板},
     pdfauthor = {Miracle0565},
 }
 \CodelineIndex

Modified: trunk/Master/texmf-dist/doc/latex/buctthesis/mycfg.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/buctthesis/mycfg.sty	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/doc/latex/buctthesis/mycfg.sty	2021-10-07 20:33:22 UTC (rev 60708)
@@ -16,7 +16,7 @@
 		\caption{#3}\label{#4}
 	\end{figure}
 }
-\newcommand{\version}{v1.1}
+\newcommand{\version}{v1.2}
 \newcommand{\cs}[1]{\texttt{\textbackslash#1}}
 \newcommand{\file}{\textsf}
 \newcommand{\pkg}{\textsf}

Deleted: trunk/Master/texmf-dist/doc/latex/buctthesis/resume.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/buctthesis/resume.tex	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/doc/latex/buctthesis/resume.tex	2021-10-07 20:33:22 UTC (rev 60708)
@@ -1,22 +0,0 @@
-%% 成果与简介--resume.tex
-\begin{achievements}
-	
-	\section*{发表及已接受的论文:}
-	
-	\begin{bibenumerate}
-		\item
-	\end{bibenumerate}
-
-	\section*{成果及专利:}
-	\begin{bibenumerate}
-		\item 
-	\end{bibenumerate}
-
-\end{achievements}
-
-
-\begin{resume}
-	\section*{作者简介:} \zhlipsum[1]
-	
-	\section*{导师简介:} \zhlipsum[2]
-\end{resume}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/buctthesis/thesisbib.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/buctthesis/thesisbib.bib	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/doc/latex/buctthesis/thesisbib.bib	2021-10-07 20:33:22 UTC (rev 60708)
@@ -22,7 +22,7 @@
   publisher = {ACS Publications}
 }
 @software{buctthesis,
-  title    = {{BUCTthesis: A LaTeX writting template for BUCT undergraduate thesis}},
+  title    = {{BUCTthesis: A LaTeX writting template for BUCT thesis}},
   author   = {{Miracle0565}},
   year     = {2020},
   urldate  = {2020-04-08},

Modified: trunk/Master/texmf-dist/source/latex/buctthesis/buctthesis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/buctthesis/buctthesis.dtx	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/source/latex/buctthesis/buctthesis.dtx	2021-10-07 20:33:22 UTC (rev 60708)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2019-2020 by Miracle0565
+% Copyright (C) 2019-2021 by Miracle0565
 %
 %     https://github.com/Miracle0565/BUCTthesis
 % -------------------------------------------------------
@@ -20,7 +20,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \iffalse
 %<*driver>
-\ProvidesFile{buctthesis.dtx}[2020/03/23 v1.1 BUCT Thesis Template]
+\ProvidesFile{buctthesis.dtx}[2021/09/10 v1.2 BUCT Thesis Template]
 \documentclass{ltxdoc}
 \usepackage{manual}
 \begin{document}
@@ -186,7 +186,7 @@
 %     sOmetHInG GoEs wRoNg.
 %   \end{document}
 %       \end{latex}
-%    \item 如果有必要的话可以将 \file{.log} 文件通过 \url{https://paste.ubuntu.com} 一并提交。
+%    \item 如果有必要的话可以将 \file{.log} 文件通过 \href{https://pastebin.com/}{Pastebin} 一并提交。
 % \end{enumerate}
 %
 % \section{使用说明}\label{sec:usage}
@@ -197,9 +197,10 @@
 % 主文件 \file{main.tex} 以
 % \begin{latex}
 %   \documentclass[
-%       type = doctor,    % bachelor | master | doctor
+%       type = doctor,          % bachelor | master | doctor
+%       fontset = windows,      % fandol | windows | ...
 %       submit,
-%       openany,          % openany | openright(default)
+%       openany,                % openany | openright(default)
 %   ]{buctthesis}
 % \end{latex}
 % 命令载入文档类,从而控制全文格式。
@@ -217,8 +218,29 @@
 %   \documentclass[type = bachelor,]{buctthesis}
 % \end{latex}
 %
+% \DescribeOpt{fontset = }
+% 该选项会传递至 \pkg{ctex} 宏集,从而指定全文的字体。模板的设置如表~\ref{tab:fontset}~所示。
+% 
+% 其中选项 \opt{fandol} 或使用 \opt{\meta{others}} 选项 \footnote{参见\pkg{ctex}宏集第 4.3 小节。}是为了一些不方便安装字体的系统或平台(如 Overleaf)所采取的\emph{临时解决方案}。
+% 这些字体与中易系列字体有少许差别,且偶尔有缺字现象。
+% 因此,强烈建议在最后提交论文前,在合适的环境下使用 \opt{fontset = windows} 进行编译。
+%
+% \begin{table}[ht]
+%   \centering
+%   \caption{模板的字体配置}\label{tab:fontset}
+%     \begin{tabular}{llll}
+%         \toprule
+%         \opt{fontset =}   & \opt{windows} & \opt{fandol} & \opt{\meta{others}}\\
+%         \midrule
+%         中文      & 中易字库 (宋、黑开启伪粗体)  & Fandol 字库 & / \\
+%         西文      & Times New Roman             & Times New Roman & Times New Roman \\
+%         \bottomrule
+%     \end{tabular}
+% \end{table}
+%
 % \DescribeOpt{submit}
-% 是否为提交版本。如果启用则会将文章超链接和代码块的颜色全部设置为黑色,适合论文最终提交与付梓。
+% 是否为提交版本。如果启用则会将文章超链接和代码块的文字颜色全部设置为黑色,适合论文最终提交与付梓。
+% 需要提醒的是,它不能转换插图的颜色。
 %
 % \DescribeOpt{openright}
 % \DescribeOpt{openany}
@@ -584,6 +606,8 @@
 %
 % 与本科模板不同的是,BUCTthesis 的硕博模板在 \file{cover} 文件夹中仿制了学校的封面。
 % 在该文件夹中的三个文件都与封面有关,编译时请确保它们位于同一路径之下。
+%
+% \emph{注意:这里的“仿制”仅是实现封面的效果,学校印制的封面需要手写内容,故不能替代学校统一印制的封面。}
 % \begin{enumerate}
 %    \item \file{cover.tex}:源文档。与 \cs{buctsetup} 类似,这里使用\cs{coversetup} 定义论文信息。
 % \begin{latex}
@@ -590,7 +614,7 @@
 %   \coversetup{
 %       % 学号,位于封面的右上角
 %       studentid = {2021010234},
-%       % 标题。封面的标题有两行,每一行控制在 13 个汉字长度以内
+%       % 标题。封面的标题有两行,每一行控制在 18 个汉字长度以内
 %       titleA = {甲乙丙丁戊己庚辛壬癸一二三},
 %       titleB = {四五六七八九十甲乙丙丁戊己},
 %       % 作者
@@ -620,9 +644,9 @@
 %
 % 所使用的字体清单:
 % \begin{enumerate}
-%    \item SimSun,宋体(特指中易宋体)
-%    \item SimHei,黑体(特指中易黑体)
-%    \item KaiTi,楷体(特指中易楷体)
+%    \item SimSun,中易宋体
+%    \item SimHei,中易黑体
+%    \item KaiTi,中易楷体
 %    \item STXingkai,华文行楷
 %    \item FZDaBiaoSong-B06S,方正大标宋简体
 %    \item FZXiaoBiaoSong-B05S,方正小标宋简体
@@ -638,7 +662,7 @@
 %    \begin{macrocode}
 %<class|cover>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<*class>
-\ProvidesClass{buctthesis}[2020/03/20 v1.1 BUCT Thesis Template]
+\ProvidesClass{buctthesis}[2021/09/10 v1.2 BUCT Thesis Template]
 %    \end{macrocode}
 %
 % 装载 \pkg{ifxetex} 宏包,并通过 \cs{RequireXeTeX} 命令检查编译命令。
@@ -868,17 +892,37 @@
 %    \end{macrocode}
 %
 % \subsection{字体配置}
-% 以下仅对 Windows 系统下做了适配。
+% \begin{macro}{\buct at fontsetval}
+% 首先来设置中文的字体。在 \pkg{ctex} 宏集中的 \cs{g\_\_ctex\_fontset\_tl} 存储着选项 \opt{fontset} 的值。
+% 模板尽可能避免使用 \LaTeX 3 语法,所以先用一个 \cs{buct at fontsetval} 来保存它。
+%    \begin{macrocode}
+\newcommand\buct at fontsetval{\csname g__ctex_fontset_tl\endcsname}
+%    \end{macrocode}
+% \end{macro}
 %
-% 开启“伪粗体”和“伪斜体”,并设置的相关系数。
+% 根据\cs{buct at fontsetval} 的值,分别设置不同的字体。
+%
 %    \begin{macrocode}
-\xeCJKsetup{EmboldenFactor=2.2,SlantFactor=0.2}
-\setCJKmainfont{SimSun}[AutoFakeBold,AutoFakeSlant]
-\setCJKsansfont{SimHei}[AutoFakeBold]
+\ifthenelse{\equal{\buct at fontsetval}{windows}}{
 %    \end{macrocode}
 %
+% 在 Windows 系统下,需要对中易宋体、中易黑体开启“伪粗”和“伪斜”,并设置相关系数。
+%    \begin{macrocode}
+    \xeCJKsetup{EmboldenFactor=2.2,SlantFactor=0.2}
+    \setCJKmainfont{SimSun}[AutoFakeBold,AutoFakeSlant]
+    \setCJKsansfont{SimHei}[AutoFakeBold]
+}
+%    \end{macrocode}
+% 而在非Windows 系统下,则由 \pkg{ctex} 宏集自动检测环境并保留其默认设置,
+% 同时警告所使用的字体与《规范》(即默认设置)存在不同。
+%    \begin{macrocode}
+{
+    \ClassWarning{buctthesis}{The fonts differ to the default.}
+}
+%    \end{macrocode}
+%
 % \begin{macro}{\bfsong}
-% 设置“伪粗体”后,使用 \cs{bfseries}将产生加粗的宋体,
+% 因设置中易宋体开启“伪粗体”,使用 \cs{bfseries}将产生加粗的效果,
 % 这与一般的 \LaTeX\ 常识是相悖的。
 % 因此模板提供了更明确的命令 \cs{bfsong}。
 %    \begin{macrocode}
@@ -887,7 +931,7 @@
 % \end{macro}
 % \begin{macro}{\bfhei}
 %
-% 对于黑体同理。此外要注意模板将预设的无衬线字体(微软雅黑)改为了黑体。
+% 对于黑体同理。此外要注意模板将Windows下预设的无衬线字体(微软雅黑)改为了黑体。
 %    \begin{macrocode}
 \newcommand{\bfhei}{\sffamily\bfseries}
 %    \end{macrocode}
@@ -914,6 +958,11 @@
 }{}
 %    \end{macrocode}
 %
+%
+% 指定 Unicode 中带圈数字 \symbol{"2460}--\symbol{"2469} 使用中文字体。
+%    \begin{macrocode}
+\xeCJKDeclareCharClass{CJK}{"2460->"2469}
+%    \end{macrocode}
 % 页眉与页脚的字体。
 %    \begin{macrocode}
 \newcommand{\buct at headfont}{\zihao{-5}\songti}
@@ -939,7 +988,7 @@
 %    \begin{macrocode}
 \ifbuct at bachelor
     \newcommand{\buct at abs@titfont}{\zihao{3}\bfsong}
-    \newcommand{\buct at abs@infofont}{\zihao{5}\songti}
+    \newcommand{\buct at abs@infofont}{\zihao{5}\mdseries}
     \newcommand{\buct at abs@absfont}{\zihao{4}\songti}
     \newcommand{\buct at keywordsfont}{\zihao{4}\heiti\CJKfamily+{}}
     \newcommand{\buct at abs@titfonten}{\zihao{3}\bfseries}
@@ -1311,22 +1360,27 @@
     \newenvironment{cabstract}{%
         \cleardoublepage
         \buct at pdfmark{\buct at cabstract@title}{cabstract}
-        \centerline{\buct at abs@titfont\buct at ctitle}\vspace{22pt}%
-        \centerline{%
+        \begin{center}
+            \buct at abs@titfont\buct at ctitle
+            \vskip22pt
             \buct at abs@infofont\buct at cauthor\quad%
             \buct at class\quad\buct at studentid\quad%
             \buct at supervisor@title\buct at supervisor%
-        }\vspace{22pt}%
-        \centerline{\buct at abs@absfont\buct at cabstract@title}\vspace{22pt}%
-    }{\par\vspace{1em}\noindent\buct at keywordsfont\buct at ckeywords@title\buct at ckeywords}
+            \vskip22pt
+            \buct at abs@absfont\buct at cabstract@title
+        \end{center}\par\vspace{18pt}
+    }{\vskip1em\noindent\buct at keywordsfont\buct at ckeywords@title\buct at ckeywords}
 \else
     \newenvironment{cabstract}{%
         \cleardoublepage
         \buct at pdfmark{\buct at cabstract@title}{cabstract}\markboth{\buct at cabstract@title}{}
-        \centerline{\buct at abs@titfont\buct at ctitle}\vspace{24pt}%
-        \centerline{\buct at abs@absfont\buct at cabstract@title}\vspace{24pt}%
+        \begin{center}
+            \buct at abs@titfont\buct at ctitle
+            \vskip24pt
+            \buct at abs@absfont\buct at cabstract@title
+        \end{center}\par\vspace{12pt}
         \buct at abs@textfont
-    }{\par\vspace{24pt}%
+    }{\vskip24pt%
     \noindent\buct at keywords@titfont\buct at ckeywords@title\buct at keywords@font\buct at ckeywords}
 \fi
 %    \end{macrocode}
@@ -1339,21 +1393,24 @@
     \newenvironment{eabstract}{%
         \cleardoublepage%
         \buct at pdfmark{\buct at eabstract@title}{abstracten}
-        \centerline{\buct at abs@titfonten{\buct at etitle}}\vspace{22pt}%
-        \centerline{\buct at abs@absfonten\buct at eabstract@title}\vspace{22pt}%
-    }{\par\vspace{1em}\noindent\buct at keywordsfonten \buct at ekeywords@title\buct at ekeywords}
+        \begin{center}
+            \buct at abs@titfonten\buct at etitle\vskip22pt
+            \buct at abs@absfonten\buct at eabstract@title
+        \end{center}
+        \par\vspace{22pt}
+    }{\vskip1em\noindent\buct at keywordsfonten \buct at ekeywords@title\buct at ekeywords}
 \else
     \newenvironment{eabstract}{%
         \cleardoublepage%
-        \buct at pdfmark{\buct at eabstract@title}{eabstract}\markboth{\buct at eabstract@title}{}
-        {
-            \setlength{\leftskip}{3em plus 1em minus .5em}
-            \setlength{\rightskip}{3em plus 1em minus .5em}
-            \centerline{\buct at abs@titfonten\buct at etitle}\vspace{72pt}
-            \centerline{\buct at abs@absfonten\buct at eabstract@title}\vspace{48pt}
-        }
+        \buct at pdfmark{\buct at eabstract@title}{eabstract}\markboth{\buct at eabstract@title}{} 
+            \begin{center}
+                \setlength{\leftskip}{3em plus 1em minus .5em}
+                \setlength{\rightskip}{3em plus 1em minus .5em}
+                \buct at abs@titfonten\buct at etitle\vskip76pt
+                \buct at abs@absfonten\buct at eabstract@title
+            \end{center}\par\vspace{40pt}
         \buct at abs@textfont
-    }{\par\vspace{48pt}%
+    }{\vskip48pt%
     \noindent\buct at keywords@titfonten\buct at ekeywords@title\buct at keywords@fonten\buct at ekeywords}
 \fi
 %    \end{macrocode}
@@ -1523,7 +1580,7 @@
     \newcommand{\buct at listof}[2]{%
         \xpatchcmd{\@dottedtocline}{\hbox{.}}{\hbox{$\cdot$}}{}{}
         \renewcommand{\@dotsep}{1.7}%
-            \@ifundefined{ext@#1}{\float at error{#1}}{%
+        \@ifundefined{ext@#1}{\float at error{#1}}{%
             \@namedef{l@#1}{\@dottedtocline{1}{0em}{2em}}
             \float at listhead{\buct at toc@tocfont{}#2}%
             \begingroup\setlength{\parskip}{\z@}%
@@ -1776,8 +1833,8 @@
 % 在“符号说明表”中我们嵌套了 \env{longtable} 环境,但其中的字号仍应为小四号。
 % 因此这里需要保留原先的定义。
 %    \begin{macrocode}
-    \let\oldlongtable=\longtable
-    \let\endoldlongtable=\endlongtable
+    \let\oldlongtable\longtable
+    \let\endoldlongtable\endlongtable
 \ifbuct at bachelor\relax\else
     \def\longtable{\zihao{5}\oldlongtable}
     \AtEndEnvironment{longtable}{\normalsize}
@@ -2045,7 +2102,7 @@
 % 由于学校会统一印制封面,这里仅提供\emph{硕博论文封面}的一个参考实现。
 %    \begin{macrocode}
 %<*cover>
-\ProvidesClass{buctcover}[2020/03/20 Cover Maker for BUCTthesis]
+\ProvidesClass{buctcover}[2021/04/24 Cover Maker for BUCTthesis]
 \RequirePackage{ifxetex}
 \RequireXeTeX
 \RequirePackage{kvoptions}
@@ -2101,9 +2158,9 @@
 ]{geometry}
 %    \end{macrocode}
 %
-% 载入表格与插图的宏包。
+% 载入表格、插图、计算尺寸的宏包。
 %    \begin{macrocode}
-\RequirePackage{array,graphicx,hyperref}
+\RequirePackage{array,graphicx,calc,hyperref}
 %    \end{macrocode}
 %
 % 清空页眉页脚。
@@ -2118,9 +2175,10 @@
 \xeCJKsetup{EmboldenFactor=2.3}
 %    \end{macrocode}
 %
-% 各种字体的声明与设置。分别是:中易黑体、华文行楷、中易楷体、方正小标宋和方正大标宋。
+% 各种字体的声明与设置。分别是:中易宋体、中易黑体、华文行楷、中易楷体、方正小标宋和方正大标宋。
 % 后二者需前往方正字库网站下载。
 %    \begin{macrocode}
+\setCJKmainfont{SimSun}[AutoFakeBold]
 \setCJKsansfont{SimHei}[AutoFakeBold]
 \newCJKfontfamily[xingkai]\xingkai{STXingkai}
 \newCJKfontfamily[zhkai]  \zhkai  {KaiTi} [AutoFakeBold]
@@ -2133,6 +2191,13 @@
 % \usepackage[unit=cm,type=upperleft,hshift=0cm,vshift=0cm]{fgruler}
 %    \end{macrocode}
 %
+% 定义下划线命令,这里利用了 \pkg{calc} 宏包的 \cs{widthof} 命令,
+% 取 \cs{buct at titleA} (即首行标题)的长度,用以固定下划线的长度。
+%    \begin{macrocode}
+\newcommand\buct at title@ul[1]{%
+    \CJKunderline{\makebox[\widthof{\buct at titleA\enspace}][l]{#1}}
+}
+%    \end{macrocode}
 % 日期格式处理,将输入的 \cs{buct at date} 拆分。
 %    \begin{macrocode}
 \newcommand\buct at format@date[1]{%
@@ -2214,20 +2279,19 @@
         \begin{tabular}{
             >{\begin{CJKfilltwosides}[b]{4\ccwd}\sffamily\bfseries}r%
             <{\end{CJKfilltwosides}}%
-            @{}l%
-            @{}>{\zihao{3}\bfseries}l%
+            @{}>{\enspace\zihao{3}\bfseries}l%
             <{\vspace{.2em}}%
         }
 %    \end{macrocode}
 %
-% 题目需要手动断行,且长度宜控制在 \SI{26}{em} 以内。
+% 题目需要手动断行,且长度控制在 \SI{36}{em} 以内。
 % 因表格本身的横线与文字间距较大,这里采用下划线的方式来划线。
 %    \begin{macrocode}
-            题目     &:           & \CJKunderline{\makebox[13em][l]{\buct at titleA}}\\
-                    &\phantom{:} & \CJKunderline{\makebox[13em][l]{\buct at titleB}}\\
-            专业     &:           & \CJKunderline{\makebox[13em][l]{\buct at major}}\\
-            研究生   &:           & \CJKunderline{\makebox[13em][l]{\buct at author}}\\
-            指导教师 &:           & \CJKunderline{\makebox[13em][l]{\buct at supervisor}}\\
+            题目     & \buct at title@ul{\buct at titleA}\\
+                    &\buct at title@ul{\buct at titleB}\\
+            专业     & \buct at title@ul{\zihao{4}\buct at major}\\
+            研究生   & \buct at title@ul{\zihao{4}\buct at author}\\
+            指导教师 & \buct at title@ul{\zihao{4}\buct at supervisor}\\
         \end{tabular}
     \end{center}
 %    \end{macrocode}
@@ -2264,7 +2328,7 @@
 % \iffalse
 %    \begin{macrocode}
 %<*manual>
-\ProvidesPackage{manual}[2020/01/23 document style for BUCTthesis]
+\ProvidesPackage{manual}[2021/09/25 document style for BUCTthesis]
 \RequirePackage{hypdoc}
 \PassOptionsToPackage{AutoFakeSlant}{xeCJK}
 \RequirePackage[UTF8, heading, fontset = none, linespread = 1.2,]{ctex}
@@ -2295,10 +2359,14 @@
         name   = {第,节},
     },
 }
+\xeCJKDeclareCharClass{CJK}{"2460->"2469}
 \setcounter{secnumdepth}{4}
 \setcounter{tocdepth}{3}
-\setmainfont{Libertinus Serif}
-\setmathfont{LibertinusMath-Regular.otf}
+\setmainfont{TeX Gyre Pagella}
+\setmonofont[
+    HyphenChar = None ,
+    UprightFont=* Light, BoldFont=* Bold,
+    SlantedFont=* Light Oblique]{CMU Typewriter Text}
 \captionsetup{strut=off, labelsep=quad, labelfont+=bf}
 \lstdefinestyle{base}{
     aboveskip        = 0 pt,
@@ -2336,6 +2404,8 @@
 }
 \lstnewenvironment{latex}{\lstset{style=latex}}{}
 \lstnewenvironment{shell}{\lstset{style=shell}}{}
+\let\oldCodelineNo\theCodelineNo
+\def\theCodelineNo{\textcolor{gray}{\oldCodelineNo}}
 \setlist{
     leftmargin = 0em,
     nosep
@@ -2393,7 +2463,7 @@
     \ctexset{section/numbering=false}%
 }
 \hypersetup{
-    pdftitle  = {BUCTthesis: 北京化工大学学位论文模板},
+    pdftitle  = {BUCTthesis:北京化工大学学位论文模板},
     pdfauthor = {Miracle0565},
 }
 \CodelineIndex

Modified: trunk/Master/texmf-dist/source/latex/buctthesis/buctthesis.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/buctthesis/buctthesis.ins	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/source/latex/buctthesis/buctthesis.ins	2021-10-07 20:33:22 UTC (rev 60708)
@@ -46,9 +46,13 @@
     \usedir{tex/latex/buctthesis}
     \file{buctthesis.cls}{\from{\jobname.dtx}{class} }
 	\file{manual.sty}    {\from{\jobname.dtx}{manual}}
-	\file{buctcover.cls} {\from{\jobname.dtx}{cover}}
 }
 
+\generate{
+    \usedir{tex/latex/buctthesis/cover}
+    \file{buctcover.cls}{\from{\jobname.dtx}{cover}}
+}
+
 \obeyspaces
 \Msg{*************************************************************}
 \Msg{*                                                           *}

Modified: trunk/Master/texmf-dist/tex/latex/buctthesis/buctcover.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/buctthesis/buctcover.cls	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/tex/latex/buctthesis/buctcover.cls	2021-10-07 20:33:22 UTC (rev 60708)
@@ -26,7 +26,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesClass{buctcover}[2020/03/20 Cover Maker for BUCTthesis]
+\ProvidesClass{buctcover}[2021/04/24 Cover Maker for BUCTthesis]
 \RequirePackage{ifxetex}
 \RequireXeTeX
 \RequirePackage{kvoptions}
@@ -67,14 +67,18 @@
     top = 2.1cm, bottom = 2.2cm, left = 2cm, right = 2cm,
     headheight = 0cm, footskip = 0cm
 ]{geometry}
-\RequirePackage{array,graphicx,hyperref}
+\RequirePackage{array,graphicx,calc,hyperref}
 \pagestyle{empty}
 \xeCJKsetup{EmboldenFactor=2.3}
+\setCJKmainfont{SimSun}[AutoFakeBold]
 \setCJKsansfont{SimHei}[AutoFakeBold]
 \newCJKfontfamily[xingkai]\xingkai{STXingkai}
 \newCJKfontfamily[zhkai]  \zhkai  {KaiTi} [AutoFakeBold]
 \newCJKfontfamily[xbsong] \xbsong {FZXiaoBiaoSong-B05S}
 \newCJKfontfamily[dbsong] \dbsong {FZDaBiaoSong-B06S}
+\newcommand\buct at title@ul[1]{%
+    \CJKunderline{\makebox[\widthof{\buct at titleA\enspace}][l]{#1}}
+}
 \newcommand\buct at format@date[1]{%
     \edef\buct@@date{\buct at date}%
     \def\buct@@process at date##1-##2-##3\@nil{%
@@ -121,15 +125,14 @@
         \begin{tabular}{
             >{\begin{CJKfilltwosides}[b]{4\ccwd}\sffamily\bfseries}r%
             <{\end{CJKfilltwosides}}%
-            @{}l%
-            @{}>{\zihao{3}\bfseries}l%
+            @{}>{\enspace\zihao{3}\bfseries}l%
             <{\vspace{.2em}}%
         }
-            题目     &:           & \CJKunderline{\makebox[13em][l]{\buct at titleA}}\\
-                    &\phantom{:} & \CJKunderline{\makebox[13em][l]{\buct at titleB}}\\
-            专业     &:           & \CJKunderline{\makebox[13em][l]{\buct at major}}\\
-            研究生   &:           & \CJKunderline{\makebox[13em][l]{\buct at author}}\\
-            指导教师 &:           & \CJKunderline{\makebox[13em][l]{\buct at supervisor}}\\
+            题目     & \buct at title@ul{\buct at titleA}\\
+                    &\buct at title@ul{\buct at titleB}\\
+            专业     & \buct at title@ul{\zihao{4}\buct at major}\\
+            研究生   & \buct at title@ul{\zihao{4}\buct at author}\\
+            指导教师 & \buct at title@ul{\zihao{4}\buct at supervisor}\\
         \end{tabular}
     \end{center}
     \vfill{%

Modified: trunk/Master/texmf-dist/tex/latex/buctthesis/buctthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/buctthesis/buctthesis.cls	2021-10-06 23:47:21 UTC (rev 60707)
+++ trunk/Master/texmf-dist/tex/latex/buctthesis/buctthesis.cls	2021-10-07 20:33:22 UTC (rev 60708)
@@ -26,7 +26,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesClass{buctthesis}[2020/03/20 v1.1 BUCT Thesis Template]
+\ProvidesClass{buctthesis}[2021/09/10 v1.2 BUCT Thesis Template]
 \RequirePackage{ifxetex}
 \RequireXeTeX
 \RequirePackage{kvoptions}
@@ -109,9 +109,15 @@
     \RequirePackage[pagewise]{lineno}
 \fi
 \RequirePackage{hyperref}
-\xeCJKsetup{EmboldenFactor=2.2,SlantFactor=0.2}
-\setCJKmainfont{SimSun}[AutoFakeBold,AutoFakeSlant]
-\setCJKsansfont{SimHei}[AutoFakeBold]
+\newcommand\buct at fontsetval{\csname g__ctex_fontset_tl\endcsname}
+\ifthenelse{\equal{\buct at fontsetval}{windows}}{
+    \xeCJKsetup{EmboldenFactor=2.2,SlantFactor=0.2}
+    \setCJKmainfont{SimSun}[AutoFakeBold,AutoFakeSlant]
+    \setCJKsansfont{SimHei}[AutoFakeBold]
+}
+{
+    \ClassWarning{buctthesis}{The fonts differ to the default.}
+}
 \newcommand{\bfsong}{\bfseries}
 \newcommand{\bfhei}{\sffamily\bfseries}
 \setmainfont{Times New Roman}
@@ -127,6 +133,7 @@
         }
     ]{LibertinusMath-Regular.otf}
 }{}
+\xeCJKDeclareCharClass{CJK}{"2460->"2469}
 \newcommand{\buct at headfont}{\zihao{-5}\songti}
 \newcommand{\buct at footfont}{\zihao{-5}\songti}
 \ifbuct at bachelor
@@ -140,7 +147,7 @@
 \fi
 \ifbuct at bachelor
     \newcommand{\buct at abs@titfont}{\zihao{3}\bfsong}
-    \newcommand{\buct at abs@infofont}{\zihao{5}\songti}
+    \newcommand{\buct at abs@infofont}{\zihao{5}\mdseries}
     \newcommand{\buct at abs@absfont}{\zihao{4}\songti}
     \newcommand{\buct at keywordsfont}{\zihao{4}\heiti\CJKfamily+{}}
     \newcommand{\buct at abs@titfonten}{\zihao{3}\bfseries}
@@ -390,22 +397,27 @@
     \newenvironment{cabstract}{%
         \cleardoublepage
         \buct at pdfmark{\buct at cabstract@title}{cabstract}
-        \centerline{\buct at abs@titfont\buct at ctitle}\vspace{22pt}%
-        \centerline{%
+        \begin{center}
+            \buct at abs@titfont\buct at ctitle
+            \vskip22pt
             \buct at abs@infofont\buct at cauthor\quad%
             \buct at class\quad\buct at studentid\quad%
             \buct at supervisor@title\buct at supervisor%
-        }\vspace{22pt}%
-        \centerline{\buct at abs@absfont\buct at cabstract@title}\vspace{22pt}%
-    }{\par\vspace{1em}\noindent\buct at keywordsfont\buct at ckeywords@title\buct at ckeywords}
+            \vskip22pt
+            \buct at abs@absfont\buct at cabstract@title
+        \end{center}\par\vspace{18pt}
+    }{\vskip1em\noindent\buct at keywordsfont\buct at ckeywords@title\buct at ckeywords}
 \else
     \newenvironment{cabstract}{%
         \cleardoublepage
         \buct at pdfmark{\buct at cabstract@title}{cabstract}\markboth{\buct at cabstract@title}{}
-        \centerline{\buct at abs@titfont\buct at ctitle}\vspace{24pt}%
-        \centerline{\buct at abs@absfont\buct at cabstract@title}\vspace{24pt}%
+        \begin{center}
+            \buct at abs@titfont\buct at ctitle
+            \vskip24pt
+            \buct at abs@absfont\buct at cabstract@title
+        \end{center}\par\vspace{12pt}
         \buct at abs@textfont
-    }{\par\vspace{24pt}%
+    }{\vskip24pt%
     \noindent\buct at keywords@titfont\buct at ckeywords@title\buct at keywords@font\buct at ckeywords}
 \fi
 \ifbuct at bachelor
@@ -412,21 +424,24 @@
     \newenvironment{eabstract}{%
         \cleardoublepage%
         \buct at pdfmark{\buct at eabstract@title}{abstracten}
-        \centerline{\buct at abs@titfonten{\buct at etitle}}\vspace{22pt}%
-        \centerline{\buct at abs@absfonten\buct at eabstract@title}\vspace{22pt}%
-    }{\par\vspace{1em}\noindent\buct at keywordsfonten \buct at ekeywords@title\buct at ekeywords}
+        \begin{center}
+            \buct at abs@titfonten\buct at etitle\vskip22pt
+            \buct at abs@absfonten\buct at eabstract@title
+        \end{center}
+        \par\vspace{22pt}
+    }{\vskip1em\noindent\buct at keywordsfonten \buct at ekeywords@title\buct at ekeywords}
 \else
     \newenvironment{eabstract}{%
         \cleardoublepage%
         \buct at pdfmark{\buct at eabstract@title}{eabstract}\markboth{\buct at eabstract@title}{}
-        {
-            \setlength{\leftskip}{3em plus 1em minus .5em}
-            \setlength{\rightskip}{3em plus 1em minus .5em}
-            \centerline{\buct at abs@titfonten\buct at etitle}\vspace{72pt}
-            \centerline{\buct at abs@absfonten\buct at eabstract@title}\vspace{48pt}
-        }
+            \begin{center}
+                \setlength{\leftskip}{3em plus 1em minus .5em}
+                \setlength{\rightskip}{3em plus 1em minus .5em}
+                \buct at abs@titfonten\buct at etitle\vskip76pt
+                \buct at abs@absfonten\buct at eabstract@title
+            \end{center}\par\vspace{40pt}
         \buct at abs@textfont
-    }{\par\vspace{48pt}%
+    }{\vskip48pt%
     \noindent\buct at keywords@titfonten\buct at ekeywords@title\buct at keywords@fonten\buct at ekeywords}
 \fi
 \setcounter{secnumdepth}{3}
@@ -512,7 +527,7 @@
     \newcommand{\buct at listof}[2]{%
         \xpatchcmd{\@dottedtocline}{\hbox{.}}{\hbox{$\cdot$}}{}{}
         \renewcommand{\@dotsep}{1.7}%
-            \@ifundefined{ext@#1}{\float at error{#1}}{%
+        \@ifundefined{ext@#1}{\float at error{#1}}{%
             \@namedef{l@#1}{\@dottedtocline{1}{0em}{2em}}
             \float at listhead{\buct at toc@tocfont{}#2}%
             \begingroup\setlength{\parskip}{\z@}%
@@ -667,8 +682,8 @@
     \AtBeginEnvironment{tabular}{\buct at floatfont}
     \AtBeginEnvironment{tabularx}{\buct at floatfont}
 \fi
-    \let\oldlongtable=\longtable
-    \let\endoldlongtable=\endlongtable
+    \let\oldlongtable\longtable
+    \let\endoldlongtable\endlongtable
 \ifbuct at bachelor\relax\else
     \def\longtable{\zihao{5}\oldlongtable}
     \AtEndEnvironment{longtable}{\normalsize}



More information about the tex-live-commits mailing list.