summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-09-08 20:41:34 +0000
committerKarl Berry <karl@freefriends.org>2021-09-08 20:41:34 +0000
commita4744c566f2db68394ceb7958316b04085e849a3 (patch)
tree3f110342c1f1ebf59b69e298948b75caa5c96cf3 /Master/texmf-dist/tex
parent3af62c5c3b5ff19a6b3a755dfbd25582d87f06b8 (diff)
bithesis (8sep21)
git-svn-id: svn://tug.org/texlive/trunk@60452 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bitart.cls2
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bitbook.cls78
2 files changed, 74 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitart.cls b/Master/texmf-dist/tex/latex/bithesis/bitart.cls
index 9755dec0c9d..5db896f07f0 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bitart.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bitart.cls
@@ -27,7 +27,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{bitart}
- [2021/01/06 v1.0.1 BIT Thesis Templates]
+ [2021/09/07 v1.1.0 BIT Thesis Templates]
\newif\if@bit@labreport
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitbook.cls b/Master/texmf-dist/tex/latex/bithesis/bitbook.cls
index 893b8051d62..9d1061a1b11 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bitbook.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bitbook.cls
@@ -27,15 +27,29 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{bitbook}
- [2021/01/06 v1.0.1 BIT Thesis Templates]
+ [2021/09/07 v1.1.0 BIT Thesis Templates]
\newif\if@bit@bachelor
+\newif\if@bit@docTranslation
\newif\if@bit@master
\newif\if@bit@docter
+\RequirePackage{kvoptions}
+
+\SetupKeyvalOptions{
+ family=BIThesis,
+ prefix=BIThesis@
+}
+
+\DeclareStringOption[14pt]{footskip}
+\DeclareBoolOption{titleNumberHeiti}
+\ProcessKeyvalOptions*
+
\DeclareOption{bachelor}{\@bit@bachelortrue}
+\DeclareOption{translation}{\@bit@docTranslationtrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
+
\ExecuteOptions{bachelor}
\ProcessOptions\relax
@@ -62,6 +76,8 @@
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{pdfpages}
+\RequirePackage{listings}
+
\RequirePackage[
backend=biber,
@@ -81,11 +97,17 @@
\setCJKfamilyfont{xihei}[AutoFakeBold,AutoFakeSlant]{[STXIHEI.TTF]} % 若希望使用本机字体,也可以用 {STXihei} 来调用
\newcommand{\xihei}{\CJKfamily{xihei}}
+\ifBIThesis@titleNumberHeiti
+ \newcommand{\arabicHeiti}[1]{\xeCJKsetup{CJKspace=true}\xeCJKDeclareCharClass{CJK}{`0 -> `9}{\heiti\raisebox{-0.1ex}{#1}}\normalspacedchars{0,1,2,3,4,5,6,7,8,9}\xeCJKsetup{CJKspace=false}}
+\else
+ \newcommand{\arabicHeiti}[1]{#1}
+\fi
+
\fancypagestyle{BIThesis}{
% 页眉高度
\setlength{\headheight}{20pt}
% 页码高度(不完美,比规定稍微靠下 2mm)
- \setlength{\footskip}{14pt}
+ \setlength{\footskip}{\BIThesis@footskip}
\fancyhf{}
% 定义页眉、页码
@@ -95,9 +117,26 @@
\renewcommand{\headrulewidth}{0.6pt}
}
+\if@bit@docTranslation
+\fancypagestyle{BIThesis}{
+ % 页眉高度
+ \setlength{\headheight}{20pt}
+ % 页码高度(不完美,比规定稍微靠下 2mm)
+ \setlength{\footskip}{\BIThesis@footskip}
+
+ \fancyhf{}
+ % 定义页码
+ \fancyfoot[C]{\songti\zihao{5} \thepage}
+ % 页眉分割线稍微粗一些
+ \renewcommand{\headrulewidth}{0.6pt}
+
+ % 定义页眉
+ \fancyhead[C]{\zihao{4}\ziju{0.08}\songti{北京理工大学本科生毕业设计(论文)外文翻译}}
+}
+\fi
\ctexset{chapter={
name = {第,章},
- number = {\arabic{chapter}},
+ number = {\arabicHeiti{ \arabic{chapter} }},
format = {\heiti \bfseries \centering \zihao{3}},
aftername = \hspace{9bp},
pagestyle = BIThesis,
@@ -108,7 +147,7 @@
}
\ctexset{section={
- number = {\thechapter.\hspace{4bp}\arabic{section}},
+ number = {\arabicHeiti{\thechapter.\hspace{1bp}\arabic{section}}},
format = {\heiti \raggedright \bfseries \zihao{4}},
aftername = \hspace{8bp},
beforeskip = 20bp plus 1ex minus .2ex,
@@ -118,7 +157,7 @@
}
\ctexset{subsection={
- number = {\thechapter.\hspace{3bp}\arabic{section}.\hspace{3bp}\arabic{subsection}},
+ number = {\arabicHeiti{\thechapter.\hspace{1bp}\arabic{section}.\hspace{1bp}\arabic{subsection}}},
format = {\heiti \bfseries \raggedright \zihao{-4}},
aftername = \hspace{7bp},
beforeskip = 17bp plus 1ex minus .2ex,
@@ -160,6 +199,35 @@
\renewcommand{\thefigure}{\thechapter-\arabic{figure}}
\captionsetup[figure]{font=small,labelsep=space}
+\AtBeginDocument{
+ \renewcommand{\lstlistingname}{代码}
+ \renewcommand{\thelstlisting}{\arabic{chapter}-\arabic{lstlisting}}
+}
+
+\definecolor{codegreen}{rgb}{0,0.6,0}
+\definecolor{codegray}{rgb}{0.5,0.5,0.5}
+\definecolor{codepurple}{rgb}{0.58,0,0.82}
+\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
+\lstdefinestyle{examplestyle}{
+ backgroundcolor=\color{backcolour},
+ commentstyle=\color{codegreen},
+ keywordstyle=\color{magenta},
+ numberstyle=\tiny\color{codegray},
+ stringstyle=\color{codepurple},
+ basicstyle=\ttfamily\footnotesize,
+ breakatwhitespace=false,
+ breaklines=true,
+ captionpos=b,
+ keepspaces=true,
+ numbers=left,
+ numbersep=5pt,
+ showspaces=false,
+ showstringspaces=false,
+ showtabs=false,
+ tabsize=2
+}
+\lstset{style=examplestyle}
+
\renewcommand{\thetable}{\thechapter-\arabic{table}}
\captionsetup[table]{font=small,labelsep=space,skip=2pt}