-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmystyle.sty
120 lines (102 loc) · 4.2 KB
/
mystyle.sty
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
\ProvidesPackage{mystyle}
\usepackage{subfiles}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[twoside,outer=1.25in,inner=1.55in,bottom=1.5in,top=1.5in,marginpar=1in]{geometry}
\usepackage{lipsum}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{enumitem}
\usepackage{scrpage2}
\usepackage{bbold}
\usepackage{environ}
\usepackage{changepage}
\usepackage{mathtools}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\usepackage{amsmath}
\usepackage{array, diagbox}
\usepackage{palatino}
%\usepackage{fdsymbol}
\usepackage{tikz}
\usetikzlibrary{shapes,backgrounds}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}{Definition}[chapter]
\renewenvironment{proof}[1][Proof]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
%\newenvironment{definition}[1][Definition]{\begin{trivlist}
% \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
%\newenvironment{example}[1][Example]{\begin{trivlist}
% \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{remark}[1][Remark]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newcounter{example}[chapter]
\newenvironment{example}[1][]{\refstepcounter{example}\par\medskip
\noindent\textbf{Example~\theexample. #1} \rmfamily}{\medskip}
%\newenvironment{solution}[1][Solution]{{\addtolength{\leftskip}{2.5em}}
% \begin{trivlist}
% \item[ {\bfseries #1}]}{\end{trivlist}}
\newenvironment{solution}[1][]{\par\medskip
\noindent\begin{adjustwidth}{1em}{0em}\textbf{Solution~\theexample. #1} \rmfamily}
{\end{adjustwidth}\medskip\noindent}
\NewEnviron{exercises}{
{\fontsize{10}{10}\selectfont{
\subsection{Exercises}
\BODY}}}
\renewcommand{\qed}{\nobreak \ifvmode \relax \else
\ifdim\lastskip<1.5em \hskip-\lastskip
\hskip1.5em plus0em minus0.5em \fi \nobreak
\vrule height0.75em width0.5em depth0.25em\fi}
%%% make abbreviations!
% Fractions
\newcommand{\ufrac}[1]{\frac{1}{#1}} % unit fractions
% Sets
\newcommand{\NN}{\mathbb N} %% we should agree on what this means before we use it
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\QQ}{\mathbb Q}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\CC}{\mathbb C} % maybe not needed
% Probability Theory
\newcommand{\dsp}{\hookrightarrow}
\renewcommand{\Pr}{\mathrm{Pr}}
\newcommand{\EE}{\mathrm E}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\Cov}{\mathrm{Cov}}
% Concrete Remnants
\newcommand{\fallingfact}[2]{#1^{\underline{#2}}} %% falling factorial
\newcommand{\ffact}[2]{\fallingfact{#1}{#2}}
\newcommand{\risingfact}[2]{#1^{\overline{#2}}} % rising factorial
\newcommand{\rfact}[2]{\risingfact{#1}{#2}}
\newcommand{\permutation}[2]{P^{#1}_{#2}} % P-notation for permutations
\newcommand{\perm}[2]{\permuation{#1}{#2}}
\newcommand{\combination}[2]{C^{#1}_{#2}} % C-notation for combination, use \binom or \dbinom otherwise
\newcommand{\comb}[2]{\combination{#1}{#2}}
\newcommand{\stirlingone}[2]{\genfrac[]{0pt}{1}{#1}{#2}} % stirling numbers of the first kind, one for display and one for in-text
\newcommand{\stiri}[2]{\stirlingone{#1}{#2}}
\newcommand{\dstirlingone}[2]{\genfrac[]{0pt}{0}{#1}{#2}}
\newcommand{\dstiri}[2]{\dstirlingone{#1}{#2}}
\newcommand{\stirlingtwo}[2]{\genfrac\{\}{0pt}{1}{#1}{#2}} % stirling numbers of the second kind, one for display and one for in-text
\newcommand{\stirii}[2]{\stirlingtwo{#1}{#2}}
\newcommand{\dstirlingtwo}[2]{\genfrac\{\}{0pt}{0}{#1}{#2}}
\newcommand{\dstirii}[2]{\dstirlingtwo{#1}{#2}}
% Differentials
\newcommand{\dx}{\,dx}
\newcommand{\dy}{\,dy}
\newcommand{\dz}{\,dz}
\newcommand{\dt}{\,dt}
\newcommand{\du}{\,du}
\newcommand{\dv}{\,dv}
% Calculus
\newcommand{\drv}[2]{\frac{d #1}{d #2}}
\newcommand{\ddv}[2]{\frac{d^2 #1}{d #2^2}}
\newcommand{\dnv}[3]{\frac{d^{#3} #1}{d #2^{#3}}}
\newcommand{\pdv}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\pddv}[2]{\frac{\partial^2 #1}{\partial #2^2}}
\newcommand{\pdnv}[3]{\frac{\partial^{#3} #1}{\partial #2^{#3}}}
\newcommand{\mpddv}[3]{\frac{\partial^2 #1}{\partial #2 \, \partial #3}}
% Unicode stuff
\DeclareUnicodeCharacter{2212}{-}
\DeclareUnicodeCharacter{3A9}{\Omega}
\DeclareUnicodeCharacter{2192}{\rightarrow}