-
Notifications
You must be signed in to change notification settings - Fork 0
/
preamble.tex
137 lines (126 loc) · 5.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{graphs,quotes,graphs.standard}
\tikzset{
graphs/nodes={draw,circle,inner sep=1pt},
}
\usepackage{blindtext}
\usepackage{seqsplit}
%% hieroglyphic numbers
\usepackage{hieroglf}
\newcounter{hieroaux}
\newcounter{hierocurr}
\newcommand{\HieroDigit}[1]{\ifcase#1
\or
\Hone
\or
\Hten
\or
\Hhundred
\or
\Hthousand
\or
\HXthousand
\or
\HCthousand
\or
\Hmillion
\fi}
\DeclareRobustCommand\hg[1]{\setcounter{hierocurr}{#1}%
\ifnum\value{hierocurr}>999999
\setcounter{hieroaux}{0}%
\loop\stepcounter{hieroaux}\textpmhg{\HieroDigit{7}}%
\ifnum\value{hieroaux}<\the\numexpr(\value{hierocurr}-500000)/1000000\relax%
\repeat%
\setcounter{hierocurr}{\the\numexpr\value{hierocurr}-\value{hieroaux}*1000000}%
\fi
\ifnum\value{hierocurr}>99999
\setcounter{hieroaux}{0}%
\loop\stepcounter{hieroaux}\textpmhg{\HieroDigit{6}}%
\ifnum\value{hieroaux}<\the\numexpr(\value{hierocurr}-50000)/100000\relax%
\repeat%
\setcounter{hierocurr}{\the\numexpr\value{hierocurr}-\value{hieroaux}*100000}%
\fi%
\ifnum\value{hierocurr}>9999
\setcounter{hieroaux}{0}%
\loop\stepcounter{hieroaux}\textpmhg{\HieroDigit{5}}%
\ifnum\value{hieroaux}<\the\numexpr(\value{hierocurr}-5000)/10000\relax%
\repeat%
\setcounter{hierocurr}{\the\numexpr\value{hierocurr}-\value{hieroaux}*10000}%
\fi%
\ifnum\value{hierocurr}>999
\setcounter{hieroaux}{0}%
\loop\stepcounter{hieroaux}\textpmhg{\HieroDigit{4}}%
\ifnum\value{hieroaux}<\the\numexpr(\value{hierocurr}-500)/1000\relax%
\repeat%
\setcounter{hierocurr}{\the\numexpr\value{hierocurr}-\value{hieroaux}*1000}%
\fi%
\ifnum\value{hierocurr}>99
\setcounter{hieroaux}{0}%
\loop\stepcounter{hieroaux}\textpmhg{\HieroDigit{3}}%
\ifnum\value{hieroaux}<\the\numexpr(\value{hierocurr}-50)/100\relax%
\repeat%
\setcounter{hierocurr}{\the\numexpr\value{hierocurr}-\value{hieroaux}*100}%
\fi%
\ifnum\value{hierocurr}>9
\setcounter{hieroaux}{0}%
\loop\stepcounter{hieroaux}\textpmhg{\HieroDigit{2}}%
\ifnum\value{hieroaux}<\the\numexpr(\value{hierocurr}-5)/10\relax%
\repeat%
\setcounter{hierocurr}{\the\numexpr\value{hierocurr}-\value{hieroaux}*10}%
\fi%
\ifnum\value{hierocurr}>0
\setcounter{hieroaux}{0}%
\loop\stepcounter{hieroaux}\textpmhg{\HieroDigit{1}}%
\ifnum\value{hieroaux}<\value{hierocurr}\relax%
\repeat%
\fi}
%% maya numbers | put after amsmath
\usepackage{mathabx}
\newcommand\mathbfont{\usefont{U}{mathb}{m}{n}}
\def\mayaexpansion{%
\mayacntc=\mayacnta\mathbfont
\ifnum\mayacntc=0 0\else
\rotatebox[origin=c]{-90}{%
\loop\ifnum\mayacntc>5\advance\mayacntc by -5\repeat
\the\mayacntc\mayacntc=\mayacnta
\loop\ifnum\mayacntc>5\advance\mayacntc by -5 5\repeat}%
\fi}%
%% roman numbers
\newcommand*{\rom}[1]{\romannumeral #1}
%% drawings
\usetikzlibrary{svg.path}
\def\apple{
\tikz{
\begin{scope}[scale=-.05]
\draw[fill,red] svg "m63.714 34.589c-4.176-1.764-9.108-2.232-15.084-1.548-6.12 0.684-14.508 1.332-20.592 5.832-6.12 4.428-12.78 11.304-15.408 20.628-2.7 9.36-3.492 22.715-0.288 34.776 3.312 11.951 10.944 28.115 19.692 36.287 8.604 7.885 20.88 10.297 31.68 11.412 10.728 1.117 22.968-0.898 32.292-4.643 9.18-3.961 17.279-10.008 22.788-18.145 5.363-8.279 9.144-19.584 9.54-30.457 0.18-10.906-3.168-25.487-7.704-34.163-4.536-8.712-11.772-13.86-19.08-17.532-7.416-3.708-15.588-5.04-24.912-4.284-0.576-1.872-0.685-3.924-0.324-6.156 0.252-2.304 0.972-4.716 2.16-7.38 0.396-1.62 0.036-2.952-1.224-3.996-1.368-1.188-4.717-2.664-6.156-2.484-1.404 0.144-2.124 1.224-2.16 3.384 0.54 2.844 1.188 5.616 1.548 8.604 0.468 2.952 0.648 5.832 0.937 8.928-2.845-8.712-7.776-15.732-14.796-21.204-7.236-5.544-17.784-10.188-27.36-11.7-9.505-1.574-19.117-0.711-29.233 2.457 5.544 7.452 12.204 13.248 19.98 17.532 7.704 4.212 18.324 6.048 26.46 8.028 8.064 2.016 15.3 3.06 21.852 3.672-1.512 0.72-3.06 1.441-4.608 2.16z"
;
\end{scope}
}
}
\definecolor{lemoncolor}{RGB}{249,199,0}
\def\lemon{
\raisebox{-2pt}{\tikz{
\begin{scope}[scale=.05]
\draw[fill,lemoncolor] svg "m 27.362646,136.35568 c 0,0 0.720069,-6.2406 0.960092,-7.44072 0.240024,-1.20011 4.320418,-5.28051 4.560441,-6.96067 0.240024,-1.68016 3.360325,-3.36032 3.360325,-5.04049 -0.146118,-7.38942 2.402742,-14.34543 3.145853,-21.596377 4.325787,-42.209107 74.839633,-79.304902 119.746033,-55.931115 0,0 5.28051,-1.920186 7.68074,-1.680162 14.39672,-3.436986 38.02336,17.47666 17.28167,36.483527 l -1.44014,0.480046 C 193.5041,148.65244 93.236071,166.57085 54.005221,142.83631 c 0,0 -5.520533,-1.44014 -7.680742,-1.44014 -2.160209,0 -9.840952,0 -9.840952,0 0,0 -3.360324,-0.72007 -4.320417,-1.44014 -0.960093,-0.72007 -4.800464,-3.60035 -4.800464,-3.60035 z";
\end{scope}}}
}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{subcaption}
\graphicspath{{img/}}
\newcommand{\monthyear}{%
\ifcase\month\or January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or
December\fi\space\number\year
}
\usepackage{fancyvrb}
\newcommand{\na}{--}
\newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}
\usepackage{units}
\usepackage{makeidx}
\makeindex
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "mathematics_cheat_sheet"
%%% End: