aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <hallo@tomsmeding.nl>2015-09-29 13:43:45 +0200
committerTom Smeding <hallo@tomsmeding.nl>2015-09-29 13:43:45 +0200
commit14b5eef40dd3588c453d35fd07583af1d86b9231 (patch)
tree393ee91fd2e0b656f05edfb34eb3f520744b78d8
Initial
-rw-r--r--example.tex21
-rw-r--r--giraf.sty59
2 files changed, 80 insertions, 0 deletions
diff --git a/example.tex b/example.tex
new file mode 100644
index 0000000..aa958aa
--- /dev/null
+++ b/example.tex
@@ -0,0 +1,21 @@
+\documentclass{article}
+\usepackage[utf8]{inputenc}
+\usepackage{giraf}
+
+
+\begin{document}
+
+\section{\texttt{\textbackslash girafmathbb}}
+
+\girafmathbb{girafmathbb}
+
+
+\section{\texttt{\textbackslash (qed)(smiley)blokje}}
+
+\noindent
+\verb|\blokje| \blokje
+\verb|\smileyblokje| \smileyblokje
+\verb|\qedblokje| \qedblokje
+\verb|\qedsmileyblokje| \qedsmileyblokje
+
+\end{document} \ No newline at end of file
diff --git a/giraf.sty b/giraf.sty
new file mode 100644
index 0000000..fc5d191
--- /dev/null
+++ b/giraf.sty
@@ -0,0 +1,59 @@
+\ProvidesPackage{giraf}
+ [2015/09/29 v0.01 Package for interesting commands]
+
+\RequirePackage{amssymb}
+\RequirePackage{xstring}
+\RequirePackage{tikz}
+
+
+\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$\\}
+\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{}%
+ \\%
+}
+
+\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{}%
+ \\%
+}
+
+\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{}%
+ \\%
+}