diff --git a/documents/tutorenschulung-abschlussreflexion/Makefile b/documents/tutorenschulung-abschlussreflexion/Makefile index b351ad6..8b1a46a 100644 --- a/documents/tutorenschulung-abschlussreflexion/Makefile +++ b/documents/tutorenschulung-abschlussreflexion/Makefile @@ -1,8 +1,8 @@ DOKUMENT = tutorenschulung-abschlussreflexion make: - pdflatex -shell-escape $(DOKUMENT).tex -output-format=pdf - pdflatex -shell-escape $(DOKUMENT).tex -output-format=pdf + pdflatex $(DOKUMENT).tex -output-format=pdf + pdflatex $(DOKUMENT).tex -output-format=pdf make clean clean: diff --git a/documents/tutorenschulung-abschlussreflexion/myStyle.sty b/documents/tutorenschulung-abschlussreflexion/myStyle.sty index 69be730..922e69b 100644 --- a/documents/tutorenschulung-abschlussreflexion/myStyle.sty +++ b/documents/tutorenschulung-abschlussreflexion/myStyle.sty @@ -32,22 +32,6 @@ \definecolor{greencomments}{rgb}{0,0.5,0} \definecolor{redstrings}{rgb}{0.9,0,0} -\lstset{ - language=[Sharp]C, - columns=flexible, % needed because of spaces - keepspaces=true, % needed because of spaces - showspaces=false, - showtabs=false, - breaklines=true, - showstringspaces=false, - breakatwhitespace=true, - escapeinside={(*@}{@*)}, - commentstyle=\color{greencomments}, - keywordstyle=\color{bluekeywords}\bfseries, - stringstyle=\color{redstrings}, - basicstyle=\small\ttfamily -} - % doch lieber nicht: % http://stackoverflow.com/a/6295698/562769 %\lstset{prebreak=\raisebox{0ex}[0ex][0ex] @@ -67,8 +51,6 @@ \usepackage{array} \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} -\makeglossary - %% ------------------------------- %% | Declarations | %% ------------------------------- @@ -86,13 +68,6 @@ \clearpage{\pagestyle{empty}\cleardoublepage} } -% new page before section -%\let\stdsection\section -%\renewcommand\section{\newpage\stdsection} -%\newcommand{\sectionbreak}{\clearpage} -%% --- End of New Commands --- - - %% ------------------------------- %% | Globale Settings | %% ------------------------------- @@ -126,8 +101,3 @@ &\begin{minipage}[t][][t]{8cm} \begin{enumerate} #2 \end{enumerate} \end{minipage}\\ } - -\newenvironment{usecase}{\tabularhead} -{\hline\end{tabular}} - -\usepackage{listings} diff --git a/presentations/English/LaTeX/google-presentation.pdf b/presentations/English/LaTeX/google-presentation.pdf index d1876c0..be94880 100644 Binary files a/presentations/English/LaTeX/google-presentation.pdf and b/presentations/English/LaTeX/google-presentation.pdf differ diff --git a/source-code/Pseudocode/Goldberg-Tarjan-Push-Relabel/Goldberg-Tarjan-Push-Relabel.tex b/source-code/Pseudocode/Goldberg-Tarjan-Push-Relabel/Goldberg-Tarjan-Push-Relabel.tex index 7c7aedb..02b6988 100644 --- a/source-code/Pseudocode/Goldberg-Tarjan-Push-Relabel/Goldberg-Tarjan-Push-Relabel.tex +++ b/source-code/Pseudocode/Goldberg-Tarjan-Push-Relabel/Goldberg-Tarjan-Push-Relabel.tex @@ -59,7 +59,7 @@ \EndFunction \\ \Function{Relabel}{Node $v$} - \If{$\Set{w|r_f(v,w) > 0} == \emptyset$} + \If{$\Set{w \in V |r_f(v,w) > 0} == \emptyset$} \State $dist(v) \gets \infty$ \Else \State $dist(v) \gets \min\Set{dist(w)+1|w \in V: r_f(v,w) > 0}$ diff --git a/tikz/3d-manhattan-bar-plot/getCoordinates.py b/tikz/3d-manhattan-bar-plot/getCoordinates.py index 77110a1..af41de6 100644 --- a/tikz/3d-manhattan-bar-plot/getCoordinates.py +++ b/tikz/3d-manhattan-bar-plot/getCoordinates.py @@ -1,16 +1,6 @@ def writeCoordinates(file, x, y, z): file.write("(" + str(x) + "," + str(y) + "," + str(z) + ") ") -def createTex(x, y, z, output='3d-manhattan-bar-plot.tex'): - template = open('template.tpl', 'r').read() - make3dhistogram(x, y, z, 0.0, 'data') - data = open('data', 'r').read() - file = open(output, 'wb') - template = template.replace('[PLACE_PLOT_HERE]', data) - template = template.replace('[XMAX]', str(len(x)-1)) - template = template.replace('[YMAX]', str(len(y)-1)) - file.write(template) - def make3dhistogram(x, y, z, zmin, output): file = open(output, 'wb') i = 0 @@ -37,6 +27,16 @@ def make3dhistogram(x, y, z, zmin, output): writeCoordinates(file, x[i], y[j], zmin) writeCoordinates(file, x[i], y[j], zmin) +def createTex(x, y, z, output='3d-manhattan-bar-plot.tex'): + template = open('template.tpl', 'r').read() + make3dhistogram(x, y, z, 0.0, 'data') + data = open('data', 'r').read() + file = open(output, 'wb') + template = template.replace('[PLACE_PLOT_HERE]', data) + template = template.replace('[XMAX]', str(len(x)-1)) + template = template.replace('[YMAX]', str(len(y)-1)) + file.write(template) + if __name__ == "__main__": x = [0,1,2,3,4] # Whats that good for? Can it be replaced by range(xMax+1)? y = [0,1,2,3,4] # Whats that good for? Can it be replaced by range(yMax+1)? diff --git a/tikz/triangle-angles/Makefile b/tikz/triangle-angles/Makefile new file mode 100644 index 0000000..3687afd --- /dev/null +++ b/tikz/triangle-angles/Makefile @@ -0,0 +1,35 @@ +SOURCE = triangle-angles +DELAY = 80 +DENSITY = 300 +WIDTH = 500 + +make: + pdflatex $(SOURCE).tex -output-format=pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot + +gif: + pdfcrop $(SOURCE).pdf + convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif + make clean + +png: + make + make svg + inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png + +transparentGif: + convert $(SOURCE).pdf -transparent white result.gif + make clean + +svg: + make + #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg + pdf2svg $(SOURCE).pdf $(SOURCE).svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg + rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg + inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg + rm $(SOURCE)2.svg diff --git a/tikz/triangle-angles/triangle-angles.png b/tikz/triangle-angles/triangle-angles.png new file mode 100644 index 0000000..d3ac41a Binary files /dev/null and b/tikz/triangle-angles/triangle-angles.png differ diff --git a/tikz/triangle-angles/triangle-angles.svg b/tikz/triangle-angles/triangle-angles.svg new file mode 100644 index 0000000..dd02c80 --- /dev/null +++ b/tikz/triangle-angles/triangle-angles.svg @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tikz/triangle-angles/triangle-angles.tex b/tikz/triangle-angles/triangle-angles.tex new file mode 100644 index 0000000..8273f6b --- /dev/null +++ b/tikz/triangle-angles/triangle-angles.tex @@ -0,0 +1,79 @@ + \documentclass{article} + \usepackage[pdftex,active,tightpage]{preview} + \setlength\PreviewBorder{2mm} + \usepackage{tikz} + \usetikzlibrary{shapes, calc, shapes,snakes} + \usepackage{amsmath,amssymb} + + \begin{document} + \begin{preview} + \begin{tikzpicture}[thick] + \newcommand\XC{4} + \newcommand\ALPHA{30} + + \newcommand\XB{{(\XC*(cos(\ALPHA)*cos(\ALPHA) - sin(\ALPHA)*sin(\ALPHA)) + \XC)*0.5}} + \newcommand\YB{{sqrt(cos(\ALPHA)*\XC*cos(\ALPHA)*\XC - (\XC*(cos(\ALPHA)*cos(\ALPHA) - sin(\ALPHA)*sin(\ALPHA)) + \XC)*0.5*(\XC*(cos(\ALPHA)*cos(\ALPHA) - sin(\ALPHA)*sin(\ALPHA)) + \XC)*0.5)}} + + \newcommand\XBo{{(\XB)+4}} + \newcommand\YBo{{\YB}} + \newcommand\XBp{{\XB*0.5}} + \newcommand\YBp{{\YB*0.5}} + + % Draw the triangle + \draw[fill=gray!10] (0, 0) coordinate (A) + -- (\XB,\YB) coordinate (C) + -- (\XC, 0) coordinate (B) + -- (0, 0) -- cycle; + + % Draw nodes + \node at (A)[anchor=north] {A}; + \node at (B)[anchor=north] {B}; + \node at (C)[anchor=south] {C}; + + % Draw edge text + \node (c) at ($(A)!0.5!(B)$) [below] {c}; + \node (b) at ($(A)!0.5!(C)$) [above] {b}; + \node (a) at ($(B)!0.6!(C)$) [right] {a}; + + + % draw alpha + \draw[fill=blue!30] (0,0) -- (0:0.75cm) arc (0:\ALPHA:.75cm); + \coordinate[label=right:$\alpha$] (Alpha) at (0.25,0.15); + + % draw beta + \begin{scope}[shift={(\XC, 0)}] + \draw[fill=green!30] (0,0) -- (-180:0.50cm) arc (180:{180-(90-\ALPHA)}:0.5cm); + \draw (150:0.35cm) node {$\beta$}; + \end{scope} + + % draw gamma + \begin{scope}[shift={(\XB, \YB)}] + \draw[fill=red!30] (0,0) -- ({180+\ALPHA}:0.5cm) arc ({180+\ALPHA}:{180+\ALPHA+90}:0.5cm); + \draw (-0.1, -0.05) node[below] {$\gamma$}; + \end{scope} + + + % shifted alpha + \begin{scope}[shift={(4,0)}] + \path[fill=blue!30] (0,0) -- (0:0.5cm) arc (0:\ALPHA:.5cm); + \draw (0:0.5cm) arc (0:\ALPHA:.5cm); + \end{scope} + + % shifted gamma + \begin{scope}[shift={(4, 0)},rotate=180] + \path[fill=red!30] (0,0) -- ({180+\ALPHA}:0.5cm) arc ({180+\ALPHA}:{180+\ALPHA+90}:0.5cm); + \draw ({180+\ALPHA}:0.5cm) arc ({180+\ALPHA}:{180+\ALPHA+90}:0.5cm); + \end{scope} + + \begin{scope}[shift={(3.13,-0.5)}] + \draw[dashed, red] (0, 0) -- (\XB,\YB); + \end{scope} + + \draw[dashed, color=red] (-1, 0) -- (6, 0); + \draw (0, 0) coordinate (X) + -- (\XB,\YB) coordinate (Y) + -- (\XC, 0) coordinate (Z) + -- (0, 0); + \end{tikzpicture} + \end{preview} + \end{document}