summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/schule/latex/schule.mod.Papiertypen.code.tex
blob: 2693a9c257399fe1dae17fc60f7989329f789a8b (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
% Papiertypen
% ********************************************************************

% Farben
% ********************************************************************
\ifthenelse{\boolean{schule@farbig}}{
	\definecolor{farbeMillimeterpapier}{named}{orange}
}{
	\definecolor{farbeMillimeterpapier}{named}{gray}
}

% liniertes Feld
\newcommand{\feldLin}[2][1cm]{
	\begin{tikzpicture}
		\draw(0, 0); % Abstand zum oberen Rand wahren
		\foreach \n in {1,...,#2} % Linien zeichnen
			\draw[gray](0, -#1*\n )--(0.99\linewidth, -#1*\n ); 
	\end{tikzpicture}
}

% kariertes Feld
\newcommand{\feldKar}[2][0.5cm]{ 
	\begin{tikzpicture}
		\pgfmathtruncatemacro{\anzahl}{
			(\linewidth-\pgflinewidth)/#1
		}
		\draw[gray,step=#1]
			(0,0) rectangle (\anzahl*#1,#2*#1)
			(0,0) grid (\anzahl*#1,#2*#1);
	\end{tikzpicture} 
}

% Feld mit Milimetermuster
\newcommand{\feldMil}[1]{
	\begin{tikzpicture}
		\pgfmathtruncatemacro{\anza}{(\linewidth-\pgflinewidth)/1cm}
		\pgfmathtruncatemacro{\anzb}{
			(\linewidth-(0.5*\pgflinewidth))/1cm
		}
		\pgfmathtruncatemacro{\anzc}{
			(\linewidth-(0.1*\pgflinewidth))/1cm
		}
		\draw[farbeMillimeterpapier!50,step=1mm,very thin]
			(0,0) grid ((\anzc,#1);
		\draw[farbeMillimeterpapier,step=5mm,thin]
			(0,0) grid ((\anzb,#1);
		\draw[farbeMillimeterpapier,step=10mm,thick]
			(0,0) grid ((\anza,#1);
	\end{tikzpicture}
}