-
Notifications
You must be signed in to change notification settings - Fork 0
/
TREX.cls
110 lines (84 loc) · 2.9 KB
/
TREX.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
\ProvidesClass{TREX}
\LoadClass[a4paper,twoside,final,12pt]{article}
\usepackage[paper=a4paper,
top=1.18in,bottom=1in,right=0.75in,left=0.75in]{geometry}% http://ctan.org/pkg/geometry
\usepackage[utf8]{inputenc}
\usepackage{lastpage}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{titlesec}
\usepackage{colortbl}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[printonlyused,nohyperlinks]{acronym}
\usepackage[pdftex, pdfusetitle, hyperfigures, hyperindex,
bookmarksnumbered,colorlinks, bookmarks, breaklinks,
linktocpage, citecolor=blue, urlcolor=blue, linkcolor=black]{hyperref}
\usepackage[titles]{tocloft}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\cftsecfont}{\normalfont}% titles in bold
\renewcommand{\cftsecpagefont}{\normalfont}% page numbers in bold
\renewcommand{\cftdotsep}{1}
\renewcommand{\cftsecleader}{\cftdotfill{\cftsecdotsep}}% dot leaders in bold
\renewcommand{\cftsecdotsep}{\cftdotsep}
\setlength{\headheight}{1.2cm}
\setlength{\footskip}{2cm}
\addtolength{\textheight}{-\footskip}
%%--Set the section number depth.
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{4}
\setcounter{page}{2}
\bibliographystyle{IEEEtran}
\sloppy
%%-----------------------------------------------
%%-- Float related environments and commands.
%%-----------------------------------------------
%%--Modify behavior of the figure and table environment.
\def\fps@figure{hbt}
\def\fnum@figure{\textbf{\figurename~\thefigure}}
\def\fps@table{htb}
\def\fnum@table{\textbf{\tablename~\thetable}}
\def\mathfigure{\thesisfiguretrue\figure}
\def\endmathfigure{\endfigure\thesisfigurefalse}
% --------------------------------------------
% Headers
% --------------------------------------------
\pagestyle{fancyplain}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\usepackage{xcolor}
\definecolor{myblue}{HTML}{2F5496}
\titleformat{\section}
{\color{myblue}\normalfont\Large}
{\color{myblue}\thesection}{1em}{}
\makeatletter
\makeindex
\makeglossary
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{1}
% Table of contents with section*
\usepackage{xparse}
\let\oldsection\section
\makeatletter
\newcounter{@secnumdepth}
\RenewDocumentCommand{\section}{s o m}{%
\IfBooleanTF{#1}
{\setcounter{@secnumdepth}{\value{secnumdepth}}% Store secnumdepth
\setcounter{secnumdepth}{0}% Print only up to \chapter numbers
\oldsection{#3}% \section*
\setcounter{secnumdepth}{\value{@secnumdepth}}}% Restore secnumdepth
{\IfValueTF{#2}% \section
{\oldsection[#2]{#3}}% \section[.]{..}
{\oldsection{#3}}}% \section{..}
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Floating figures
\renewcommand\floatpagefraction{.9}
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
\renewcommand\textfraction{.1}
\setcounter{totalnumber}{50}
\setcounter{topnumber}{50}
\setcounter{bottomnumber}{50}
\endinput