-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreamble.tex
117 lines (101 loc) · 3.07 KB
/
preamble.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
\documentclass[UTF8]{ctexart}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{theorem}
\usepackage{bm}
% \usepackage[dutch]{babel}
\usepackage{amsmath, amssymb}
\usepackage{import}
\usepackage{pdfpages}
\usepackage{transparent}
\usepackage{xcolor}
% \usepackage{ebgaramond}
% ------------- coding style setting --------------%
\usepackage{libertine}
\usepackage{listings}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
% ----------------- geometry and fancy head -----------
\usepackage{geometry}
\geometry{left=2.5cm,right=2.5cm,top=3cm,bottom=3cm}
\usepackage[many]{tcolorbox}
\usepackage{fancyhdr}
\usepackage{syntonly} % dubugging
% \syntaxonly
\fancypagestyle{mainFancy}{
\fancyhf{}
%\renewcommand\headrulewidth{0pt} % 页眉横线
%\renewcommand\footrulewidth{0pt}
\fancyhead[L]{College Physics} % 页眉章标题
\fancyhead[R]{Assignment} % 页眉文章题目
\fancyfoot[C]{\thepage} % 页眉编号
}
\pagestyle{mainFancy}
% --------------- environment setting ------------------
\newtheorem{thm}{Theorem}
\newtheorem{pro}{Problem}
\newtheorem{lemma}{Lemma}
\newtheorem{defi}{Definition}[section]
\newtheorem{li}{Example}[section]
\newenvironment{proof}{\paragraph{Proof:}}{\hfill$\square$}
\newenvironment{jie}{\paragraph{Show:}}{\hfill$\square$}
\tcolorboxenvironment{pro}{
enhanced,
borderline={0.4pt}{0.4pt}{black},
boxrule=0.4pt,
colback=white,
coltitle=black,
sharp corners,
}
% ----------------- macros and command -----------------
\usepackage{stmaryrd}
\newcommand\contra{\scalebox{1.5}{$\lightning$}}
\definecolor{correct}{HTML}{009900}
\newcommand\correct[2]{\ensuremath{\:}{\color{red}{#1}}\ensuremath{\to }{\color{correct}{#2}}\ensuremath{\:}}
\newcommand\green[1]{{\color{correct}{#1}}}
% horizontal rule
\newcommand\hr{
\noindent\rule[0.5ex]{\linewidth}{0.5pt}
}
\def\mf(#1){\mathfrak{#1}}
\newcommand\setn[2]{\left\{#1_1,#1_2,\cdots, #1_#2 \right\} }
\def\abs(#1){\lvert #1\rvert}
\let\implies\Rightarrow
\let\impliedby\Leftarrow
\let\iff\Leftrightarrow
\let\ldots\cdots
\newcommand\dif{\,\mathrm{d}}
\newcommand\e{\,\mathrm{e}}
\newcommand\R{\,\mathbb{R}}
\newcommand\la{\,\lambda}
\newcommand\C{\,\mathbb{C}}
\newcommand\F{\,\varphi}
\newcommand\ep{\,\varepsilon}
\newcommand\N{\,\mathbb{N}}
\newcommand\Z{\,\mathbb{Z}}
\newcommand{\incfig}[2][0.3]{%
\def\svgwidth{#1\columnwidth}
\import{./figures/}{#2.pdf_tex}
}
\author{[email protected]\footnote{Yujie Lu, ACM class 18, ID is 518030910111}}