forked from jason2506/stoc-notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.tex
100 lines (80 loc) · 2.89 KB
/
header.tex
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
% ===============================================
% Package
% ===============================================
\usepackage[dvipsnames]{xcolor}
\usepackage[colorlinks,linkcolor=NavyBlue]{hyperref}
\usepackage{CJK}
\usepackage{amsthm, amsmath, amssymb}
\usepackage{etoolbox}
\usepackage{fancyhdr}
\usepackage{import}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{stmaryrd}
\usepackage{thmtools}
\usepackage{tikz}
\usepackage{xparse}
% ===============================================
% Import
% ===============================================
\newcommand{\ImportChapter}[1]{\import{#1/}{#1/main}}
% ===============================================
% Layout
% ===============================================
\pagestyle{fancy}
\topmargin=-0.45in
\textheight=9.5in
\advance\textwidth by 1.5in
\advance\oddsidemargin by -0.75in
\advance\evensidemargin by -0.75in
\linespread{1.2}
\setlength{\headwidth}{\textwidth}
% ===============================================
% tikz
% ===============================================
\usetikzlibrary{arrows,positioning,automata}
\tikzset{->,>=latex,shorten >=1pt,auto,node distance=5em}
\tikzstyle{every state}=[draw=black,text=black,minimum size=3em]
% ===============================================
% Theorem
% ===============================================
\theoremstyle{plain}
\newtheorem{theorem}{\color{BrickRed} Theorem}[chapter]
\newtheorem{lemma}{\color{BrickRed} Lemma}[chapter]
\newtheorem{observation}{\color{BrickRed} Observation}[chapter]
\newtheorem{corollary}{\color{BrickRed} Corollary}[chapter]
\newtheorem{proposition}{\color{BrickRed} Proposition}[chapter]
\newtheorem{equality}{\color{BrickRed} Equality}[chapter]
\newtheorem{inequality}{\color{BrickRed} Inequality}[chapter]
\newtheorem{properity}{\color{BrickRed} Properity}[chapter]
\theoremstyle{definition}
\newtheorem{definition}{\color{BrickRed} Definition}[chapter]
\newtheorem{example}{\color{BrickRed} Example}[chapter]
\newtheorem{question}{\color{BrickRed} Question}[chapter]
\newtheorem{exercise}{\color{BrickRed} Exercise}[chapter]
\theoremstyle{remark}
\newtheorem*{verification}{Verification}
\newtheorem*{comment}{Comment}
\newtheorem*{solution}{Solution}
\AtBeginEnvironment{comment}{\color{gray}}
% ===============================================
% Term Index
% ===============================================
\makeindex
\NewDocumentCommand{\defterm}{som}{%
{\it #3}%
\IfBooleanTF{#1}{}{\index{\IfNoValueTF{#2}{#3}{#2}}}%
}
\NewDocumentCommand{\keyterm}{som}{%
{\bf #3}%
\IfBooleanTF{#1}{}{\index{\IfNoValueTF{#2}{#3}{#2}}}%
}
% ===============================================
% Math Symbol
% ===============================================
\newcommand{\argmin}{\operatornamewithlimits{argmin}}
% ===============================================
% Misc
% ===============================================
\newcommand{\todo}[2]{{\underline{\textsf{#1}}:}
{\color{red}{\lbrack#2\rbrack}}}