JuliaKurs23/images/TypeTree2.tex
2023-05-12 20:12:56 +02:00

62 lines
1.7 KiB
TeX

\documentclass[border={10pt},convert=true]{standalone}
%%%% pdftoppm -r 1200 TypeTree1.pdf TypeTree1 -png
%%% convert und pdf2svg sehen schlecht aus
\usepackage[]{tgheros}
\usepackage{microtype}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
%\usetikzlibrary{graphs, graphdrawing}
%\usegdlibrary{trees}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture}[
font=\sffamily,
level 1/.style={sibling distance=11em},
level 2/.style={sibling distance=10em},
level 3/.style={sibling distance=5em, level distance=5em},
level 4/.style={sibling distance=5em, level distance=7em},
level distance=5em,
every node/.style={shape=rectangle, rounded corners, draw, align=center, fill=blue!30},
leaf/.style={fill=green!30},
parametr/.style={fill=red!30}
]
\node {Number}
child{ node [parametr] {Complex}}
child{ node {Real}
child{ node {AbstractIrrational}
child{ node [leaf] {Irrational}}}
child{ node [parametr] {Rational}}
child{ node {AbstractFloat}
child{ node [leaf] {Float16\\Float32\\Float64\\BigFloat}}}
child{ node {Integer}
child{ node {Signed}
child{ node [leaf] {Int8\\Int16\\Int32\\Int64\\Int128\\BigInt}}}
child{ node {Unsigned}
child{ node [leaf] {UInt8\\UInt16\\UInt32\\UInt64\\UInt128}}}
child{ node [leaf] {Bool}}}
}
;
\node[draw=black,thick,below left=2mm, fill=white, sharp corners] at (.1,-7) {%
\begin{tabular}{@{}l@{ }l@{}}
blue: & abstract type\\
green:& concrete type\\
red:& parametric type
\end{tabular}};
\end{tikzpicture}
\end{document}
%%% Local Variables:
%%% TeX-master: t
%%% End: