blob: 991e80800d3701ca485f0e58fa6e4bea4122e940 (
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
168
169
170
171
172
173
174
175
176
177
178
179
|
% \subsection{Das Paket \texttt{relaycircuit}}
% Die ausführliche Beschreibung des Pakets ist in der
% Paketbeschreibung (\ref{paket:relaycircuit}) zu finden.
%
% Beginn der Definition, Voraussetzung der \LaTeXe{} Version und die
% eigene Identifizierung
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{relaycircuit}[2014/11/18 v0.5 %
Relais-Schaltungen mit TikZ]
% \end{macrocode}
% Einbinden der geforderten Pakete
% \begin{macrocode}
\RequirePackage{tikz}
\RequirePackage[siunitx,european]{circuitikz}
\usetikzlibrary{arrows,shadows,shapes.misc,scopes}
% \end{macrocode}
%
% \subsubsection{TikZ-Definitionen}
%
% \begin{macrocode}
\pgfdeclareshape{ruhe relais}{
\savedanchor\northwest{
\pgf@y = 0.7cm
\pgf@x = -1cm
}
\savedanchor\left{%
\pgf@y=0pt
}
\savedanchor\inEingabe{%
\pgf@y= 0.7cm
\pgf@x= -0.7cm
}
\anchor{eingabe}{
\inEingabe
}
\anchor{anschluss}{
\inEingabe
\pgf@x= -\pgf@x
}
\anchor{ausgabe} {
\inEingabe
\pgf@x= -\pgf@x
\pgf@y= -\pgf@y
}
\anchor{center}{
\northwest
\pgf@y=0pt
\pgf@x=-.8\pgf@x
}
\anchor{east}{
\left
\pgf@x=-.8\pgf@x
}
\anchor{west}{
\left
}
\anchor{south}{
\northwest
\pgf@x=0pt
\pgf@y=-\pgf@y
}
\anchor{north}{
\northwest
\pgf@x=0pt
}
\anchor{south west}{
\northwest
\pgf@y=-\pgf@y
}
\anchor{north east}{
\northwest
\pgf@x=-\pgf@x
}
\anchor{north west}{
\northwest
}
\anchor{south east}{
\northwest
\pgf@x=-\pgf@x
\pgf@y=-\pgf@y
}
\backgroundpath{
%Eingabe und Erdung
\pgfpathmoveto{\pgfpoint{-0.7cm}{0.7cm}}
\pgfpathlineto{\pgfpoint{-0.7cm}{-0.6cm}}
\pgfpathmoveto{\pgfpoint{-0.8cm}{-0.6cm}}
\pgfpathlineto{\pgfpoint{-0.6cm}{-0.6cm}}
%Anschluss
\pgfpathmoveto{\pgfpoint{0.7cm}{0.7cm}}
\pgfpathlineto{\pgfpoint{0.7cm}{0.3cm}}
\pgfpathlineto{\pgfpoint{0.6cm}{-0.35cm}}
%Ausgabe
\pgfpathmoveto{\pgfpoint{0.7cm}{-0.7cm}}
\pgfpathlineto{\pgfpoint{0.7cm}{-0.3cm}}
\pgfpathlineto{\pgfpoint{0.6cm}{-0.3cm}}
\pgfusepath{stroke}
\pgfsetdash{{2pt}{2pt}}{1pt}
\pgfpathmoveto{\pgfpoint{-0.7cm}{0cm}}
\pgfpathlineto{\pgfpoint{0.65cm}{0cm}}
\pgfusepath{stroke}
\pgfsetdash{}{0pt}
\pgfusepath{draw}
%Kasten
\pgfsetlinewidth{2\pgflinewidth}
\pgfpathrectanglecorners{\pgfpoint{1cm}{0.5cm}%
}{\pgfpoint{-1cm}{-0.5cm}}
\pgfusepath{draw}
\pgftext[base,y=-0.4cm]{RK}
}
}
\pgfdeclareshape{arbeits relais}{
\inheritsavedanchors[from=ruhe relais]
\inheritanchor[from=ruhe relais]{center}
\inheritanchor[from=ruhe relais]{north}
\inheritanchor[from=ruhe relais]{south}
\inheritanchor[from=ruhe relais]{west}
\inheritanchor[from=ruhe relais]{east}
\inheritanchor[from=ruhe relais]{north west}
\inheritanchor[from=ruhe relais]{south west}
\inheritanchor[from=ruhe relais]{north east}
\inheritanchor[from=ruhe relais]{south east}
\inheritanchor[from=ruhe relais]{eingabe}
\inheritanchor[from=ruhe relais]{ausgabe}
\inheritanchor[from=ruhe relais]{anschluss}
\backgroundpath{
%Eingabe und Erdung
\pgfpathmoveto{\pgfpoint{-0.7cm}{0.7cm}}
\pgfpathlineto{\pgfpoint{-0.7cm}{-0.6cm}}
\pgfpathmoveto{\pgfpoint{-0.8cm}{-0.6cm}}
\pgfpathlineto{\pgfpoint{-0.6cm}{-0.6cm}}
%Anschluss
\pgfpathmoveto{\pgfpoint{0.7cm}{0.7cm}}
\pgfpathlineto{\pgfpoint{0.7cm}{0.3cm}}
\pgfpathlineto{\pgfpoint{0.95cm}{-0.35cm}}
%Ausgabe
\pgfpathmoveto{\pgfpoint{0.7cm}{-0.7cm}}
\pgfpathlineto{\pgfpoint{0.7cm}{-0.3cm}}
\pgfpathlineto{\pgfpoint{0.8cm}{-0.3cm}}
\pgfusepath{stroke}
\pgfsetdash{{2pt}{2pt}}{1pt}
\pgfpathmoveto{\pgfpoint{-0.7cm}{0cm}}
\pgfpathlineto{\pgfpoint{0.825cm}{0cm}}
\pgfusepath{stroke}
\pgfsetdash{}{0pt}
\pgfusepath{draw}
%Kasten
\pgfsetlinewidth{2\pgflinewidth}
\pgfpathrectanglecorners{\pgfpoint{1cm}{0.5cm}}%
{\pgfpoint{-1cm}{-0.5cm}}
\pgfusepath{draw}
\pgftext[base,y=-0.4cm]{AK}
}
}
% \end{macrocode}
%
% Ende des Pakets \texttt{relaycircuit}
|