%% Beispieldatei zum Buch
%% "Wissenschaftliche Arbeiten schreiben mit LaTeX"
%% von Joachim Schlosser, 2006-2011
%%
%% Die Erläuterungen zum Beispiel findet sich im Buch.
%%
%% Zwei Kommentarzeichen (%%) bedeuten, dass eine Erläuterung folgt.
%% Ein Kommentarzeichen heisst, dass die Zeile deaktiviert wurde.
%%
%% Lizenz
%%
%% Dieses Beispiel-Dokument zu "Wissenschaftliche Arbeiten schreiben
%% mit LaTeX" von Joachim Schlosser steht unter einer Creative Commons
%% Namensnennung-Weitergabe unter gleichen Bedingungen 3.0 Deutschland
%% Lizenz (http://creativecommons.org/licenses/by-sa/3.0/de/).  Beruht
%% auf einem Inhalt unter www.latexbuch.de.  Über diese Lizenz
%% hinausgehende Erlaubnisse können Sie unter http://www.latexbuch.de
%% erhalten.
%%
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[active,tightpage]{preview}
\usepackage{tikz}
\usetikzlibrary{backgrounds,matrix,fadings,calc,positioning,%
  decorations.pathreplacing,arrows}
\PreviewEnvironment[{[]}]{tikzpicture}
\pagestyle{empty}
\begin{document}
\tikzstyle{fptmatrix}=[matrix of nodes,
  nodes={rectangle,minimum size=6mm,very thick,draw=black!50,font=\ttfamily,
  top color=white,bottom color=black!20}]
\tikzstyle{decmatrix}=[matrix of nodes, above=of fpt,
  nodes={inner sep=0,minimum size=0}] 
\begin{tikzpicture}
[mybox/.style={
  rectangle,rounded corners=1mm,minimum size=6mm,anchor=base,     
  very thick,draw=black!50,top color=white,bottom color=black!20},
mylabel/.style={fill=black!10,font=\small,text width=25mm},
>=stealth]
  \matrix (fpt)[fptmatrix] { 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 \\};
  \node[mybox, below=of fpt-1-3] (whonu) {Ganzzahl};
  \node[mybox, right=2mm of whonu] (fract) {Dezimalbruch};
  \node[mybox, left=2mm of whonu] (signb) {Vorzeichen};
  \begin{scope}[decoration={brace,amplitude=1.5mm}]
    \draw [decorate] (fpt-1-1.north west) -- (fpt-1-1.north east);
    \draw [decorate] (fpt-1-2.north west) -- (fpt-1-4.north east);
    \draw [decorate] (fpt-1-5.north west) -- (fpt-1-8.north east);
  \end{scope}
  \matrix (dec) [decmatrix,mybox,anchor=south] { $-$ & $6.$ & $5$ & $_{10}$\\ };
  \begin{scope}[->, out=270,in=90,looseness=.75,shorten >=1.5mm, shorten <=.5mm]
    \draw (dec-1-1) to (fpt-1-1.north);
    \draw (dec-1-2) to (fpt-1-3.north);
    \draw (dec-1-3) to (fpt-1-6.north east);
  \end{scope}
  \node (radix) [circle,shading=ball,ball color=black] at (fpt-1-4.south east) {}
    node[mybox, below=2.5cm,text width=2cm,text centered] (radixl) 
    {Binrpunkt\\"`Radix"'}
    edge [<-,thick, bend right=2] (radix);
  \begin{scope}[<-, shorten <=5pt,dotted,semithick]
    \node[mylabel, right=of fpt] (fptext) {quivalente Festkommazahl} edge (fpt);
    \node[mylabel, above=of fptext] {Dezimalzahl}                     edge (dec);
    \node[mylabel, below=of radixl.west,text width=36mm] (range) {Max. Bereich
      $=-2^3$ bis $(2^3-$ Auflsung$) = -8$ bis $7.9375$}         
      edge [bend left] (whonu);
    \node[mylabel, right=of range] {Auflsung $=1/2^4=0.0625$}    
      edge [bend right] (fract);
  \end{scope}
  \begin{pgfonlayer}{background}
    \begin{scope}[every path/.style={fill,gray,path fading=north}]
    \draw (fpt-1-4.south east) .. controls (whonu.north east) 
      .. (whonu.east) -- (whonu.west) .. controls
      (whonu.north west) ..  (fpt-1-2.south west) -- cycle;
    \draw (fpt-1-8.south east) .. controls (fract.north east) 
      .. (fract.east) -- (fract.west) .. controls
      (fract.north west) .. (fpt-1-5.south west) -- cycle;
    \draw (fpt-1-1.south east) .. controls (signb.north east) 
      .. (signb.east) -- (signb.west) .. controls
      (signb.north west) ..  (fpt-1-1.south west) -- cycle;
    \end{scope}
  \end{pgfonlayer}
\end{tikzpicture}
\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
