aboutsummaryrefslogtreecommitdiff
path: root/giraf.sty
blob: 4dd4c8d2489dd3114483afd8bc492fe89c71e66f (plain)
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
\ProvidesPackage{giraf}
  [2015/09/29 v0.01 Package for interesting commands]

\RequirePackage{amssymb}
\RequirePackage{xstring}
\RequirePackage{tikz}
\RequirePackage{graphicx}


\newcommand\girafmathbbxxxtext{}
\newcommand\girafmathbbxxxupfc{}
\newcommand\girafmathbb[1]{%
	\renewcommand\girafmathbbxxxtext{#1}%
	\StrLeft{\girafmathbbxxxtext}{1}[\firstchar]%
	\StrGobbleLeft{\girafmathbbxxxtext}{1}[\rest]%
	\renewcommand\girafmathbbxxxupfc{\expandafter\MakeUppercase\expandafter\firstchar}%
	\IfSubStr{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}{\firstchar}{$\mathbb{\girafmathbbxxxupfc}$}{\firstchar}%
	\IfEq{\rest}{}{}{\girafmathbb{\rest}}%
}


\newcommand\blokje{\hfill$\Box$\par}
\newcommand\misschienblokje{\hfill$\Box$\hspace{-.57em}\raisebox{.9pt}{\scriptsize?}\hspace{0.2em}\phantom{}\par}
\newcommand\smileyblokje{%
	\hfill%
	\begin{tikzpicture}[scale=0.22]
	\draw [rounded corners=0.03pt] (0,0) rectangle (1,1);
	\draw [line cap=round] (0.25,0.35) to [out=315,in=225] (0.75,0.35);
	\draw (0.4,0.7) circle [radius=0.03, fill=black];
	\draw (0.6,0.7) circle [radius=0.03, fill=black];
	\end{tikzpicture}%
	\hspace{0.6pt}\phantom{}%
	\par%
}

\newcommand\qedblokje{%
	\hfill%
	\begin{tikzpicture}[scale=0.22]
	\draw [rounded corners=0.03pt] (0,0) rectangle (1,1);
	\draw [line cap=round] (0.9,0.1) -- (1.3,-0.3);
	\node [scale=0.982] at (1.3,0.499) {E};
	\node [scale=0.98] at (2.05,0.498) {D};
	\end{tikzpicture}%
	\hspace{-3.2pt}\phantom{}%
	\par%
}

\newcommand\qedsmileyblokje{%
	\hfill%
	\begin{tikzpicture}[scale=0.22]
	\draw [rounded corners=0.03pt] (0,0) rectangle (1,1);
	\draw [line cap=round] (0.25,0.35) to [out=315,in=225] (0.75,0.35);
	\draw (0.4,0.7) circle [radius=0.03, fill=black];
	\draw (0.6,0.7) circle [radius=0.03, fill=black];
	\draw [line cap=round] (0.9,0.1) -- (1.3,-0.3);
	\node [scale=0.982] at (1.3,0.499) {E};
	\node [scale=0.98] at (2.05,0.498) {D};
	\end{tikzpicture}%
	\hspace{-3.2pt}\phantom{}%
	\par%
}

\newcommand\hoekje[1][90]{%
	\raisebox{-0.5pt}{%
		\begin{tikzpicture}[scale=0.25]
		\def\ang{(#1)}
		\def\dotdist{(2/(\ang/6+3)+0.3)}
		\def\dotscale{((0.15-0.5/(\ang/15+0.5/0.15))*(\ang>19))}
		\draw [line cap=round] ({cos(\ang)},{sin(\ang)}) -- (0,0) -- (1,0);
		\draw [black,fill=black] ({\dotdist * cos(\ang/2)},{\dotdist * sin(\ang/2)}) circle [radius=\dotscale];
		\end{tikzpicture}%
	}%
}

\newcommand\giraf{%
	\raisebox{-1pt}{\includegraphics[height=0.4cm]{giraf.pdf}}%
	\hspace{3pt}%
}

\newcommand\eend{%
	\raisebox{-3pt}{\includegraphics[height=0.4cm]{eend.pdf}}%
	\hspace{3pt}%
}

\newcommand\speculaas{%
	\raisebox{-3pt}{\includegraphics[height=0.4cm]{speculaas.pdf}}%
	\hspace{3pt}%
}


\newcommand\gsection[1]{%
	\par\vspace{3ex}%
	\raisebox{.8ex}{\makebox[\linewidth]{%
		\hfill%
		\rule{1.5cm}{.4pt}\hspace{4mm}%
		\raisebox{-.8ex}{\Large\textbf{#1}}%
		\hspace{4mm}\rule{1.5cm}{.4pt}%
		\hfill%
	}}\nopagebreak%

	\vspace{-\parskip}%
}