| 1 |
% Copyright 2018 by Till Tantau and others Wibrow |
| 2 |
% |
| 3 |
% This file may be distributed and/or modified |
| 4 |
% |
| 5 |
% 1. under the LaTeX Project Public License and/or |
| 6 |
% 2. under the GNU Public License. |
| 7 |
% |
| 8 |
% See the file doc/generic/pgf/licenses/LICENSE for more details. |
| 9 |
|
| 10 |
\usetikzlibrary{circuits.logic}% |
| 11 |
\usepgflibrary{shapes.gates.logic.US}% |
| 12 |
|
| 13 |
|
| 14 |
% |
| 15 |
% When this lib is loaded, all symbols default to IEC |
| 16 |
% |
| 17 |
|
| 18 |
\tikzset{ |
| 19 |
circuit logic US/.style= |
| 20 |
{ |
| 21 |
circuit logic, |
| 22 |
set and gate graphic = and gate US graphic, |
| 23 |
set nand gate graphic = nand gate US graphic, |
| 24 |
set or gate graphic = or gate US graphic, |
| 25 |
set nor gate graphic = nor gate US graphic, |
| 26 |
set xor gate graphic = xor gate US graphic, |
| 27 |
set xnor gate graphic = xnor gate US graphic, |
| 28 |
set not gate graphic = not gate US graphic, |
| 29 |
set buffer gate graphic = buffer gate US graphic |
| 30 |
} |
| 31 |
}% |
| 32 |
|
| 33 |
|
| 34 |
% |
| 35 |
% The logical gate graphics are all nearly identical, so we provide a |
| 36 |
% simple style for creating them: |
| 37 |
% |
| 38 |
\tikzset{ |
| 39 |
circuit logic US make graphic/.style= |
| 40 |
{ |
| 41 |
#1 graphic/.style={ |
| 42 |
circuit symbol open, |
| 43 |
circuit symbol size=width 0 height 2.5, |
| 44 |
shape=#1, |
| 45 |
transform shape |
| 46 |
} |
| 47 |
} |
| 48 |
}% |
| 49 |
|
| 50 |
|
| 51 |
\tikzset{ |
| 52 |
circuit logic US make graphic=and gate US, |
| 53 |
circuit logic US make graphic=nand gate US, |
| 54 |
circuit logic US make graphic=or gate US, |
| 55 |
circuit logic US make graphic=nor gate US, |
| 56 |
circuit logic US make graphic=xor gate US, |
| 57 |
circuit logic US make graphic=xnor gate US, |
| 58 |
circuit logic US make graphic=not gate US, |
| 59 |
circuit logic US make graphic=buffer gate US, |
| 60 |
}% |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
\endinput |