Skip to content

Commit

Permalink
Improve Template
Browse files Browse the repository at this point in the history
  • Loading branch information
lihanshu committed May 15, 2023
1 parent 7ec61e8 commit 62c5c26
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
\documentclass{nwputhesis}
\begin{document}

% 生成封面, 使用\maketitle
% 生成封面, 使用\maketitle
% 该封面不同学院要求可能不同,如有需要,请在cls文件中自行修改
\maketitle

\newpage
Expand Down
15 changes: 12 additions & 3 deletions nwputhesis.cls
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{nwputhesis}
[2023/4/23 v0.1 Standard LaTeX Template for NWPU thesis]
[2023/5/15 v0.3 Standard LaTeX Template for NWPU thesis]
% Loading Class
\LoadClass[12pt,fontset=none]{ctexart}
% Loading Package
Expand All @@ -21,9 +21,11 @@
% 首行缩进
\RequirePackage{indentfirst}
\setlength{\parindent}{2em}
\RequirePackage{enumitem}
% 页眉设置
\RequirePackage{fancyhdr}
\setlength{\headheight}{27pt}
\setlength{\headsep}{7pt}
\renewcommand{\headrulewidth}{1pt} %线宽
\chead{\includegraphics[scale=0.15]{./picture/nwpuheader.png}}
\rhead{}
Expand All @@ -33,7 +35,7 @@
\fancyfoot{} % 页脚清空
}
\fancypagestyle{noncover}{
\fancyfoot[C]{\thepage} % 页脚清空
\fancyfoot[C]{\zihao{-5}\thepage} % 页脚清空
}
% 字体设置
\RequirePackage{xeCJK}
Expand Down Expand Up @@ -96,14 +98,21 @@
% 表格和图片标题
\RequirePackage{caption}
\RequirePackage{subcaption}
\RequirePackage{chngcntr} % 清零控制
\counterwithin{equation}{section}
\counterwithin{figure}{section}
\counterwithin{table}{section}
\captionsetup{labelsep=space,justification=centering}
\DeclareCaptionFont{wuhaohei}{\fontsize{10.5bp}{1.25}\blackti}
\DeclareCaptionFont{wuhao}{\fontsize{10.5bp}{1.25}}
\captionsetup[table]{font = {wuhaohei}}
\captionsetup[figure]{font = {wuhao}}
\captionsetup[subfigure]{font = {wuhao}}
\renewcommand{\thefigure}{\thesection{}-\arabic{table}}
\renewcommand{\thefigure}{\thesection{}-\arabic{figure}}
\renewcommand {\thetable} {\thesection{}-\arabic{table}}
% 算法伪代码、
\RequirePackage{algorithm,algorithmic}

% Cover
\renewcommand{\maketitle}{\par
\begingroup
Expand Down

1 comment on commit 62c5c26

@lihanshu
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 修改版本号;
  2. 补充缩进宏包;
  3. 修改页眉宽度和页码字号,尽可能与word要求对应;
  4. 设置图表公式章节清零器,确保每章编号能够自动清零。

Please sign in to comment.