Skip to content

Commit

Permalink
refactor(LR)!: extract the lab-report into new cls.
Browse files Browse the repository at this point in the history
  • Loading branch information
fky2015 committed May 25, 2022
1 parent 12e4d3d commit b8993ef
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
52 changes: 52 additions & 0 deletions templates/lab-report/bitreport.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
\RequirePackage{expl3, l3keys2e}
\ProvidesExplClass{bitreport}{
2022-05-25
}{0.0.1}{BIThesis lab report class}

\PassOptionsToPackage{AutoFakeBold,AutoFakeSlant}{xeCJK}
% Pass every option not explicitly defined to `ctexbeamer`.
\DeclareOption*{
\PassOptionsToClass{\CurrentOption}{ctexart}
}
% Executes the code for each option.
\ProcessOptions\relax
% Load
\LoadClass[zihao=-4]{ctexart}

\RequirePackage{fancyhdr}%

\RequirePackage{titlesec}%
\RequirePackage{fontspec}%

\RequirePackage[a4paper,left=3.18cm,right=3.18cm,top=2.54cm,bottom=2.54cm,includeheadfoot]{geometry}%

% 将西文字体设置为 Times New Roman
\setromanfont{Times~New~Roman}%

% 设置文档标题深度
\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}%

% 正文 pagestyle
\pagestyle{fancy}
\setcounter{page}{1}%
12 changes: 11 additions & 1 deletion templates/lab-report/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
%
% Compile with: xelatex -> biber -> xelatex -> xelatex

\documentclass[lab-report]{bitart}
\documentclass[]{bitreport}


% 将你的相关信息替换如下示例
Expand All @@ -29,9 +29,19 @@
\newcommand{\teacherName}{张哈希}
% \newcommand{\coverDate}{2022年5月9日} % 注释此行以使用自定义日期

%% usepackage
\usepackage[style=gb7714-2015,backend=biber]{biblatex}
% used by figure.
\usepackage{float,graphicx}

\addbibresource{misc/refs.bib}

% TODO
\RequirePackage{setspace}%

\begin{document}
% TODO: \MakeCover[option1=1,option2=2]
\input{misc/cover_v1.tex}

\section{实验目的}
\begin{enumerate}
Expand Down

0 comments on commit b8993ef

Please sign in to comment.