-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.sty
More file actions
160 lines (144 loc) · 4.7 KB
/
Copy pathnotes.sty
File metadata and controls
160 lines (144 loc) · 4.7 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{verbatim}
\usepackage{tikz}
\usepackage{geometry}
\usepackage{hyperref}
\usepackage{nameref}
\usepackage{tocloft}
\usepackage{mathtools}
\usepackage{indentfirst}
\usepackage{etoolbox}
\usepackage[super]{nth}
\usepackage[object=vectorian]{pgfornament}
\usepackage{enumitem}
\usepackage{bookmark}
\usepackage{thmtools}
\usepackage[noabbrev,capitalize,nameinlink]{cleveref}
\usetikzlibrary{calc,fadings,decorations.pathreplacing}
\geometry{letterpaper, portrait, margin=1in}
\everymath{\displaystyle}
%% Helper macros for tikz image
\newcommand\pgfmathsinandcos[3]{%
\pgfmathsetmacro#1{sin(#3)}%
\pgfmathsetmacro#2{cos(#3)}%
}
\newcommand\LongitudePlane[3][current plane]{%
\pgfmathsinandcos\sinEl\cosEl{#2} % elevation
\pgfmathsinandcos\sint\cost{#3} % azimuth
\tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
}
\newcommand\LatitudePlane[3][current plane]{%
\pgfmathsinandcos\sinEl\cosEl{#2} % elevation
\pgfmathsinandcos\sint\cost{#3} % latitude
\pgfmathsetmacro\yshift{\cosEl*\sint}
\tikzset{#1/.style={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %
}
\newcommand\DrawLongitudeCircle[2][1]{
\LongitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
% angle of "visibility"
\pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %
\draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);
\draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1);
}
\newcommand\DrawLatitudeCircle[2][1]{
\LatitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
\pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}
% angle of "visibility"
\pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}
\draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);
\draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1);
}
\newcommand{\globe}{\begin{figure}[!h]
\centering
\begin{tikzpicture} % Title page sphere
\def\R{1} % sphere radius
\def\angEl{35} % elevation angle
\filldraw[ball color=white] (0,0) circle (\R);
\foreach \t in {-80,-60,...,80} {\DrawLatitudeCircle[\R]{\t}}
\foreach \t in {-5,-35,...,-175} {\DrawLongitudeCircle[\R]{\t}}
\end{tikzpicture}
\end{figure}}
\newcommand{\sectionline}
{\noindent
\begin{center}
{\resizebox{0.5\linewidth}{1ex}
{{{\begin{tikzpicture}
\node (C) at (0,0){};
\node (D) at (9,0){};
\path (C) to [ornament=85] (D);
\end{tikzpicture}}}}}
\end{center}
}
\newcommand{\splitatcommas}[1]{%
\begingroup
\ifnum\mathcode`,="8000
\else
\begingroup\lccode`~=`, \lowercase{\endgroup
\edef~{\mathchar\the\mathcode`, \penalty0 \noexpand\hspace{0pt plus 1em}}%
}\mathcode`,="8000
\fi
#1%
\endgroup
}
\makeatletter
\patchcmd{\upbracefill}{\m@th}{\scriptstyle\m@th}{}{}
\patchcmd{\upbracefill}{$\braceld$}{$\scriptstyle\braceld$}{}{}
\patchcmd{\upbracefill}{\bracelu}{\bracelu\mkern-1mu}{}{}
\patchcmd{\upbracefill}{\hfill\braceru}{\hfill\mkern-1mu\braceru}{}{}
\makeatother
\declaretheoremstyle[
spaceabove=6pt, spacebelow=6pt,
headfont=\normalfont\bfseries,
notefont=\mdseries, notebraces={(}{)},
bodyfont=\normalfont\itshape]{exstyle}
\newtheorem{theorem}{Theorem}
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem*{theorem*}{Theorem}
\newtheorem*{lemma*}{Lemma}
\newtheorem*{claim}{Claim}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[subsection]
\newtheorem{example}[definition]{Example}
\declaretheorem[name=Exercise,
style=exstyle]{exercise}
\theoremstyle{remark}
\newtheorem*{remark}{Remark}
\foreach \theoremenv in
{theorem,theorem*,lemma,claim,prop,corollary,proof,exercise} {
\AtBeginEnvironment{\theoremenv}{%
\setlist[enumerate]{label*={(\arabic*)}}
\setlist[enumerate,2]{label={(\arabic{enumi}.\arabic*)}}
}
}
\setlist[enumerate]{label*={\arabic*.}}
\renewcommand{\bf}{\bfseries}
\renewcommand{\sc}{\scshape}
\renewcommand{\it}{\itshape}
\renewcommand\cftsecfont{\bf\sc}
\renewcommand\cftsecpagefont{\normalfont}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\renewcommand\cftsecdotsep{\cftdot}
\renewcommand\cftsubsecdotsep{\cftdot}
\renewcommand{\bar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu}
\renewcommand{\tilde}[1]{\widetilde{#1}}
\DeclareMathOperator{\im}{Im}
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\fact}{!}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\DeclareRobustCommand\iff{\;\Longleftrightarrow\;}