diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/bithesis/bitart.cls | 177 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bithesis/bitbook.cls | 182 |
2 files changed, 359 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitart.cls b/Master/texmf-dist/tex/latex/bithesis/bitart.cls new file mode 100644 index 00000000000..b9bce02fa75 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bithesis/bitart.cls @@ -0,0 +1,177 @@ +%% +%% This is file `bitart.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bithesis.dtx (with options: `cls,article') +%% +%% Copyright (C) 2020 +%% Association of Bit Network Pioneer and any individual authors listed in the documentation. +%% ------------------------------------------------------------------------------ +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. This version of this license is in +%% http://www.latex-project.org/lppl/lppl-1-3c.txt +%% and the latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of +%% LaTeX version 2020/11/27 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Feng Kaiyu. +%% ------------------------------------------------------------------------------ +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesClass{bitart} + [2020/11/27 v1.0.0 BIT Thesis Templates] + + +\newif\if@bit@labreport +\newif\if@bit@proposalreport + +\DeclareOption{lab-report}{\@bit@labreporttrue\@bit@proposalreportfalse} +\DeclareOption{proposal-report}{\@bit@labreportfalse\@bit@proposalreporttrue} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexart}} +\ExecuteOptions{lab-report} +\ProcessOptions\relax + +\LoadClass[UTF8,AutoFakeBold,AutoFakeSlant,zihao=-4]{ctexart}% + +\if@bit@labreport + \RequirePackage[a4paper,left=3.18cm,right=3.18cm,top=2.54cm,bottom=2.54cm,includeheadfoot]{geometry}% +\else + \RequirePackage[a4paper,left=3cm,right=2.4cm,top=2.6cm,bottom=2.38cm,includeheadfoot]{geometry} +\fi + +\RequirePackage{fontspec}% +\RequirePackage{setspace}% +\RequirePackage{graphicx}% +\RequirePackage{fancyhdr}% +\RequirePackage{pdfpages}% +\RequirePackage{setspace}% +\RequirePackage{booktabs}% +\RequirePackage{multirow}% +\RequirePackage{caption}% + +\if@bit@labreport + \RequirePackage{titlesec}% + \RequirePackage{float}% + \RequirePackage{etoolbox} +\fi + +\if@bit@proposalreport + % 设置参考文献编译后端为 biber,引用格式为 GB/T7714-2015 格式 + % 参考文献使用宏包见 https://github.com/hushidong/biblatex-gb7714-2015 + \usepackage[style=gb7714-2015,backend=biber]{biblatex} + +\fi + +\if@bit@labreport + % 将西文字体设置为 Times New Roman + \setromanfont{Times New Roman}% + + % 设置引用位于右上角 + \newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}}% + + % 设置文档标题深度 + \setcounter{tocdepth}{3}% + \setcounter{secnumdepth}{3}% + + %% + % 设置一级标题、二级标题格式 + \ctexset{section={% + format={\raggedright \bfseries \songti \zihao{-3}},% + name = {,.},% + number = \chinese{section}% + }% + }% + \ctexset{subsection={% + format = {\bfseries \songti \raggedright \zihao{-4}},% + }% + }% + + % 页眉和页脚(页码)的格式设定 + \fancyhf{}% + \fancyhead[L]{\fontsize{10.5pt}{10.5pt}\selectfont\kaishu{\reportName}}% + \fancyfoot[C]{\fontsize{9pt}{9pt}\selectfont\kaishu{\thepage}}% + \renewcommand{\headrulewidth}{0.5pt}% + \renewcommand{\footrulewidth}{0pt}% + + \AtBeginDocument{ + } +\fi + +\if@bit@proposalreport + % 定义 caption 字体为楷体 + \DeclareCaptionFont{kaiticaption}{\kaishu \normalsize} + + % 设置图片的 caption 格式 + \renewcommand{\thefigure}{\thesection-\arabic{figure}} + \captionsetup[figure]{font=small,labelsep=space,skip=10bp,labelfont=bf,font=kaiticaption} + + % 设置表格的 caption 格式 + \renewcommand{\thetable}{\thesection-\arabic{table}} + \captionsetup[table]{font=small,labelsep=space,skip=10bp,labelfont=bf,font=kaiticaption} + + % 输出大写数字日期 + \CTEXoptions[today=big] + + % 将西文字体设置为 Times New Roman + \setromanfont{Times New Roman} + + %% 将中文楷体设置为 SIMKAI.TTF(如果需要) + % \setCJKfamilyfont{zhkai}{[SIMKAI.TTF]} + % \newcommand*{\kaiti}{\CJKfamily{zhkai}} + + % 设置文档标题深度 + \setcounter{tocdepth}{3} + \setcounter{secnumdepth}{3} + + %% + % 设置一级标题、二级标题格式 + % 一级标题:小三,宋体,加粗,段前段后各半行 + \ctexset{section={ + format={\raggedright \bfseries \songti \zihao{-3}}, + beforeskip = 24bp plus 1ex minus .2ex, + afterskip = 24bp plus .2ex, + fixskip = true, + name = {,.\quad} + } + } + % 二级标题:小四,宋体,加粗,段前段后各半行 + \ctexset{subsection={ + format = {\bfseries \songti \raggedright \zihao{4}}, + beforeskip =24bp plus 1ex minus .2ex, + afterskip = 24bp plus .2ex, + fixskip = true, + } + } + % 页眉和页脚(页码)的格式设定 + \fancyhf{} + \fancyhead[R]{\fontsize{10.5pt}{10.5pt}\selectfont{北京理工大学本科生毕业设计(论文)开题报告}} + \fancyfoot[R]{\fontsize{9pt}{9pt}\selectfont{\thepage}} + \renewcommand{\headrulewidth}{1pt} + \renewcommand{\footrulewidth}{0pt} +\fi + +\AtBeginDocument{ + \if@bit@labreport + \input{../lab-report/misc/cover_v1.tex} + % 正文开始 + \pagestyle{fancy} + \setcounter{page}{1}% + \fi + \if@bit@proposalreport + % 报告封面 + \input{misc/cover.tex} + \fi + +} + +\endinput +%% +%% End of file `bitart.cls'. diff --git a/Master/texmf-dist/tex/latex/bithesis/bitbook.cls b/Master/texmf-dist/tex/latex/bithesis/bitbook.cls new file mode 100644 index 00000000000..341ad8480d9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bithesis/bitbook.cls @@ -0,0 +1,182 @@ +%% +%% This is file `bitbook.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bithesis.dtx (with options: `cls,book') +%% +%% Copyright (C) 2020 +%% Association of Bit Network Pioneer and any individual authors listed in the documentation. +%% ------------------------------------------------------------------------------ +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. This version of this license is in +%% http://www.latex-project.org/lppl/lppl-1-3c.txt +%% and the latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of +%% LaTeX version 2020/11/27 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Feng Kaiyu. +%% ------------------------------------------------------------------------------ +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesClass{bitbook} + [2020/11/27 v1.0.0 BIT Thesis Templates] + + +\newif\if@bit@bachelor +\newif\if@bit@master +\newif\if@bit@docter + +\DeclareOption{bachelor}{\@bit@bachelortrue} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}} +\ExecuteOptions{bachelor} + +\ProcessOptions\relax + +\LoadClass[UTF8,AutoFakeBold,AutoFakeSlant,zihao=-4,oneside,openany]{ctexbook} + +\RequirePackage[a4paper,left=3cm,right=2.6cm,top=3.5cm,bottom=2.9cm]{geometry} +\RequirePackage{xeCJK} +\RequirePackage{titletoc} + % \RequirePackage{fontspec} +\RequirePackage{setspace} +\RequirePackage{graphicx} +\RequirePackage{fancyhdr} +\RequirePackage{pdfpages} +\RequirePackage{setspace} +\RequirePackage{booktabs} +\RequirePackage{multirow} +\RequirePackage{caption} +\RequirePackage{tikz} +\RequirePackage{etoolbox} +\RequirePackage{hyperref} +\RequirePackage{xcolor} +\RequirePackage{caption} +\RequirePackage{array} +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage{pdfpages} + +\RequirePackage[ + backend=biber, + style=gb7714-2015, + gbalign=gb7714-2015, + gbnamefmt=lowercase, + gbpub=false, + doi=false, + url=false, + eprint=false, + isbn=false, +]{biblatex} + +\addbibresource{./misc/ref.bib} + +\setromanfont{Times New Roman} +\setCJKfamilyfont{xihei}[AutoFakeBold,AutoFakeSlant]{[STXIHEI.TTF]} % 若希望使用本机字体,也可以用 {STXihei} 来调用 +\newcommand{\xihei}{\CJKfamily{xihei}} + +\fancypagestyle{BIThesis}{ + % 页眉高度 + \setlength{\headheight}{20pt} + % 页码高度(不完美,比规定稍微靠下 2mm) + \setlength{\footskip}{14pt} + + \fancyhf{} + % 定义页眉、页码 + \fancyhead[C]{\zihao{4}\ziju{0.08}\songti{北京理工大学本科生毕业设计(论文)}} + \fancyfoot[C]{\songti\zihao{5} \thepage} + % 页眉分割线稍微粗一些 + \renewcommand{\headrulewidth}{0.6pt} +} + +\ctexset{chapter={ + name = {第,章}, + number = {\arabic{chapter}}, + format = {\heiti \bfseries \centering \zihao{3}}, + aftername = \hspace{9bp}, + pagestyle = BIThesis, + beforeskip = 8bp, + afterskip = 32bp, + fixskip = true, + } +} + +\ctexset{section={ + number = {\thechapter.\hspace{4bp}\arabic{section}}, + format = {\heiti \raggedright \bfseries \zihao{4}}, + aftername = \hspace{8bp}, + beforeskip = 20bp plus 1ex minus .2ex, + afterskip = 18bp plus .2ex, + fixskip = true, + } +} + +\ctexset{subsection={ + number = {\thechapter.\hspace{3bp}\arabic{section}.\hspace{3bp}\arabic{subsection}}, + format = {\heiti \bfseries \raggedright \zihao{-4}}, + aftername = \hspace{7bp}, + beforeskip = 17bp plus 1ex minus .2ex, + afterskip = 14bp plus .2ex, + fixskip = true, + } +} + +\addtocontents{toc}{\protect\hypersetup{hidelinks}} + +\renewcommand{\contentsname}{ + \fontsize{16pt}{\baselineskip} + \normalfont\heiti{目~~~~录} + \vspace{-8pt} +} +\titlecontents{chapter}[0pt]{\songti \zihao{-4}} +{\thecontentslabel\hspace{\ccwd}}{} +{\hspace{.5em}\titlerule*{.}\contentspage} +\titlecontents{section}[1\ccwd]{\songti \zihao{-4}} +{\thecontentslabel\hspace{\ccwd}}{} +{\hspace{.5em}\titlerule*{.}\contentspage} +\titlecontents{subsection}[2\ccwd]{\songti \zihao{-4}} +{\thecontentslabel\hspace{\ccwd}}{} +{\hspace{.5em}\titlerule*{.}\contentspage} + +\renewcommand{\frontmatter}{ + \pagenumbering{Roman} + \pagestyle{BIThesis} +} + +\renewcommand{\mainmatter}{ + \pagenumbering{arabic} + \pagestyle{BIThesis} +} + +\setlength{\abovecaptionskip}{11pt} +\setlength{\belowcaptionskip}{9pt} + +\renewcommand{\thefigure}{\thechapter-\arabic{figure}} +\captionsetup[figure]{font=small,labelsep=space} + +\renewcommand{\thetable}{\thechapter-\arabic{table}} +\captionsetup[table]{font=small,labelsep=space,skip=2pt} + +\tolerance=1 +\emergencystretch=\maxdimen +\hyphenpenalty=10000 +\hbadness=10000 + +\renewcommand{\theequation}{\arabic{chapter}-\arabic{equation}} + +\newcommand{\unnumchapter}[1]{ + \chapter*{\vskip 10bp\textmd{#1} \vskip -6bp} + \addcontentsline{toc}{chapter}{#1} + \stepcounter{chapter} +} + +\endinput +%% +%% End of file `bitbook.cls'. |