summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/tex/tikzlibrarycircuits.logic.US.code.tex
blob: b20b4d58ba8d0d328342a9aefe512b52cdb0efef (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
% Copyright 2018 by Till Tantau and others Wibrow
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.

\usetikzlibrary{circuits.logic}%
\usepgflibrary{shapes.gates.logic.US}%


%
% When this lib is loaded, all symbols default to IEC
%

\tikzset{
  circuit logic US/.style=
  {
    circuit logic,
    set and gate graphic    = and gate US graphic,
    set nand gate graphic   = nand gate US graphic,
    set or gate graphic     = or gate US graphic,
    set nor gate graphic    = nor gate US graphic,
    set xor gate graphic    = xor gate US graphic,
    set xnor gate graphic   = xnor gate US graphic,
    set not gate graphic    = not gate US graphic,
    set buffer gate graphic = buffer gate US graphic
  }
}%


%
% The logical gate graphics are all nearly identical, so we provide a
% simple style for creating them:
%
\tikzset{
  circuit logic US make graphic/.style=
  {
    #1 graphic/.style={
      circuit symbol open,
      circuit symbol size=width 0 height 2.5,
      shape=#1,
      transform shape
    }
  }
}%


\tikzset{
  circuit logic US make graphic=and gate US,
  circuit logic US make graphic=nand gate US,
  circuit logic US make graphic=or gate US,
  circuit logic US make graphic=nor gate US,
  circuit logic US make graphic=xor gate US,
  circuit logic US make graphic=xnor gate US,
  circuit logic US make graphic=not gate US,
  circuit logic US make graphic=buffer gate US,
}%



\endinput