diff options
author | Karl Berry <karl@freefriends.org> | 2021-10-07 20:33:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-10-07 20:33:22 +0000 |
commit | c764cdb0602ea9a4e41eea633127779c52b46290 (patch) | |
tree | 2c5a82e3f264601a4016cd3de40d883fce45b2f6 /Master/texmf-dist/tex/latex | |
parent | bb92e4160e16396a9c75b0ee8a5422f02ce64163 (diff) |
buctthesis (7oct21)
git-svn-id: svn://tug.org/texlive/trunk@60708 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/buctthesis/buctcover.cls | 21 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/buctthesis/buctthesis.cls | 67 |
2 files changed, 53 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/buctthesis/buctcover.cls b/Master/texmf-dist/tex/latex/buctthesis/buctcover.cls index 64a99dac6e0..e373aa444b2 100644 --- a/Master/texmf-dist/tex/latex/buctthesis/buctcover.cls +++ b/Master/texmf-dist/tex/latex/buctthesis/buctcover.cls @@ -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@title@ul[1]{% + \CJKunderline{\makebox[\widthof{\buct@titleA\enspace}][l]{#1}} +} \newcommand\buct@format@date[1]{% \edef\buct@@date{\buct@date}% \def\buct@@process@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@titleA}}\\ - &\phantom{:} & \CJKunderline{\makebox[13em][l]{\buct@titleB}}\\ - 专业 &: & \CJKunderline{\makebox[13em][l]{\buct@major}}\\ - 研究生 &: & \CJKunderline{\makebox[13em][l]{\buct@author}}\\ - 指导教师 &: & \CJKunderline{\makebox[13em][l]{\buct@supervisor}}\\ + 题目 & \buct@title@ul{\buct@titleA}\\ + &\buct@title@ul{\buct@titleB}\\ + 专业 & \buct@title@ul{\zihao{4}\buct@major}\\ + 研究生 & \buct@title@ul{\zihao{4}\buct@author}\\ + 指导教师 & \buct@title@ul{\zihao{4}\buct@supervisor}\\ \end{tabular} \end{center} \vfill{% diff --git a/Master/texmf-dist/tex/latex/buctthesis/buctthesis.cls b/Master/texmf-dist/tex/latex/buctthesis/buctthesis.cls index 4a553e67f90..2e5ef8b1707 100644 --- a/Master/texmf-dist/tex/latex/buctthesis/buctthesis.cls +++ b/Master/texmf-dist/tex/latex/buctthesis/buctthesis.cls @@ -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@fontsetval{\csname g__ctex_fontset_tl\endcsname} +\ifthenelse{\equal{\buct@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@headfont}{\zihao{-5}\songti} \newcommand{\buct@footfont}{\zihao{-5}\songti} \ifbuct@bachelor @@ -140,7 +147,7 @@ \fi \ifbuct@bachelor \newcommand{\buct@abs@titfont}{\zihao{3}\bfsong} - \newcommand{\buct@abs@infofont}{\zihao{5}\songti} + \newcommand{\buct@abs@infofont}{\zihao{5}\mdseries} \newcommand{\buct@abs@absfont}{\zihao{4}\songti} \newcommand{\buct@keywordsfont}{\zihao{4}\heiti\CJKfamily+{}} \newcommand{\buct@abs@titfonten}{\zihao{3}\bfseries} @@ -390,43 +397,51 @@ \newenvironment{cabstract}{% \cleardoublepage \buct@pdfmark{\buct@cabstract@title}{cabstract} - \centerline{\buct@abs@titfont\buct@ctitle}\vspace{22pt}% - \centerline{% + \begin{center} + \buct@abs@titfont\buct@ctitle + \vskip22pt \buct@abs@infofont\buct@cauthor\quad% \buct@class\quad\buct@studentid\quad% \buct@supervisor@title\buct@supervisor% - }\vspace{22pt}% - \centerline{\buct@abs@absfont\buct@cabstract@title}\vspace{22pt}% - }{\par\vspace{1em}\noindent\buct@keywordsfont\buct@ckeywords@title\buct@ckeywords} + \vskip22pt + \buct@abs@absfont\buct@cabstract@title + \end{center}\par\vspace{18pt} + }{\vskip1em\noindent\buct@keywordsfont\buct@ckeywords@title\buct@ckeywords} \else \newenvironment{cabstract}{% \cleardoublepage \buct@pdfmark{\buct@cabstract@title}{cabstract}\markboth{\buct@cabstract@title}{} - \centerline{\buct@abs@titfont\buct@ctitle}\vspace{24pt}% - \centerline{\buct@abs@absfont\buct@cabstract@title}\vspace{24pt}% + \begin{center} + \buct@abs@titfont\buct@ctitle + \vskip24pt + \buct@abs@absfont\buct@cabstract@title + \end{center}\par\vspace{12pt} \buct@abs@textfont - }{\par\vspace{24pt}% + }{\vskip24pt% \noindent\buct@keywords@titfont\buct@ckeywords@title\buct@keywords@font\buct@ckeywords} \fi \ifbuct@bachelor \newenvironment{eabstract}{% \cleardoublepage% \buct@pdfmark{\buct@eabstract@title}{abstracten} - \centerline{\buct@abs@titfonten{\buct@etitle}}\vspace{22pt}% - \centerline{\buct@abs@absfonten\buct@eabstract@title}\vspace{22pt}% - }{\par\vspace{1em}\noindent\buct@keywordsfonten \buct@ekeywords@title\buct@ekeywords} + \begin{center} + \buct@abs@titfonten\buct@etitle\vskip22pt + \buct@abs@absfonten\buct@eabstract@title + \end{center} + \par\vspace{22pt} + }{\vskip1em\noindent\buct@keywordsfonten \buct@ekeywords@title\buct@ekeywords} \else \newenvironment{eabstract}{% \cleardoublepage% \buct@pdfmark{\buct@eabstract@title}{eabstract}\markboth{\buct@eabstract@title}{} - { - \setlength{\leftskip}{3em plus 1em minus .5em} - \setlength{\rightskip}{3em plus 1em minus .5em} - \centerline{\buct@abs@titfonten\buct@etitle}\vspace{72pt} - \centerline{\buct@abs@absfonten\buct@eabstract@title}\vspace{48pt} - } + \begin{center} + \setlength{\leftskip}{3em plus 1em minus .5em} + \setlength{\rightskip}{3em plus 1em minus .5em} + \buct@abs@titfonten\buct@etitle\vskip76pt + \buct@abs@absfonten\buct@eabstract@title + \end{center}\par\vspace{40pt} \buct@abs@textfont - }{\par\vspace{48pt}% + }{\vskip48pt% \noindent\buct@keywords@titfonten\buct@ekeywords@title\buct@keywords@fonten\buct@ekeywords} \fi \setcounter{secnumdepth}{3} @@ -512,7 +527,7 @@ \newcommand{\buct@listof}[2]{% \xpatchcmd{\@dottedtocline}{\hbox{.}}{\hbox{$\cdot$}}{}{} \renewcommand{\@dotsep}{1.7}% - \@ifundefined{ext@#1}{\float@error{#1}}{% + \@ifundefined{ext@#1}{\float@error{#1}}{% \@namedef{l@#1}{\@dottedtocline{1}{0em}{2em}} \float@listhead{\buct@toc@tocfont{}#2}% \begingroup\setlength{\parskip}{\z@}% @@ -667,8 +682,8 @@ \AtBeginEnvironment{tabular}{\buct@floatfont} \AtBeginEnvironment{tabularx}{\buct@floatfont} \fi - \let\oldlongtable=\longtable - \let\endoldlongtable=\endlongtable + \let\oldlongtable\longtable + \let\endoldlongtable\endlongtable \ifbuct@bachelor\relax\else \def\longtable{\zihao{5}\oldlongtable} \AtEndEnvironment{longtable}{\normalsize} |