-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreamble.tex
179 lines (161 loc) · 5.54 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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
\pagestyle{plain}
%\setlength{\abovedisplayskip}{0pt}
%\setlength{\belowdisplayskip}{0pt}
% space before and after equations
\expandafter\def\expandafter\normalsize\expandafter{%
\normalsize%
\setlength\abovedisplayskip{8pt}%
\setlength\belowdisplayskip{8pt}%
\setlength\abovedisplayshortskip{4pt}%
\setlength\belowdisplayshortskip{4pt}%
}
%\setlength{\parskip}{0pt}
%\setlength{\parindent}{0pt}
\definecolor{myColor}{RGB}{193,225,193}
\newcommand{\B}{\ensuremath{\mathcal{B}}}
\newcommand{\A}{\ensuremath{\mathcal{A}}}
\linespread{1.3}
\patchcmd{\tocchapter}{#1}{\MakeUppercase{#1}}{}{}
\setcounter{tocdepth}{0}
%\renewcommand\@pnumwidth{1em} % <-- depending on the total number of pages
%\patchcmd{\@tocline}
% {\hfil}
% {\leaders\hbox{\,.\,}\hfil}
% {}{}
%\def\l@subsection{\@tocline{2}{0pt}{3.4pc}{5pc}{}}
%\makeatother
%\DeclareRobustCommand{\gobblefour}[5]{}
%\newcommand*{\SkipTocEntry}{\addtocontents{toc}{\gobblefour}}
%\renewcommand{\thesection}{\thechapter.\arabic{section}}
%\renewcommand{\baselinestretch}{1.1}\normalsize
\usetikzlibrary{cd}
\usetikzlibrary{babel}
\usetikzlibrary{knots}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% SKEIN RELATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
% We define separate versions (large and small) for the frames:
\newcommand*\@KP@Large@frame[2]{%
\setlength\unitlength{\fontdimen 22 #1\tw@}%
\vrule \@width\z@ \@height 4\unitlength \@depth\tw@\unitlength
\begin{picture}(6,2)(-3,-1)%
\def\@KP@Radius {3}%
\def\@KP@Hole@radius{.5}% The same value seem adequate for both...
\def\@KP@Diameter {6}%
#2%
\end{picture}%
}
\newcommand*\@KP@Small@frame[2]{%
\setlength\unitlength{\fontdimen 22 #1\tw@}%
\vrule \@width\z@ \@height \thr@@\unitlength \@depth\@ne\unitlength
\begin{picture}(4,2)(-2,-1)%
\def\@KP@Radius {2}%
\def\@KP@Hole@radius{.5}% ... but let it be customizable too.
\def\@KP@Diameter {4}%
#2%
\end{picture}%
}
% On the other hand, for the commands that draw the four different shapes, it
% seems that all differences between the small variant and the large one can be
% confined in the following three macros (here, we just declare their name):
\newcommand*\@KP@Radius {}
\newcommand*\@KP@Hole@radius{}
\newcommand*\@KP@Diameter {}
%
% The four shapes:
\newcommand*\@KP@Shape@A{%
\put(0,0){\circle{\@KP@Diameter}}%
}
\newcommand*\@KP@Shape@B{%
\Line(-\@KP@Radius,\@KP@Radius )(\@KP@Radius,-\@KP@Radius)%
\Line(-\@KP@Radius,-\@KP@Radius)(-\@KP@Hole@radius,-\@KP@Hole@radius)%
\Line(\@KP@Radius ,\@KP@Radius )(\@KP@Hole@radius ,\@KP@Hole@radius )%
}
\newcommand*\@KP@Shape@C{%
\cbezier(-\@KP@Radius,\@KP@Radius )(0,0)(0,0)(\@KP@Radius,\@KP@Radius )%
\cbezier(-\@KP@Radius,-\@KP@Radius)(0,0)(0,0)(\@KP@Radius,-\@KP@Radius)%
}
\newcommand*\@KP@Shape@D{%
\cbezier(-\@KP@Radius,-\@KP@Radius)(0,0)(0,0)(-\@KP@Radius,\@KP@Radius)%
\cbezier(\@KP@Radius ,-\@KP@Radius)(0,0)(0,0)(\@KP@Radius ,\@KP@Radius)%
}
\newcommand*\@KP@Shape@E{%
\Line(-\@KP@Radius,-\@KP@Radius)(\@KP@Radius,\@KP@Radius)%
\Line(-\@KP@Hole@radius,\@KP@Hole@radius)(-\@KP@Radius,\@KP@Radius)%
\Line(\@KP@Radius,-\@KP@Radius)(\@KP@Hole@radius,-\@KP@Hole@radius)%
}
\newcommand*\@KP@Shape@F{%
\Line(-\@KP@Radius,\@KP@Radius )(\@KP@Radius,-\@KP@Radius)%
\Line(-\@KP@Radius,-\@KP@Radius)(\@KP@Radius,\@KP@Radius)%
}
\newcommand*\@KP@Shape@Z{%
\Line(-\@KP@Radius,-\@KP@Radius)(\@KP@Radius,\@KP@Radius)%
\Line(-\@KP@Hole@radius,\@KP@Hole@radius)(-\@KP@Radius,\@KP@Radius)%
\Line(\@KP@Radius,-\@KP@Radius)(-\@KP@Hole@radius,\@KP@Hole@radius)%
}
\newcommand*\@KP@Atomic@mathpalette[1]{%
\mathinner{% or "\mathord"?
% Note that a new level of grouping has just been entered (p. 290).
% \color{gray}% not used, for now
\mathchoice{%
\linethickness{.6\p@}% Tip: use thicker lines if you decide to
% revert to using gray.
\@KP@Large@frame \textfont {#1}%
}{%
\linethickness{.4\p@}% adjustable
\@KP@Small@frame \textfont {#1}%
}{%
\linethickness{.3\p@}% adjustable
\@KP@Small@frame \scriptfont {#1}%
}{%
\linethickness{.2\p@}% adjustable
\@KP@Small@frame \scriptscriptfont {#1}%
}%
}%
}
% User-level commands:
\newcommand*\KPA{\@KP@Atomic@mathpalette \@KP@Shape@A}
\newcommand*\KPB{\@KP@Atomic@mathpalette \@KP@Shape@B}
\newcommand*\KPC{\@KP@Atomic@mathpalette \@KP@Shape@C}
\newcommand*\KPD{\@KP@Atomic@mathpalette \@KP@Shape@D}
\newcommand*\KPE{\@KP@Atomic@mathpalette \@KP@Shape@E}
\newcommand*\KPF{\@KP@Atomic@mathpalette \@KP@Shape@F}
\newcommand*\KPZ{\@KP@Atomic@mathpalette \@KP@Shape@Z}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%% OTHER KNOTS, TANGLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*\PKINK{
\begin{tikzpicture}
\begin{knot}[
consider self intersections,
flip crossing = 1,
]
\strand (0,0) .. controls +(3,1) and +(-3,1) .. (1,0);
\end{knot}
\end{tikzpicture}
}
\newcommand*\NKINK{
\begin{tikzpicture}
\begin{knot}[
consider self intersections,
]
\strand (0,0) .. controls +(3,1) and +(-3,1) .. (1,0);
\end{knot}
\end{tikzpicture}
}
\newcommand*\ARC{
\begin{tikzpicture}
\begin{knot}[]
\strand (0,0) .. controls +(3,1) and +(-3,1) .. (1,0);
\end{knot}
\end{tikzpicture}
}
\geometry{
a4paper,
left=1.25in,
right=1in,
top=1in,
bottom=1in
}