author | Christian Urban <christian.urban@kcl.ac.uk> |
Fri, 28 Oct 2022 09:08:13 +0100 | |
changeset 893 | 54a483a33763 |
parent 798 | aaf0bd0a211d |
permissions | -rw-r--r-- |
242
35104ee14f87
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1 |
\usepackage{tikz} |
35104ee14f87
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
2 |
\usepackage{pgf} |
252
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
242
diff
changeset
|
3 |
\usetikzlibrary{positioning} |
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
242
diff
changeset
|
4 |
\usetikzlibrary{calc} |
264
4deef8ac5d72
uodated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
5 |
\usetikzlibrary{automata} |
265
332fbe9c91ab
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
264
diff
changeset
|
6 |
\usetikzlibrary{arrows} |
332fbe9c91ab
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
264
diff
changeset
|
7 |
\usetikzlibrary{backgrounds} |
332fbe9c91ab
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
264
diff
changeset
|
8 |
\usetikzlibrary{fit} |
743 | 9 |
\usetikzlibrary{shadows} |
372
d6af4b1239de
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
368
diff
changeset
|
10 |
\usepackage{tikz-qtree} |
252
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
242
diff
changeset
|
11 |
\usepackage{graphicx} |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
12 |
\usepackage{pgfplots} |
252
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
242
diff
changeset
|
13 |
|
743 | 14 |
|
15 |
||
551 | 16 |
\pgfplotsset{compat=1.15} |
368
a9911966c0df
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
265
diff
changeset
|
17 |
|
252
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
242
diff
changeset
|
18 |
\newenvironment{bubble}[1][]{% |
368
a9911966c0df
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
265
diff
changeset
|
19 |
\addtolength{\leftmargini}{4mm}% |
a9911966c0df
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
265
diff
changeset
|
20 |
\begin{tikzpicture}[baseline=(current bounding box.north)]% |
743 | 21 |
\draw (0,0) node[drop shadow,inner sep=2mm,fill=cream,ultra thick,draw=red,rounded corners=2mm]% |
252
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
242
diff
changeset
|
22 |
\bgroup\begin{minipage}{#1}\raggedright{}} |
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
242
diff
changeset
|
23 |
{\end{minipage}\egroup;% |
368
a9911966c0df
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
265
diff
changeset
|
24 |
\end{tikzpicture}\bigskip} |
798 | 25 |
|
26 |
||
27 |
%%% for trees |
|
28 |
%% http://anorien.csc.warwick.ac.uk/mirrors/CTAN/graphics/pgf/contrib/forest/forest.pdf |
|
29 |
||
30 |
\newcommand\grid[1]{% |
|
31 |
\begin{tikzpicture}[baseline=(char.base)] |
|
32 |
\path[use as bounding box] |
|
33 |
(0,0) rectangle (1em,1em); |
|
34 |
\draw[red!50, fill=red!20] |
|
35 |
(0,0) rectangle (1em,1em); |
|
36 |
\node[inner sep=1pt,anchor=base west] |
|
37 |
(char) at (0em,\gridraiseamount) {#1}; |
|
38 |
\end{tikzpicture}} |
|
39 |
\newcommand\gridraiseamount{0.12em} |
|
40 |
||
41 |
\makeatletter |
|
42 |
\newcommand\Grid[1]{% |
|
43 |
\@tfor\z:=#1\do{\grid{\z}}} |
|
44 |
\makeatother |
|
45 |
||
46 |
\newcommand\Vspace[1][.3em]{% |
|
47 |
\mbox{\kern.06em\vrule height.3ex}% |
|
48 |
\vbox{\hrule width#1}% |
|
49 |
\hbox{\vrule height.3ex}} |
|
50 |
||
51 |
\def\VS{\Vspace[0.6em]} |