-
Notifications
You must be signed in to change notification settings - Fork 3
/
cumcmart.cls
129 lines (113 loc) · 4 KB
/
cumcmart.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
%% This class is based on the class "ctexart" with options a4paper, oneside and 12pt.
%% The draft mode is defined, in which the package refcheck will take effect.
%% No more options are allowed.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cumcmart}
\newif\if@withoutcover%
\@withoutcovertrue%
\LoadClass[c4size,openany,UTF8]{ctexart}
\DeclareOption{nocover}{\@withoutcoverfalse}
\ProcessOptions
\RequirePackage{bbding}
\RequirePackage{url}
\RequirePackage{fancyhdr,booktabs}
\RequirePackage{graphicx,paralist}
\RequirePackage{amsmath,amssymb}
\RequirePackage{fancybox,ifpdf}
\RequirePackage[dvipsnames,svgnames,x11names]{xcolor}
\allowdisplaybreaks[4]
\ifpdf
\RequirePackage{CJKpunct}
\punctstyle{kaiming}
\else
\RequirePackage{CJKpunct}
\punctstyle{kaiming}
\fi
\newtoks\xuanti
\newtoks\numbers
\newtoks\school
\newtoks\authorone
\newtoks\authortwo
\newtoks\authorthree
\newtoks\advisor
\newtoks\theday
\renewcommand\contentsname{\centering \ziju{2}目录}
%------------------------ Page layout ----------------------------------
%\topmargin=-15.4mm
%\oddsidemargin=-0.4mm
%\evensidemargin=-0.4mm
%\textwidth=160mm
%\textheight=247mm
\RequirePackage[a4paper,left=2.5cm,top=2.5cm,bottom=2.5cm,right=2.5cm]{geometry}
\def\maketitle{%
\null%
\leavevmode
\if@withoutcover%
\input{declaration}
\newpage%
\fi%
\null%
\thispagestyle{empty}%
\setcounter{page}{1}%
\begin{center}%
{\heiti\zihao{-2} \@title \par}%
\end{center}%
\vspace{2em}\par
}
%------------------------ Abstract & Keywords -------------------------
\newcommand\cnabstractname{\ziju{2}摘要}
\newcommand\enabstractname{ABSTRACT}
\newcommand\cnkeywords[1]{\bigskip\noindent{\heiti\zihao{-4}\cnkeywordsname:\ #1}}
\newcommand\cnkeywordsname{关键词}
\newcommand\enkeywords[1]{\bigskip\noindent{\bfseries\zihao{-4}\enkeywordsname:#1}}
\newcommand\enkeywordsname{Key words}
\newenvironment{cnabstract}{%
\begin{center}{\zihao{4}\heiti \cnabstractname}\end{center}\vspace{.5em}
\songti\zihao{-4}%
\@afterheading}
{\par}
%------------------------ sections -------------------------
\renewcommand\section{\renewcommand{\@seccntformat}[1]{%
\zihao{4}\csname thesection\endcsname \hspace{0.8em}}
\@startsection{section}{2}{\z@}% {name}{depth}{}
{3.5ex \@plus 1ex \@minus .2ex}% positive->leave parindent
{2.3ex \@plus.2ex}%
{\reset@font\fontsize{13.75pt}{\baselineskip}\sectionformat}}
\renewcommand\thesection{\chinese{section}}
\newcommand\sectionformat{\zihao{4}\bfseries\selectfont\centering}
%----------------------subsection---------------------------
\renewcommand\subsection{\renewcommand{\@seccntformat}[1]{%
\zihao{-4}\heiti\csname thesubsection\endcsname \hspace{0.5em}}
\@startsection
{subsection}{2}{\z@}% {name}{depth}{}
{1.75ex \@plus.5ex \@minus .1ex}% leave parindent
{1.15ex \@plus.1ex}%
{\reset@font\normalsize\bfseries\subsectionformat}}
\renewcommand\thesubsection{\arabic{section}.\arabic{subsection}}
\newcommand\subsectionformat{\zihao{4}\bfseries\selectfont}
\renewcommand\subsubsection{\renewcommand{\@seccntformat}[1]{%
\zihao{-4}\heiti\csname thesubsubsection\endcsname \hspace{0.5em}}
\@startsection{subsubsection}{2}{\z@}% {name}{depth}{}
{1.75ex \@plus.5ex \@minus .1ex}% leave parindent
{1.15ex \@plus.1ex}%
{\reset@font\normalsize\bfseries\subsubsectionformat}}
\renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}
\newcommand\subsubsectionformat{\zihao{-4}\bfseries\selectfont}
%----------------------heading---------------------------
\fancypagestyle{plain}{%
\fancyhf{} %clear all header and footer fields
\fancyfoot[C]{\thepage} % except the center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
%----------------------- Theorems ---------------------------
\newtheorem{theorem}{{定理}}
\newtheorem{proposition}{{命题}}
\newtheorem{lemma}{{引理}}
\newtheorem{corollary}{{推论}}[theorem]
\newtheorem{definition}{{定义}}
\newtheorem{example}{{例}}
\AtBeginDocument{%
\pagestyle{plain}%
}
\endlinechar `\^^M
\endinput