Przeglądaj źródła

added math document examples

Martin Thoma 13 lat temu
rodzic
commit
cec677bc0e

+ 76 - 0
documents/mathe-blutspende/Aufgabe-Blutspende.tex

@@ -0,0 +1,76 @@
+\documentclass[a4paper,9pt]{scrartcl}
+\usepackage[ngerman]{babel} 
+\usepackage[utf8]{inputenc}
+\usepackage{amssymb,amsmath}
+\usepackage{geometry}
+\usepackage{graphicx}
+
+\geometry{a4paper,left=18mm,right=18mm, top=1cm, bottom=2cm} 
+
+\setcounter{secnumdepth}{2}
+\setcounter{tocdepth}{2}
+
+\begin{document}
+ \title{Blutabnahme}
+ \author{Martin Thoma}
+
+ \setcounter{section}{1}
+ \section*{Aufgabenstellung}
+    Ein Mensch hat ca. 5 Liter Blut. Bei einer Blutspende wird in der Regel etwa
+    ein halber Liter Blut entnommen. Bis zur nächsten Blutspende ist wird dieses
+    Blut wieder neu gebildet. Wie häufig muss Blut gespendet werden, bis 95\% 
+    des ursprünglichen Blutes gespendet wurde?\\
+
+    \noindent Die natürliche Neubildung von Blut auch ohne Blutspende wird vernachlässigt.
+
+    \subsection{Die ersten Werte}
+    $f(x)$ sei die Menge des ursprünglichen Blutes, das nach $x$ Spenden gespendet 
+    wurde:\\
+    $f(0) = 0$\\
+    Beim ersten mal Blutspenden wird ein halber Liter des ursprünglichen Blutes  
+    gespendet:\\
+    $f(1) = f(0) + 0{,}5$\\
+    Beim zweiten mal Blutspenden werden 0,45 Liter des ursprünglichen Blutes 
+    gespendet:\\
+    $f(2) = f(1) + f(0) + \frac{5-0{,}5}{5} \cdot 0{,}5 Liter = 0{,}95 Liter $\\
+    Beim dritten mal Blutspenden werden 0,405 Liter des ursprünglichen Blutes  
+    gespendet:\\
+    $f(3) = f(2) + f(1) + f(0) + \frac{5-0{,}95}{5} \cdot 0{,}5 Liter = 1{,}355 Liter$
+
+    \subsection{Eine rekursive Formel}
+        \begin{align}
+            f(1) &= 0{,}5 \\
+            f(x) &= \frac{5-f(x-1)}{5} \cdot 0{,}5 + f(x-1)
+        \end{align}
+
+    \subsection{Auflösen der Rekursion}
+        \begin{align}
+             f(3) &= 0{,}5 + \frac{9}{10} \cdot (0{,}5 + \frac{9}{10} \cdot (0{,}5 + \frac{9}{10} \cdot 0{,}5))\\
+                  &= 0{,}5 + \frac{9}{10} \cdot 0{,}5 + (\frac{9}{10})^2 \cdot (0{,}5 + \frac{9}{10} \cdot 0{,}5)\\
+                  &= 0{,}5 + \frac{9}{10} \cdot 0{,}5 + (\frac{9}{10})^2 \cdot 0{,}5 + (\frac{9}{10})^3 \cdot 0{,}5\\
+                  &= 0{,}5 \cdot (1 + \frac{9}{10} + (\frac{9}{10})^2 + (\frac{9}{10})^3 \cdot )\\
+              f(x)&= \frac{1}{2} \cdot \sum_{i=0}^{x} (\frac{9}{10})^i
+        \end{align}
+
+    \subsection{Auflösen des Summensymbols}
+        \begin{align}
+            f(x) &= \frac{1}{2} \cdot \sum_{i=0}^{x} (\frac{9}{10})^i\\
+                 &= \frac{1}{2}\cdot (\frac{0{,}9^{x+1} - 1}{0{,}9 - 1})\\
+                 &= \frac{1}{2}\cdot (-10 \cdot 0{,}9^{x+1} + 10)\\
+                 &= -5 \cdot 0{,}9^{x+1} + 5\\
+                 &= 5 \cdot (1 - 0{,}9^{x+1})
+        \end{align}
+
+    \subsection{Lösung}
+        \begin{align}
+            0{,}95 \cdot 5 &= 5 \cdot (1- 0{,}9^{x+1})\\
+                    0{,}95 &= 1 - 0{,}9^{x+1}\\
+              0{,}9^{x+1} &= 0{,}05\\
+    \ln(0{,}9) \cdot {x+1} &= \ln(0{,}05) \\
+                     x  &= \frac{\ln(0{,}05)}{\ln(0{,}9)} - 1\\
+                     x  &= 27{,}43
+        \end{align}
+    \subsection{Antwort}
+        Nach dem 28. mal Blutspenden wurden 95\% des ursprünglichen Blutes 
+        gespendet.
+\end{document}

+ 6 - 0
documents/mathe-blutspende/Makefile

@@ -0,0 +1,6 @@
+make:
+	pdflatex Aufgabe-Blutspende.tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux

+ 223 - 0
documents/mathe-burdsch-chalifa/Burdsch-Chalifa-Erdhalbkugel.svg

@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.2"
+   width="706.125"
+   height="408.40515"
+   id="svg2"
+   inkscape:version="0.48.0 r9654"
+   sodipodi:docname="Burdsch-Chalifa-Erdhalbkugel.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="935"
+     inkscape:window-height="641"
+     id="namedview45"
+     showgrid="false"
+     inkscape:zoom="1.2291716"
+     inkscape:cx="203.08528"
+     inkscape:cy="107.88786"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="layer1" />
+  <defs
+     id="defs4">
+    <marker
+       refX="0"
+       refY="0"
+       orient="auto"
+       id="Arrow1Lend"
+       style="overflow:visible">
+      <path
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         id="path3768"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" />
+    </marker>
+    <marker
+       refX="0"
+       refY="0"
+       orient="auto"
+       id="Arrow1Lstart"
+       style="overflow:visible">
+      <path
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         id="path3765"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" />
+    </marker>
+  </defs>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     transform="translate(-52,-97.25)"
+     id="layer1">
+    <path
+       d="m 757.13413,451.32142 c -0.34262,0.36811 -704.125927,-1.01015 -704.125927,-1.01015 0,-194.439 157.623957,-352.062964 352.062977,-352.062964 194.439,0 352.06295,158.634114 352.06295,353.073114 z"
+       id="path4420"
+       style="fill:#8497e9;fill-opacity:0.3639144;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <path
+       d="m 698.77301,451.82648 c 2.27347,-0.59614 -600.030599,-1.51523 -600.030599,-1.51523 0,-165.69387 134.321419,-298.50007 300.015299,-298.50007 165.69388,0 300.0153,134.32143 300.0153,300.0153 z"
+       id="path2987"
+       style="fill:#a1761d;fill-opacity:0.44342508;stroke:#000000;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <path
+       d="m 400,451.6479 1.42857,-298.57143"
+       id="path3758"
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       d="M 399.28571,465.93361 99.877448,465.04601"
+       id="path3760"
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-end:url(#Arrow1Lend)" />
+    <text
+       x="212.09299"
+       y="488.00406"
+       id="text4400"
+       xml:space="preserve"
+       style="font-size:20px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       sodipodi:linespacing="125%"><tspan
+         x="212.09299"
+         y="488.00406"
+         id="tspan4402"
+         style="font-size:20px"><tspan
+           x="212.09299"
+           y="488.00406"
+           id="tspan4404"
+           style="font-size:20px">6370 km</tspan></tspan></text>
+    <text
+       x="387.48788"
+       y="139.35809"
+       id="text4414"
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><tspan
+         x="387.48788"
+         y="139.35809"
+         id="tspan4416"><tspan
+           x="387.48788"
+           y="139.35809"
+           id="tspan4418">N</tspan></tspan></text>
+    <path
+       d="M 400.02041,451.82649 654.57885,294.74777"
+       id="path4423"
+       style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <path
+       d="M 653.77636,294.74226 142.24211,294.24318"
+       id="path4425"
+       style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:16, 16;stroke-dashoffset:0" />
+    <text
+       x="192.92482"
+       y="288.40582"
+       id="text4489"
+       xml:space="preserve"
+       style="font-size:20px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><tspan
+         x="192.92482"
+         y="288.40582"
+         id="tspan4491"><tspan
+           x="192.92482"
+           y="288.40582"
+           id="tspan4493">Der 25. Breitengrad</tspan></tspan></text>
+    <text
+       x="582.85437"
+       y="317.67276"
+       id="text4503"
+       xml:space="preserve"
+       style="font-size:20px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><tspan
+         x="582.85437"
+         y="317.67276"
+         id="tspan4505"><tspan
+           x="582.85437"
+           y="317.67276"
+           id="tspan4507"
+           style="font-size:20px">25°</tspan></tspan></text>
+    <path
+       d="m 588.16132,335.15387 c 0,0 -23.48605,-16.16243 -10.35406,-40.4061"
+       id="path4509"
+       style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       x="200.5369"
+       y="626.0354"
+       transform="matrix(0.82583554,-0.56391104,0.56391104,0.82583554,0,0)"
+       id="text4400-1"
+       xml:space="preserve"
+       style="font-size:20px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><tspan
+         x="200.5369"
+         y="626.0354"
+         id="tspan4402-4"><tspan
+           x="200.5369"
+           y="626.0354"
+           id="tspan4404-2"
+           style="font-size:20px">6370 km</tspan></tspan></text>
+    <path
+       d="m 486.07143,294.54968 64.01785,0.0893"
+       id="path4613"
+       style="fill:none;stroke:#00ff00;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <path
+       d="m 516.69304,297.39941 a 3.1567266,3.1567266 0 1 1 -6.31345,0 3.1567266,3.1567266 0 1 1 6.31345,0 z"
+       transform="translate(-28.031733,-2.7779195)"
+       id="path4535"
+       style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <path
+       d="m 516.69304,297.39941 a 3.1567266,3.1567266 0 1 1 -6.31345,0 3.1567266,3.1567266 0 1 1 6.31345,0 z"
+       transform="translate(35.986669,-2.6516413)"
+       id="path4535-2"
+       style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <text
+       x="435.13611"
+       y="260.22211"
+       id="text3024"
+       xml:space="preserve"
+       style="font-size:14px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><tspan
+         x="435.13611"
+         y="260.22211"
+         id="tspan3026"><tspan
+           x="435.13611"
+           y="260.22211"
+           id="tspan3028">Burdsch </tspan><tspan
+           x="496.38611"
+           y="260.22211"
+           dx="0"
+           id="tspan3030" /></tspan><tspan
+         x="435.13611"
+         y="277.72211"
+         id="tspan3032"><tspan
+           x="435.13611"
+           y="277.72211"
+           id="tspan3034">Chalifa</tspan></tspan></text>
+    <text
+       x="536.39056"
+       y="277.88675"
+       id="text4607"
+       xml:space="preserve"
+       style="font-size:14px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><tspan
+         x="536.39056"
+         y="277.88675"
+         id="tspan4609"><tspan
+           x="536.39056"
+           y="277.88675"
+           id="tspan4611">Mileiha</tspan></tspan></text>
+  </g>
+</svg>

Plik diff jest za duży
+ 121 - 0
documents/mathe-burdsch-chalifa/Burdsch-Chalifa-Erdkugel.svg


+ 31 - 0
documents/mathe-burdsch-chalifa/Burdsch-Chalifa-Skizze.svg

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.2"
+   width="202"
+   height="202"
+   id="svg2">
+    <circle cx="100" cy="100" r="100" id="Himmel"  style="fill:#d7e3f4;stroke:#000;"/>
+    <circle cx="100" cy="100" r="80"  id="Erde"    style="fill:#d38d5f;stroke:#000;"/>
+    <circle cx="100" cy="100" r="2"   id="Zentrum" style="fill:#000;stroke:#000;"/>
+
+    <path d="M 0,70 107,0" id="Tangente" style="fill:none;stroke:#000;stroke-width:1px;" />
+
+    <path d="m 55,34 45,66 7,-100 z"   id="Dreieck"       style="fill:#fff;fill-opacity:0.7;stroke:#000;stroke-width:1px;" />
+    <path d="m 62,29 c 0,0 7,7 -2,13"  id="Gradbogen-90"  style="fill:none;stroke:#000;stroke-width:1px;"/>
+    <path d="m 90,85 c 0,0 4,-8 11,-3" id="Gradbogen-phi" style="fill:none;stroke:#000;stroke-width:1px;"/>
+
+    <circle cx="60" cy="35" r="1" id="Dot" style="fill:#000;stroke:#000;"/>
+
+    <text x="93" y="89"  id="phi"    style="font-size:10px;fill:#000;font-family:Sans">φ</text>
+    <text x="75" y="130" id="Erde-t" style="font-size:20px;fill:#000;font-family:Sans">Erde</text>
+    <text x="71" y="73"  id="Radius" style="font-size:10px;fill:#000;font-family:Sans">r</text>
+    <text x="95" y="17"  id="x"      style="font-size:10px;fill:#00ff00;font-family:Sans">x</text>
+    <text x="108" y="15" id="h"      style="font-size:10px;fill:#000;font-family:Sans">h</text>
+  <path style="fill:none;stroke:#00ff00;stroke-width:1px;" d="m 55,34.063745 c 0,0 21,-16.434263 51,-13.844622" id="Kreisbogen"/>
+</svg>

BIN
documents/mathe-burdsch-chalifa/Burdsch-Chalifa.pdf


+ 177 - 0
documents/mathe-burdsch-chalifa/Burdsch-Chalifa.tex

@@ -0,0 +1,177 @@
+\documentclass[a4paper,9pt]{scrartcl}
+\usepackage[ngerman]{babel} 
+\usepackage[utf8]{inputenc}
+\usepackage{amssymb,amsmath}
+\usepackage{geometry}
+\usepackage{graphicx}
+\usepackage{hyperref}
+\usepackage{xcolor}
+\definecolor{sky}{HTML}{AAEEEE}
+\definecolor{lgreen}{HTML}{77DD11}
+\usepackage{tikz}
+\usetikzlibrary{calc, decorations.pathmorphing, decorations.text}
+
+\geometry{a4paper,left=18mm,right=18mm, top=1cm, bottom=2cm} 
+
+\setcounter{secnumdepth}{2}
+\setcounter{tocdepth}{2}
+
+\shorthandon{"}
+\hypersetup{
+    pdftitle={Sichtweite des Burdsch Chalifa},
+    pdfsubject={Aufgabe},
+    pdfauthor={Martin Thoma},
+    pdfkeywords={Aufgabe, Mathematik, Geometrie, Rechenweg, Lösung}}
+\shorthandoff{"}
+
+\begin{document}
+ \title{Sichtweite des Burdsch Chalifa}
+ \author{Martin Thoma}
+
+ \setcounter{section}{1}
+ \section*{Aufgabenstellung}
+    Der Burdsch Chalifa war 2010 das höchste Gebäude der Erde. Bis zur Spitze 
+    sind es 830 m.\\
+    \\
+    Angenommen, die Erde wäre eine perfekte Kugel mit einem Radius von 6370 km
+    und die Sicht wäre nicht durch Nebel, Wolken oder sonstige Hindernisse 
+    eingeschränkt. Aus welcher Entfernung, die man über die Erde direkt zum 
+    Burdsch Chalifa zurücklegt, könnte man den Burdsch Chalifa maximal sehen?
+
+    \subsection{Situationsskizze}
+
+
+\begin{tikzpicture}[scale=1.2]
+    \draw[fill=sky] (0, 0) circle (1.5cm);
+    \draw[fill=brown] (0, 0) circle (1cm);
+
+    %tangente
+    \begin{scope}[shift={(-1.35cm,0)}, rotate=48]
+        \draw (0,0) -- node {} (2.5cm, 0);
+    \end{scope}
+
+    \draw (0,0) -- node {} (0, 1.5cm);
+    \draw (0,0) -- node[anchor=east] {$r$} (138:1cm);
+
+    % angle
+    \draw[fill=gray!30] (0,0) -- (138:0.75cm) arc (138:90:0.75cm);
+    \draw (110:0.5cm) node {$\varphi$};
+
+    % winkelbogen
+    \draw[lime] (138:1cm) arc (138:90:1cm);
+    \node[lime] at (-0.2,0.85) {$x$} ;
+
+    % height
+    \draw[blue] (0,1cm) -- node[anchor=west] {$h$} (0, 1.5cm);
+
+    \node at (0,-0.2) {Erde} ;
+
+\end{tikzpicture}
+
+
+    Gesucht ist die Länge des neongrün hervorgehobenen Kreisbogens x.
+
+    \subsection{Rechenweg}
+    \begin{align}
+        x &= \text{Umfang} \cdot \frac{\phi}{360^\circ} \\
+          &= 2 \cdot r \cdot \pi \cdot \frac{cos^{-1}(\frac{r}{r+h})}{360^\circ} \\
+          &= 2 \cdot 6370 \text{km} \cdot \pi \cdot \frac{cos^{-1}(\frac{6370}{6370,83})}{360^\circ} \\
+          &= 102,8 \text{km}
+    \end{align}
+
+    \subsection{Antwort}
+        Bei optimalen, also unrealistischen, Bedingungen könnte man die Spitze 
+        des Burdsch Chalifa noch in 102,8 km entfernung sehen. Dies entspricht 
+        übrigens auch dem Punkt auf der Erdoberfläche, der vom Burdsch Chalifa 
+        am weitesten entfernt und zu sehen ist.\\
+        Auch wenn nur die Luftlinie gemessen wird, sind es 102,8 km, da der 
+        Erdradius bedeutend größer als der Burdsch Chalifa ist.\\
+        \\
+        Laut Bildzeitung kann man die Spitze des Burdsch Chalifa noch in 95 km 
+        sehen\footnote{http://www.bild.de/lifestyle/bams/burj-chalifa/burj-chalifa-bei-dieser-story-wurde-uns-schwindelig-828-meter-11056462.bild.html vom 10. Juni 2010. Abgerufen am 28. Mai 2011.}
+
+ \section{Erweiterung der Aufgabenstellung}
+    Das Dorf Mileiha liegt direkt östlich vom Burdsch Chalifa 
+    (25$^\circ$ 11' 50'' N, 55$^\circ$ 16' 27'' O). \\
+    Wie weit östlich darf das Dorf maximal liegen, damit man die Spitze des 
+    Burdsch Chalifa bei optimalen Bedingungen noch sehen kann?\\
+    Hinweis: Es gelten noch immer die gleichen Voraussetzungen wie im ersten 
+    Teil der Aufgabe.
+
+    \subsection{Situationsskizze}
+\begin{tikzpicture}[scale=3.5,dot/.style={circle,fill=black,minimum size=4pt,inner sep=0pt,
+            outer sep=-1pt}]
+    \draw[fill=sky!20] (180:1.2cm) arc (180:0:1.2cm);
+    \draw[fill=brown!20] (180:1cm) arc (180:0:1cm);
+    \draw (-1.2cm,0) -- node {} (1.2cm, 0);
+    \draw (0,0) -- node {} (0, 1cm);
+    \node at (0,1.1cm) {N} ;
+
+    \coordinate (DEnd) at (0.867cm,0.5cm) ;
+    \draw[dashed] (-0.86cm,0.5cm) -- node[above] {} (DEnd);
+
+    \node[above] at (-0.4cm, 0.45cm) {25. Breitengrad};
+    \node[above, text width=1cm] at (0.15cm, 0.5cm) {\scriptsize Burdsch\\Chalifa};
+    \node[above, text width=1cm] at (0.7cm, 0.5cm) {\scriptsize Mileiha};
+
+    \path [decorate,
+            decoration={
+                text along path,
+                text={6370 km},
+                text align={align=center}
+            }
+          ] (0,0) -- (DEnd);
+    \draw (0,0) -- node {} (DEnd);
+    \draw[arrows={stealth-stealth}] (-1cm,-0.05cm) -- node[below] {6370 km} (0,-0.05cm);
+
+    \node[dot, lgreen] at (0.2cm,0.5cm) (S) {};
+    \node[dot, lgreen] at (0.5cm,0.5cm) (E) {};
+
+
+
+    \draw[lgreen, thick] (S) -- node {} (E);
+
+    \begin{scope}[shift={(DEnd)}]
+        \draw[fill=gray!20] (0,0) -- (180:0.3cm)  arc (180:210:0.3cm);
+        \draw (195:0.2cm) node {$\scriptstyle 25^\circ$};
+    \end{scope}
+
+
+
+\end{tikzpicture}
+
+        Gesucht ist die grün eingezeichnete Kurve, die sich über die 
+        Erdoberfläche krümmt. Ihre Länge sei x.\\
+        Um diese zu berechnen, müssen wir wissen welchen Radius die Kreisfläche 
+        hat, die entsteht, wenn man die Erde am 25. Breitengrad schneidet. Der 
+        Radius dieser Kreisfläche sei $r_{25}$.
+    \subsection{Berechnung}
+        \begin{align}
+            \text{Breitengrad} &= 25 + \frac{11}{60} + \frac{50}{60 \cdot 60} \\
+            \text{Breitengrad} &= \frac{9071}{360} \approx 25,1972 \\
+            cos(\frac{9071}{360}) &= \frac{r_{25,1972}}{6370\text{km}} \\
+            r_{25,1972} &= cos(\frac{9071}{360}) \cdot 6370\text{km} \\
+            r_{25,1972} &\approx 5764\text{km}
+        \end{align}
+        Der soeben errechnete Radius kann einfach in die im ersten Abschnitt
+        erarbeitete Formel eingesetzt werden:
+    \begin{align}
+        x &= 2 \cdot r \cdot \pi \cdot \frac{cos^{-1}(\frac{r}{r+h})}{360^\circ} \\
+          &= 2 \cdot 5764 \text{km} \cdot \pi \cdot \frac{cos^{-1}(\frac{5764}{5764,83})}{360^\circ} \\
+          &\approx 97,8 \text{km}
+    \end{align}
+        Nun sollte man noch berücksichtigen, dass die Beobachter wohl nicht auf
+        der Erde kriechen, sondern ihre Augen in einer Höhe von ca. 1,6m sind:
+    \begin{align}
+        x &= 2 \cdot 5764 \text{km} \cdot \frac{\pi}{360^\circ} \cdot ( cos^{-1}(\frac{5764}{5764,83}) + cos^{-1}(\frac{5764}{5764,0016}) \\
+          &\approx 102 \text{km}
+    \end{align}
+
+    \subsection{Antwort}
+        Der am weitesten entfernte Punkt, der direkt östlich vom Burdsch Chalifa
+        steht und von dem aus die Spitze des Burdsch Chalifa unter optimalen
+        Bedinungen noch erkannt werden kann, liegt ca. 102 km entfernt. \\
+        \\
+        Anmerkung: Mileiha liegt ca. 60 km vom Burdsch Chalifa entfernt. Er 
+        müsste also von Mileiha zu sehen sein.
+\end{document}

+ 6 - 0
documents/mathe-burdsch-chalifa/Makefile

@@ -0,0 +1,6 @@
+make:
+	pdflatex Burdsch-Chalifa.tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.out

+ 6 - 0
documents/stundenplan/Makefile

@@ -0,0 +1,6 @@
+make:
+	pdflatex example.tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  *.aux *.log

+ 55 - 0
documents/stundenplan/example.tex

@@ -0,0 +1,55 @@
+\documentclass[a4paper,10pt]{report}
+
+% Definitions
+\usepackage{lscape}
+\usepackage[height=25cm]{geometry}
+\usepackage{timetable}
+
+\geometry{top=2cm,left=1cm,right=1cm,bottom=3cm}
+
+\begin{document}
+\thispagestyle{empty}
+\begin{landscape}
+\noindent\printheading{Stundenplan von Martin Thoma - 3. Semester}
+
+% Define the layout of your time tables
+\setslotsize{2.8cm}{0.3cm}
+\setslotcount {5} {44}
+\settopheight{3}
+\settextframe{0.8mm}
+
+% Retro
+\setframetype[t]{1}
+\seteventcornerradius{0pt}
+
+% Print timestamps into event blocks
+%\setprinttimestamps{2}
+
+% Define event types
+\defineevent{lecture}{0.0} {0.28}{1.0} {1.0}{1.0}{1.0}
+\defineevent{exercise-course}    {1.0} {0.4} {0.2} {1.0}{1.0}{1.0}
+\defineevent{tutorial}   {0.6} {0.8} {1.0} {1.0}{1.0}{1.0}
+\defineevent{langcourse} {1.0} {0.4} {0.2} {1.0}{1.0}{1.0}
+\defineevent{icpc}       {0.21}{0.5} {0.16}{1.0}{1.0}{1.0}
+
+% Start the time table
+\begin{timetable}
+  \hours{8}{15}{1}
+  \germandays{1}
+  \event 1 {0800} {0930} {Analysis III}                           {Schmöger}             {10.21 Benz}      {lecture}
+  \event 1 {0945} {1115} {Betriebssysteme}                        {Beigl}                {10.32 Nusselt}   {lecture}
+  \event 1 {1400} {1530} {Digitaltechnik}                         {Asfour}               {50.35 HS a. F.}  {lecture}
+
+  \event 2 {0945} {1115} {Betriebssysteme}                        {Beigl}                {20.40 HS 37}     {lecture}
+  \event 2 {1545} {1715} {Algorithmen II}                         {Wagner}               {30.46 Neue Chemie} {lecture}
+
+  \event 3 {1400} {1530} {Digitaltechnik}                         {Asfour}               {50.35 HS a. F.}  {lecture}
+
+  \event 4 {1545} {1715} {Algorithmen II}                         {Wagner}               {30.21 Gerthsen}  {lecture}
+
+  \event 5 {1130} {1300} {Analysis III}                           {Schmoeger}            {10.11 Hertz}     {lecture}
+  \event 5 {1545} {1715} {Analysis III}                           {Bolleyer}             {10.21 Daimler}   {exercise-course}
+\end{timetable}
+
+\end{landscape}
+\end{document}          

Plik diff jest za duży
+ 295 - 0
documents/stundenplan/manual.tex


+ 551 - 0
documents/stundenplan/timetable.sty

@@ -0,0 +1,551 @@
+%    timetable.sty - The LaTeX timetable stylesheet V1.4
+%    http://www.planetk.de/index.php?title=Stundenplan
+%
+%    Copyright (C) 2007-2009 Pascal Gwosdek
+%    Modifications (C) 2008 Daniel Bader
+%
+%    This program is free software; you can redistribute it and/or modify it
+%    under the terms of the GNU General Public License as published by the
+%    Free Software Foundation; either version 3 of the License, or (at your
+%    option) any later version.
+%
+%    This program is distributed in the hope that it will be useful, but
+%    WITHOUT ANY WARRANTY; without even the implied warranty of
+%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+%    Public License for more details.
+%
+%    You should have received a copy of the GNU General Public License along
+%    with this program; if not, see <http://www.gnu.org/licenses/>.
+%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{timetable}
+\RequirePackage{ifthen, calc, color}
+
+% Preset the colors
+\definecolor{ttframecol1}{rgb}{0.8,0.8,0.8}
+\definecolor{ttframecol2}{rgb}{0.7,0.7,0.7}
+\definecolor{ttfontcolor}{rgb}{0.0,0.0,0.0}
+\definecolor{ttlinecol1}{rgb}{0.0,0.0,0.0}
+\definecolor{ttlinecol2}{rgb}{0.0,0.0,0.0}
+
+% Simple for loop construct as proposed by N. Setzer
+\newcommand{\@ttforloop}[5][1]
+{
+  \setcounter{#2}{#3}
+  \ifthenelse{#4}
+  {
+    #5
+    \addtocounter{#2}{#1}
+    \@ttforloop[#1]{#2}{\value{#2}}{#4}{#5}
+  }
+  {}
+ }
+
+% SansSerif font
+\newcommand{\timetablefont}{\sffamily}
+\newcommand{\@ttfont}{\timetablefont\selectfont}
+
+% Dimensions
+\newlength{\@rowheight}
+\newlength{\@colwidth}
+\newcounter{@rowcount}
+\newcounter{@colcount}
+\newlength{\@textframe}
+\newlength{\@bottomspace}
+\newlength{\@totalheight}
+\newlength{\@totalwidth}
+\newlength{\@toprowheight}
+
+% Arbitrary stuff
+\newcounter{@timemarks}
+\newcounter{@daymarks}
+\newcounter{@topheight}
+\newcounter{@printtimestamps}
+\newlength{\@cornerradius}
+\newcounter{@frametype}
+\newcounter{@framevalign}
+
+% Predefines
+\setlength{\@cornerradius}{3pt}
+\setcounter{@frametype}2
+\setcounter{@framevalign}2
+\setlength{\@rowheight}{1.2cm}
+\setlength{\@colwidth}{2.8cm}
+\setlength{\@textframe}{0.8mm}
+\setlength{\@bottomspace}{8pt}
+\setcounter{@rowcount}9
+\setcounter{@colcount}5
+\setcounter{@topheight}{2}
+\setcounter{@printtimestamps}{0}
+\newcommand{\@bottomstyle}{\scriptsize}
+\newcommand{\@timestyle}{\tiny}
+
+% Event declarations
+\newlength{\@startposx}
+\newlength{\@startposy}
+\newlength{\@eventheight}
+\newlength{\@newcolwidth}
+\newlength{\@newrowheight}
+\newlength{\@newcolleft}
+\newlength{\@newrowtop}
+
+% Helpers
+\newcounter{@hourslot}
+\newcounter{@durationslots}
+\newcounter{@minutesperslot}
+\newcounter{@timetablehelp}
+
+\newcounter{@day}
+\newcounter{@column}
+\newcounter{@row}
+\newcounter{@hour}
+\newcounter{@minute}
+\newcounter{@minuteStep}
+\newcounter{@startHour}
+\newcounter{@startMinute}
+\newcounter{@endHour}
+\newcounter{@endMinute}
+\newcounter{@hoursset}
+\setcounter{@hoursset}{0}
+\newcounter{@hourzero}
+
+\newcommand{\seteventcornerradius}[1]
+{
+  \setlength{\@cornerradius}{#1}
+  \ifthenelse{\strip@pt\@cornerradius > 7}
+  {
+    \setlength{\@cornerradius}{7pt}
+  }
+  {
+    \ifthenelse{\strip@pt\@cornerradius < 0}
+    {
+      \setlength{\@cornerradius}{0pt}
+    }
+    {}
+  }
+}
+
+\newcommand{\settopheight}[1]
+{
+    \addtocounter{@rowcount}{#1-\value{@topheight}}
+    \setcounter{@topheight}{#1}
+}
+
+\newcommand{\setframetype}[2][c]
+{
+  % Set frame type
+  \ifthenelse{#2 < 1}
+  {
+    % Lines
+    \setcounter{@frametype}{1}
+  }
+  {
+    \ifthenelse{#2 > 2}
+    {
+      % Checkerboard
+      \setcounter{@frametype}{2}
+    }
+    {
+      \setcounter{@frametype}{#2}
+    }
+  }
+
+  % Caption vertical alignment
+  \ifthenelse{\equal{#1}{b}}
+  {\setcounter{@framevalign}{1}}
+    {\ifthenelse{\equal{#1}{t}}
+    {\setcounter{@framevalign}{0}}
+    {\setcounter{@framevalign}{2}}
+  }
+}
+
+\newcommand{\setprinttimestamps}[1]
+{
+    \setcounter{@printtimestamps}{#1}
+}
+
+\newcommand{\setbottomstyle}[1]
+{
+    \renewcommand{\@bottomstyle}{#1}
+}
+
+\newcommand{\settimestyle}[1]
+{
+    \renewcommand{\@timestyle}{#1}
+}
+
+\newcommand{\setbottomspace}[1]
+{
+    \setlength{\@bottomspace}{#1}
+}
+
+\newcommand{\@fmtTime}[2]
+{
+    % Arguments: {hour}{minute}
+    \ifthenelse{\value{#1} < 10}{0}{}\arabic{#1}:\ifthenelse{\value{#2} < 10}{0}{}\arabic{#2}
+}
+
+\newcommand{\slotevent}[7]
+  {
+    % Arguments: {x}{y}{duration}{title}{lecturer}{place}{type}{textcolor}
+    \renewcommand{\baselinestretch}{0.75}\normalsize
+
+    \setlength{\@startposx}{#1\@colwidth+0.5pt}
+    \setlength{\@startposy}{-#2\@rowheight-1.5pt}
+    \setlength{\@eventheight}{#3\@rowheight-1pt}
+    \addtolength{\@startposy}{-\@eventheight}
+
+    \addtolength{\@startposx}{\@cornerradius}
+    \put(\strip@pt\@startposx,\strip@pt\@startposy){\textcolor{@timetable#7block}{\rule[-\dp\strutbox]{\@colwidth-1pt-2\@cornerradius}{\@eventheight}}}
+    \addtolength{\@startposx}{-\@cornerradius}
+    \addtolength{\@startposy}{\@cornerradius}
+    \put(\strip@pt\@startposx,\strip@pt\@startposy){\textcolor{@timetable#7block}{\rule[-\dp\strutbox]{\@colwidth-1pt}{\@eventheight-2\@cornerradius}}}
+    \addtolength{\@startposy}{-\@cornerradius}
+
+    \setlength{\@cornerradius}{2\@cornerradius}
+
+    \ifthenelse{\strip@pt\@cornerradius > 0}
+    {
+      % Left rounded corners
+      \addtolength{\@startposx}{.5\@cornerradius}
+      \addtolength{\@startposy}{.5\@cornerradius-\dp\strutbox}
+      \put(\strip@pt\@startposx,\strip@pt\@startposy){\textcolor{@timetable#7block}{\circle*{\strip@pt\@cornerradius}}}
+      \addtolength{\@startposy}{-.5\@cornerradius+\dp\strutbox}
+      \addtolength{\@startposy}{-.5\@cornerradius-\dp\strutbox+\@eventheight}
+      \put(\strip@pt\@startposx,\strip@pt\@startposy){\textcolor{@timetable#7block}{\circle*{\strip@pt\@cornerradius}}}
+      \addtolength{\@startposy}{.5\@cornerradius+\dp\strutbox-\@eventheight}
+      \addtolength{\@startposx}{-.5\@cornerradius}
+
+      % Right rounded corners
+      \addtolength{\@startposx}{-.5\@cornerradius+\@colwidth-1pt}
+      \addtolength{\@startposy}{.5\@cornerradius-\dp\strutbox}
+      \put(\strip@pt\@startposx,\strip@pt\@startposy){\textcolor{@timetable#7block}{\circle*{\strip@pt\@cornerradius}}}
+      \addtolength{\@startposy}{-.5\@cornerradius+\dp\strutbox}
+      \addtolength{\@startposy}{-.5\@cornerradius-\dp\strutbox+\@eventheight}
+      \put(\strip@pt\@startposx,\strip@pt\@startposy){\textcolor{@timetable#7block}{\circle*{\strip@pt\@cornerradius}}}
+      \addtolength{\@startposy}{.5\@cornerradius+\dp\strutbox-\@eventheight}
+      \addtolength{\@startposx}{.5\@cornerradius-\@colwidth-1pt}
+    }{}
+
+    \setlength{\@cornerradius}{0.5\@cornerradius}
+
+    \setlength{\@newrowheight}{\@rowheight}
+    \addtolength{\@newrowheight}{-2\@textframe-1pt}
+    \setlength{\@newcolwidth}{\@colwidth}
+    \addtolength{\@newcolwidth}{-2\@textframe-1pt}
+
+    \setlength{\@newrowtop}{-#2\@rowheight}
+    \addtolength{\@newrowtop}{-2\@textframe}
+    \setlength{\@newcolleft}{#1\@colwidth+.5pt}
+    \addtolength{\@newcolleft}{\@textframe}
+
+    \ifthenelse{\value{@hoursset} = 0}{\setcounter{@printtimestamps}{0}}{}
+
+    % Title
+    \addtolength{\@newrowtop}{-1pt}
+    \put(\strip@pt\@newcolleft,\strip@pt\@newrowtop)
+        {\begin{minipage}[t]{\@newcolwidth}%
+          \@ttfont\raggedright\color{@timetable#7text}%
+            \ifthenelse{\value{@printtimestamps} > 0}%
+              {{\@timestyle \@fmtTime{@startHour}{@startMinute}}%
+                \ifthenelse{\value{@printtimestamps} = 2}%
+                  {{\@timestyle -- \@fmtTime{@endHour}{@endMinute}}}%
+                  {}%
+              \\}%
+              {}%
+            {#4}%
+         \end{minipage}}
+    \addtolength{\@newrowtop}{1pt}
+
+    \renewcommand{\baselinestretch}{0.5}\normalsize
+    \setlength{\@newrowtop}{-#2\@rowheight-#3\@rowheight}
+    \addtolength{\@newrowtop}{2\@textframe + \@bottomspace}
+
+    % Lecturer
+    \put(\strip@pt\@newcolleft,\strip@pt\@newrowtop)
+        {\begin{minipage}[t]{0.6\@newcolwidth}%
+	  \@ttfont\raggedright\color{@timetable#7text}{\@bottomstyle #5%
+            \vphantom{A}}
+            \ifthenelse{\value{@printtimestamps} = 1}%
+              {{\@timestyle \@fmtTime{@endHour}{@endMinute}}}%
+              {}%
+          \end{minipage}}
+
+    \setlength{\@newcolleft}{#1\@colwidth + \@colwidth}
+    \addtolength{\@newcolleft}{-\@textframe-0.4\@newcolwidth}
+
+    % Location
+    \put(\strip@pt\@newcolleft,\strip@pt\@newrowtop)
+      {\begin{minipage}[t]{0.4\@newcolwidth}%
+        \@ttfont\raggedleft\color{@timetable#7text}{\@bottomstyle #6%
+          \vphantom{A}}%
+      \end{minipage}}
+
+    \renewcommand{\baselinestretch}{1.0}\normalsize
+  }
+
+\newcommand{\event}[7]
+  {
+    % Arguments: {@day}{@start}{@end}{title}{lecturer}{place}{type}
+
+    % Use the time format, if hours are defined, and a slot number otherwise:
+    \ifthenelse{\value{@hoursset} > 0}
+    {
+      \setcounter{@startHour}{#2 / 100}
+      \setcounter{@startMinute}{#2 - #2 / 100 * 100}
+
+      \setcounter{@endHour}{#3 / 100}
+      \setcounter{@endMinute}{#3 - #3 / 100 * 100}
+	
+      \setcounter{@hourslot}{((#2 - \value{@hourzero}) / 100 * (60 / \value{@minutesperslot})) + 2 + ((#2 - #2 / 100 * 100) / \value{@minutesperslot})}
+      \setcounter{@durationslots}{((#3 - \value{@hourzero}) / 100 * (60 / \value{@minutesperslot})) + 2 + ((#3 - #3 / 100 * 100) / \value{@minutesperslot}) - \value{@hourslot}}
+
+      % Compensate for 24h wrap
+      \ifthenelse{\value{@hourslot} < 0}{\addtocounter{@hourslot}{(24 * (60 / \value{@minutesperslot}))}}{}
+
+      \addtocounter{@hourslot}{\value{@topheight}-2}
+    }
+    {
+      \setcounter{@hourslot}{#2}
+      \setcounter{@durationslots}{#3-#2}
+    }
+
+    \slotevent{#1}{\value{@hourslot}}{\value{@durationslots}}{#4}{#5}{#6}{#7}
+  }
+
+\newcommand{\legend}[3]
+  {
+    % Arguments: <horizontal> <vertical> <text>
+    % Lets you manually set slot contents (use this really rarely and
+    % SEE: \daymark, \timemark )
+
+    \setlength{\@newrowtop}{\@rowheight*(-#2+1)-\dp\strutbox}
+    \setlength{\@newcolleft}{#1\@colwidth-\@colwidth}
+
+    \ifthenelse{\value{@hoursset} = 0}
+      {\setcounter{@minutesperslot}{60}}
+      {}
+
+    % Select frame type
+    \ifthenelse{\value{@frametype} = 1}
+    { % Lines
+      \ifthenelse{#1 = 1}{\put(\strip@pt\@newcolleft,\strip@pt\@newrowtop){\textcolor{ttframecol2}{\rule{\@colwidth}{1pt}}}}{}
+      \addtolength{\@newrowtop}{-\value{@topheight}\@rowheight}
+      \addtolength{\@newcolleft}{-1pt}
+      \ifthenelse{#2 = 1}{\put(\strip@pt\@newcolleft,\strip@pt\@newrowtop){\textcolor{ttframecol2}{\rule{1pt}{\value{@topheight}\@rowheight}}}}{}
+      \addtolength{\@newcolleft}{1pt}
+      \addtolength{\@newrowtop}{\value{@topheight}\@rowheight}
+    }
+    { % Checkerboard
+      % Horizontal stripe
+      \ifthenelse{#2 = 1}
+        {\setcounter{@timetablehelp}{#1 * \real{0.5} * \real{2.0}}
+          \ifthenelse{\value{@timetablehelp} = #1}
+            {\addtolength{\@newrowtop}{-\value{@topheight}\@rowheight}
+             \put(\strip@pt\@newcolleft,\strip@pt\@newrowtop)
+               {\textcolor{ttframecol2}{\rule{\@colwidth}{\value{@topheight}\@rowheight}}}
+             \addtolength{\@newrowtop}{\value{@topheight}\@rowheight}
+            }
+            {}
+        }
+        {}
+      % Vertical stripe
+      \ifthenelse{#1 = 1}
+        {\setcounter{@timetablehelp}{(((#2-\value{@topheight}-1) * \value{@minutesperslot} / 120) * 2) - ((#2-\value{@topheight}-1) * \value{@minutesperslot} / 60)}
+          \ifthenelse{\value{@timetablehelp} = 0}
+            {\setcounter{@timetablehelp}{60 / \value{@minutesperslot}}
+             \addtolength{\@newrowtop}{-\value{@timetablehelp}\@rowheight}
+             \put(\strip@pt\@newcolleft,\strip@pt\@newrowtop)
+               {\textcolor{ttframecol2}{\rule{\@colwidth}{\value{@timetablehelp}\@rowheight}}}
+             \addtolength{\@newrowtop}{\value{@timetablehelp}\@rowheight}
+            }
+            {}
+        }
+        {}
+    }
+
+    % Print text
+    \addtolength{\@newcolleft}{\@textframe}
+    \addtolength{\@newrowtop}{-\@textframe-\heightof{\large #3}}
+
+    % Optionally move caption to middle or bottom
+    \ifthenelse{\value{@framevalign} > 0}
+    {
+      \ifthenelse{#1 = 1}
+      {
+        \addtolength{\@newrowtop}{(- \@rowheight * (60 / \value{@minutesperslot}) + 2\@textframe + \heightof{\Large #3})/\value{@framevalign}}
+      }
+      {
+        \ifthenelse{#2 = 1}
+        {
+          \addtolength{\@newrowtop}{(- \value{@topheight}\@rowheight + 2\@textframe + \heightof{\Large #3})/\value{@framevalign}}
+        }{}
+      }
+    }{}
+
+    \put(\strip@pt\@newcolleft,\strip@pt\@newrowtop){\makebox{\textcolor{ttfontcolor}{\@ttfont\large #3}}}
+  }
+
+\newcommand{\timemark}[1]
+  {
+    \stepcounter{@timemarks}
+    \legend 1 {\value{@timemarks}} {#1}
+  }
+
+\newcommand{\daymark}[1]
+  {
+    \stepcounter{@daymarks}
+    \legend {\value{@daymarks}} 1 {#1}
+  }
+
+\newcommand{\defineevent}[7]
+  {
+    \definecolor{@timetable#1block}{rgb}{#2, #3, #4}
+    \definecolor{@timetable#1text} {rgb}{#5, #6, #7}
+  }
+
+\newcommand{\printheading}[1]
+  {
+    {\@ttfont\LARGE #1}\par\vspace{5mm}\par
+  }
+
+\newcommand{\setslotsize}[2]
+  {
+    % Arguments: <width> <height>
+    % Defines the slot size
+
+    \setlength{\@rowheight}{#2}
+    \setlength{\@colwidth}{#1}
+  }
+
+\newcommand{\setslotcount}[2]
+  {
+    % Arguments: <days> <hours per day>
+    % Defines the number of slots in both dimensions
+
+    \setcounter{@colcount}{#1}
+    \setcounter{@rowcount}{#2+\value{@topheight}}
+
+    \stepcounter{@colcount}
+  }
+
+\newcommand{\settextframe}[1]
+  {
+    % Arguments: <width>
+    % Defines the width of the border of each entry (i.e. the
+    % distance between outer border and text)
+
+    \setlength{\@textframe}{#1}
+  }
+
+\newcommand{\hours}[3]
+  {
+    % Arguments: <start hour> <minute stepping> <print end time?>
+    % Automatically sets the time slots to full hours, beginning with <start hour>
+
+    \setcounter{@hoursset}{1}
+    \setcounter{@hourzero}{(#1 * 100)}
+
+    \setcounter{@hour}{#1}
+    \setcounter{@minute}{0}
+    \setcounter{@minuteStep}{#2}
+    \setcounter{@minutesperslot}{\value{@minuteStep}}
+
+    \@ttforloop{@row}{\value{@topheight}}{\value{@row} < \value{@rowcount}}
+    {
+      \ifthenelse{\value{@minute} = 0}{
+	  	\timemark{\@fmtTime{@hour}{@minute}\ifthenelse{#3 > 0}{-\setcounter{@hour}{\value{@hour}+1}\@fmtTime{@hour}{@minute}\setcounter{@hour}{\value{@hour}-1}}{}}
+	  }{\stepcounter{@timemarks}}
+	  \addtocounter{@minute}{#2}
+	  \ifthenelse{\value{@minute} = 60}{\stepcounter{@hour}\setcounter{@minute}{0}}{}	
+      \ifthenelse{\value{@hour} > 23}{\addtocounter{@hour}{-24}}{}
+    }
+  }
+
+\newcommand{\englishdays}[1]
+  {
+    % Arguments: <number of start day>
+    % Macro for the english week days
+
+    \setcounter{@day}{#1}
+
+    \@ttforloop{@column}{1}{\value{@column} < \value{@colcount}}
+    {
+      \ifthenelse{\equal{\value{@day}}1}{\daymark{Monday}}{}
+      \ifthenelse{\equal{\value{@day}}2}{\daymark{Tuesday}}{}
+      \ifthenelse{\equal{\value{@day}}3}{\daymark{Wednesday}}{}
+      \ifthenelse{\equal{\value{@day}}4}{\daymark{Thursday}}{}
+      \ifthenelse{\equal{\value{@day}}5}{\daymark{Friday}}{}
+      \ifthenelse{\equal{\value{@day}}6}{\daymark{Saturday}}{}
+      \ifthenelse{\equal{\value{@day}}7}{\daymark{Sunday}}{}
+
+      \stepcounter{@day}
+      \ifthenelse{\value{@day} > 7}{\addtocounter{@day}{-7}}{}
+    }
+  }
+
+\newcommand{\germandays}[1]
+  {
+    % Arguments: <number of start day>
+    % Macro for the english week days
+
+    \setcounter{@day}{#1}
+
+    \@ttforloop{@column}{1}{\value{@column} < \value{@colcount}}
+    {
+      \ifthenelse{\equal{\value{@day}}1}{\daymark{Montag}}{}
+      \ifthenelse{\equal{\value{@day}}2}{\daymark{Dienstag}}{}
+      \ifthenelse{\equal{\value{@day}}3}{\daymark{Mittwoch}}{}
+      \ifthenelse{\equal{\value{@day}}4}{\daymark{Donnerstag}}{}
+      \ifthenelse{\equal{\value{@day}}5}{\daymark{Freitag}}{}
+      \ifthenelse{\equal{\value{@day}}6}{\daymark{Samstag}}{}
+      \ifthenelse{\equal{\value{@day}}7}{\daymark{Sonntag}}{}
+
+      \stepcounter{@day}
+      \ifthenelse{\value{@day} > 7}{\addtocounter{@day}{-7}}{}
+    }
+  }
+
+\newenvironment{timetable}%
+  {\noindent%
+    % Arguments: None
+    % Starts a new timetable
+    %
+    % Set the new layout setting
+    \setlength{\@totalheight}{-\value{@rowcount}\@rowheight}%
+    \setlength{\@totalwidth}{\value{@colcount}\@colwidth}%
+    %
+    % Reset the counters
+    \setcounter{@timemarks}{\value{@topheight}}%
+    \setcounter{@daymarks}{1}%
+    %
+    % Minipage to correct bounding box
+    \begin{minipage}[t][-\@totalheight]{\@totalwidth}
+    %
+    % Begin. Note the offset hack of the picture, this is to make it consistent to the old pstricks package. 
+    \begin{picture}(\strip@pt\@totalwidth,\strip@pt\@totalheight)(0,-\strip@pt\baselineskip)
+      % Draw the grey frame
+      \put(0,\strip@pt\@totalheight){\textcolor{ttframecol1}{\rule[-\dp\strutbox]{\@colwidth}{-\@totalheight}}}
+      \setlength{\@toprowheight}{\value{@topheight}\@rowheight}
+      \put(0,-\strip@pt\@toprowheight){\textcolor{ttframecol1}{\rule[-\dp\strutbox]{\@totalwidth}{\@toprowheight}}}
+  }
+  {
+      % Draw the contours
+      % Inner
+      \addtolength{\@colwidth}{-1pt}
+      \put(\strip@pt\@colwidth,-\strip@pt\@toprowheight){\textcolor{ttlinecol2}{\rule[-\dp\strutbox]{\@totalwidth-\@colwidth+1pt}{1pt}}}
+      \put(\strip@pt\@colwidth,\strip@pt\@totalheight){\textcolor{ttlinecol2}{\rule[-\dp\strutbox]{1pt}{-\@totalheight-\@toprowheight}}}
+      \addtolength{\@colwidth}{1pt}
+
+      % Outer
+      \put(0,0){\textcolor{ttlinecol1}{\rule[-\dp\strutbox]{\@totalwidth}{1pt}}}
+      \put(0,\strip@pt\@totalheight){\textcolor{ttlinecol1}{\rule[-\dp\strutbox]{1pt}{-\@totalheight}}}
+      \put(\strip@pt\@totalwidth,\strip@pt\@totalheight){\textcolor{ttlinecol1}{\rule[-\dp\strutbox]{1pt}{-\@totalheight+1pt}}}
+      \addtolength{\@totalheight}{-0.5pt}
+      \put(0,\strip@pt\@totalheight){\textcolor{ttlinecol1}{\rule[-\dp\strutbox]{\@totalwidth}{1pt}}}
+      \addtolength{\@totalheight}{0.5pt}
+    \end{picture}
+
+    \end{minipage}
+  }

+ 17 - 0
uml/class-diagramm/Makefile

@@ -0,0 +1,17 @@
+# CHANGELOG
+# Version 1.0: Erstellung des Makefile
+
+# Version des Makefile
+fileinfo	:= LaTeX Makefile
+author		:= Martin Thoma
+version		:= 1.0
+
+DATE=$(shell date +%Y-%m-%d)
+
+make:
+	mpost meta.mp
+	pdflatex class-diagram.tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.out *.1

BIN
uml/class-diagramm/class-diagram.pdf


+ 32 - 0
uml/class-diagramm/class-diagram.tex

@@ -0,0 +1,32 @@
+\documentclass[a4paper]{article}
+\usepackage{geometry}
+
+\geometry{top=1cm,left=1cm,right=1cm,bottom=2cm}
+
+% The following is needed in order to make the code compatible
+% with both latex/dvips and pdflatex.
+\ifx\pdftexversion\undefined
+\usepackage[dvips]{graphicx}
+\else
+\usepackage[pdftex]{graphicx}
+\DeclareGraphicsRule{*}{mps}{*}{}
+\fi
+
+\pdfinfo{
+   /Author (Martin Thoma)
+   /Title  (LittlePraktomat Documentation)
+   /Subject (LittlePraktomat Documentation)
+   /Keywords (LaTeX)
+}
+
+\title{LittlePraktomat Documentation}
+\author{Martin Thoma}
+
+\begin{document}
+
+\maketitle
+
+\section{UML}
+\includegraphics{meta.1}
+
+\end{document}

+ 136 - 0
uml/class-diagramm/meta.mp

@@ -0,0 +1,136 @@
+input metauml;
+beginfig(1);
+    Class.LittlePraktomat("LittlePraktomat")
+		("-tutors: Set<Tutor>",
+		 "-currentTutor: Tutor",
+		 "-students: Set<Student>",
+		 "-tasks: Map<Integer,Task>",
+		 "-nextTaskId: int",
+		 "-solutions: Set<solution>")
+		("+addTutor(Tutor): void",
+		 "+addStudent(Student): void",
+		 "+addTask(String): int",
+		 "+containsTutor(Tutor): boolean",
+		 "+containsTask(int): boolean",
+		 "+getCurrentTutor(): Tutor",
+		 "+setCurrentTutor(Tutor): void",
+		 "+getTutors(): Set",
+		 "+getStudents(): Set",
+		 "+getStudentsByStudentNr(int): Student",
+		 "+getTasks(): Map",
+		 "+getSolutionsToTask(): int",
+		 "+getReviewedSolutions(int): int",
+		 "+getDistribution(int): int[]",
+		 "+getStudentsByGrade(): List"
+		 );
+	classStereotypes.LittlePraktomat("<<AverageGrade>>");
+
+    Class.Person("Person")
+		("-name: String",
+		 "+REGEX_NAME: String"
+		)
+		("+Person(String): void",
+		 "+getName(): String"
+		 );
+
+    Class.Student("Student")
+		("-studentNumber: int",
+		 "+REGEX_STUD_NUMBER: String",
+		 "-myTutor: Tutor",
+		 "-solutions: Map<Integer,Solution>",
+		)
+		("+Student(String,int,Tutor): void",
+		 "+getStudentNumber(): int",
+		 "+getTutor(): Tutor",
+		 "+getSolution(): int",
+		 "+submitSolution(Solution): void"
+		 );
+	classStereotypes.Student("<<Comparable>>", "<<AverageGrade>>");
+
+    Class.Review("Review")
+		("-grade: int",
+		 "-text: String",
+		 "-solution: Solution"
+		)
+		("+Review(int,String,Solution): void",
+		 "+getGrade(): int",
+		 "+getText(): String",
+		 "+getSolution(): Solution"
+		 );
+
+    Class.Solution("Solution")
+		("-author: Student",
+		 "-taskID: int",
+		 "-text: String",
+		 "-review: Review"
+		)
+		("+Solution(int,String,Student): void",
+		 "+getText(): String",
+		 "+getTask(): Task",
+		 "+getAuthor(): Student",
+		 "+getReview(): Review",
+		 "+setReview(Review): void"
+		 );
+
+    Class.Tutor("Tutor")
+		("-students: Set<Student>",
+		 "-missingReviews: Set<Solution>",
+		 "-reviewsDone: Set<Review>"
+		)
+		("+Tutor(String): void",
+		 "+addStudent(Student): void",
+		 "+getStudentCount(): int",
+		 "+review(int,Student,int,String): boolean",
+		 "+addMissingReview(Solution): void",
+		 "+getmissingReviewCount(): int",
+		 "+compareTo(Tutor): int"
+		 );
+	classStereotypes.Tutor("<<Comparable>>", "<<AverageGrade>>");
+
+    Class.Task("Task")
+		("-id: int",
+		 "-text: String",
+		 "-solutions: Set<Solution>"
+		)
+		("+Task(int, String): void",
+		 "+addSolution(Solution): void",
+		 "+getText(): String",
+		 "+getId(): int",
+		 "+getSolutions(): Set<Solution>"
+		 );
+	classStereotypes.Task("<<AverageGrade>>");
+
+	topToBottom(20)(Student, Person, Tutor, Task);
+	topToBottom(30)(LittlePraktomat, Review, Solution);
+	leftToRight(50)(Student, LittlePraktomat);
+
+
+    drawObjects(Person, LittlePraktomat, Student, Review, Solution, Tutor, Task);
+
+
+	link(inheritance)(pathStepX(Person.n, Student.s, 0));
+	link(inheritance)(pathStepX(Person.s, Tutor.n, 0));
+
+	link(aggregation)(pathStepX(Student.ne + (0, -15), Solution.nw + (0, -19), 20));
+	link(aggregation)(pathStepX(Student.n, LittlePraktomat.nw + (0, -50), 0));
+	link(aggregation)(pathStepX(Student.nw + (0, -15), Tutor.nw + (0, -33), -30));
+
+	link(aggregation)(pathStepX(Tutor.nw + (0, -7), Student.nw + (0, -55), -15));
+	link(aggregation)(pathStepX(Tutor.nw + (0, -7), LittlePraktomat.nw + (0, -39), -18));
+	link(aggregation)(pathStepX(Tutor.nw + (0, -7), LittlePraktomat.nw + (0, -29), -21));
+
+	link(aggregation)(pathStepX(Task.nw + (0, -7), LittlePraktomat.nw + (0, -60), -50));
+	link(aggregation)(pathStepX(Task.ne + (0, -7), Solution.nw + (0, -30), 15));
+
+	link(aggregation)(pathStepX(Solution.nw + (0, -7), LittlePraktomat.nw + (0, -82), -23));
+	link(aggregation)(pathStepX(Solution.nw + (0, -7), Student.ne + (0, -7), -26));
+	link(aggregation)(pathStepX(Solution.nw + (0, -7), Student.ne  + (0, -66), -29));
+	link(aggregation)(pathStepX(Solution.nw + (0, -7), Tutor.ne  + (0, -45), -32));
+	link(aggregation)(pathStepX(Solution.nw + (0, -59), Task.ne  + (0, -50), -20));
+	link(aggregation)(pathStepX(Solution.ne + (0, -7), Review.ne + (0, -43), 15));
+
+	link(aggregation)(pathStepX(Review.ne + (0, -7), Solution.ne + (0, -53), 30));
+	link(aggregation)(pathStepX(Review.nw + (0, -7), Tutor.ne  + (0, -55), -10));
+
+endfig;
+end