summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/schule/latex/schule.fach.Informatik.code.tex
blob: 9c2bebe5585479e0027d42dd29772ca3ab32887f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
% ********************************************************************
% Informatik                                                         *
% ********************************************************************

% Quelltexte
% ********************************************************************
\lstset{literate=%
	{Ö}{{\"O}}1
	{Ä}{{\"A}}1
	{Ü}{{\"U}}1
	{ß}{\ss}2
	{ü}{{\"u}}1
	{ä}{{\"a}}1
	{ö}{{\"o}}1
	{»}{{\frqq}}4
	{«}{{\flqq}}4
}

% Quelltextstile
\lstdefinestyle{Basis}{
	showspaces=false,
	showstringspaces=false,
	showtabs=false,
	tabsize=3,
	extendedchars=true,
	basicstyle=\ttfamily\small,		keywordstyle={\color{blue}\underbar},
	identifierstyle=,
	commentstyle=\color{gray},
	backgroundcolor=\color{white},
	numbers=left,
	numberstyle=\sffamily\tiny\color{gray},
	stepnumber=1,
	numbersep=5pt,
	captionpos=b,
	breaklines=true
}

\lstdefinestyle{Python}{
	language={Python},
	showspaces=false,
	showstringspaces=false,
	showtabs=false,
	tabsize=3,
	extendedchars=true,
	basicstyle=\ttfamily\small,		keywordstyle={\color{blue}\underbar},
	identifierstyle=,
	commentstyle=\color{gray},
	backgroundcolor=\color{white},
	numbers=left,
	numberstyle=\sffamily\tiny\color{gray},
	stepnumber=1,
	numbersep=5pt,
	captionpos=b,
	breaklines=true
}


\lstdefinestyle{Java}{
	language={Java},
	showspaces=false,
	showstringspaces=false,
	showtabs=false,
	tabsize=3,
	extendedchars=true,
	basicstyle=\ttfamily\small,		keywordstyle={\color{blue}\underbar},
	identifierstyle=,
	commentstyle=\color{gray},
	backgroundcolor=\color{white},
	numbers=left,
	numberstyle=\sffamily\tiny\color{gray},
	stepnumber=1,
	numbersep=5pt,
	captionpos=b,
	breaklines=true
}

% Klassendokumentation
% ********************************************************************
\newenvironment{klassenDokumentation}{%
    \tabularx{\textwidth}{lX}}{\endtabularx}

% Methodendokumentation
% ********************************************************************
\newcommand{\methodenDokumentation}[3]{%
	{\color{gray}#1} & \textbf{#2} \\
	& #3 \\
}

% Sequenzdiagramme
% ********************************************************************

% Skalierung von Sequenzdiagrammen
\newcommand{\skaliereSequenzdiagramm}[1]{%
    \ClassWarning{schule}{Besser: scalebox oder resizebox anstatt skaliereSequenzdiagramm}%
    \skaliereTikZ{#1}%
}

% Kommando zum Festlegen von Abständen von Threads im Sequenzdiagramm
\newcommand{\newthreadtwo}[4][gray!30]{%
	\newinst[#4]{#2}{#3}
	\stepcounter{threadnum}
	\node[below of=inst\theinstnum,node distance=0.8cm]%
		(thread\thethreadnum) {};
	\tikzstyle{threadcolor\thethreadnum}=[fill=#1]
	\tikzstyle{instcolor#2}=[fill=#1]
}

% Zur nächsten Ebene im Sequenzdiagramm
\newcommand{\nextlevel}{\addtocounter{seqlevel}{1}}

% Objektdiagramme
% ********************************************************************
% Objektattribute
\ProvideDocumentCommand{\anchormark}{O{0.15 cm} m O{0.05}}{
	\tikz[overlay,remember picture,baseline=-1ex,xshift=#1]
	\node[draw,fill=black,circle,scale=#3] (#2) {};
}

% Tikz
% ********************************************************************
% Block Styles für Flussdiagramme
%
% Color nach Schöningh?

\usetikzlibrary{shapes}
\usetikzlibrary{shadows.blur}
\tikzset{
	pap/.style={
		%
		baustein/.style={},
		%
		startstop/.style   = {
			rounded rectangle, draw, text centered, minimum width = 6em,
			inner sep = 5pt,
			top color=green!65!white, bottom color=green!25!white, baustein,
		},
		%
		verzweigung/.style = {
			diamond, draw, text width=5.5em, text badly centered,
			inner sep=0pt,
			top color=orange!75!white, bottom color=orange!45!white,baustein,
		},
		%
		aktion/.style = {rectangle, draw, text width=5em, text centered,
			top color=blue!40!white, bottom color=blue!25!white, baustein,},
		%
		einausgabe/.style  = {draw,trapezium,trapezium left angle=70,
			top color=red!40!white, bottom color=red!25!white,%fill=white,
			trapezium right angle=-70,text width=5em, text centered,baustein,
		},
		%
		unterprogramm/.style = {draw,rectangle split,%fill=white,
			top color=magenta!35!white, bottom color=magenta!15!white,baustein,
			rectangle split horizontal,rectangle split parts=3,minimum height= 2em,
				every two node part/.style = {text width=5.5em, text centered,},%Hauptteil
		},
		%
		linie/.style = {draw, -triangle 60,ultra thick},
		%
		nichts/.style = {draw},
	},
}
% Option:Farbig prüfen?
\ifthenelse{\boolean{schule@farbig}}
{\tikzset{pap/.append style= {baustein/.style={blur shadow={shadow blur steps=5}}}}}
{\tikzset{pap/.append style= {baustein/.style={top color =white, bottom color=white}}}}
% % % % % % % % % % % TikZ Ende