\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\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}%
}
