diff options
author | Karl Berry <karl@freefriends.org> | 2018-06-15 21:10:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-06-15 21:10:58 +0000 |
commit | c63d0a1e23edd25ed56574c1036928713b6442da (patch) | |
tree | c783c3f8b1280a606ef9861af4ac568089ad3efa /Master/texmf-dist/doc/latex | |
parent | f9904778d82030715f99ffa57daa1771b606c793 (diff) |
tikz-relay (15jun18)
git-svn-id: svn://tug.org/texlive/trunk@48024 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-relay/README.txt | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.pdf | bin | 585358 -> 518421 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.tex | 176 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex | 192 |
4 files changed, 319 insertions, 53 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-relay/README.txt b/Master/texmf-dist/doc/latex/tikz-relay/README.txt index 4ea0e113498..c7897d621ea 100644 --- a/Master/texmf-dist/doc/latex/tikz-relay/README.txt +++ b/Master/texmf-dist/doc/latex/tikz-relay/README.txt @@ -5,8 +5,8 @@ The tikz-relay package may be distributed and/or modified under the conditions o http://www.latex-project.org/lppl.txt and version 1 or later is part of all distributions of LaTeX version 1999/12/01 or later. -Version: 1.1 -Version date: 2018-02-19 +Version: 1.2 +Version date: 2018-06-13 ------------------------------------------------------------ diff --git a/Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.pdf b/Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.pdf Binary files differindex 4ae03dedbee..5e5474edaa9 100644 --- a/Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.pdf +++ b/Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.pdf diff --git a/Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.tex b/Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.tex index 773c56a9e44..acf93711c89 100644 --- a/Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.tex +++ b/Master/texmf-dist/doc/latex/tikz-relay/doc/tikz-relay-doc.tex @@ -1,6 +1,6 @@ %% This is file `tikz-relay-doc.tex' -%% Version: 1.1 -%% Version date: 2018-02-19 +%% Version: 1.2 +%% Version date: 2018-06-13 %% %% Copyright (C) 2018 by Luis Paulo Laus, laus@utfpr.edu.br %% @@ -20,22 +20,37 @@ %% laus@utfpr.edu.br %% %% +% to allow compression of cross references. +% both pgfmanual and pgfplots manual would be MUCH larger without it. +\pdfminorversion=5 +\pdfobjcompresslevel=2 \documentclass[a4paper]{ltxdoc} \usepackage[hyphens]{url} -\usepackage[pdfborder={0 0 0}]{hyperref} \usepackage[version=latest]{pgf} \usepackage{calc,listings,tikz,units} \usepackage{pdfpages} +% if you need an index. +\usepackage{makeidx} -\usepackage{hyperref} -\hypersetup{% - colorlinks=false, % use true to enable colors below: - linkcolor=blue,%red, - filecolor=blue,%magenta, - urlcolor=blue,%cyan, - citecolor=blue, - pdfborder=0 0 0, -} +% for cross-references: +\usepackage[pdfborder=0 0 0]{hyperref} + \hypersetup{% + colorlinks=true, % use true to enable colors below: + linkcolor=blue,%red, + filecolor=blue,%magenta, + pagecolor=blue,%red, + urlcolor=blue,%cyan, + citecolor=blue, + %frenchlinks=false, % small caps instead of colors + pdfborder=0 0 0, % PDF link-darstellung, falls colorlinks=false. 0 0 0: nix. 0 0 1: default. + %plainpages=false, % Das ist notwendig, wenn die Seitenzahlen z.T. in Arabischen und z.T. in römischen Ziffern gemacht werden. + %pdfsubject=, + } + +% this is due to some stupidity in pgfmanual-en-macros.tex: +% if this macro is not defined, the automatic cross-referencing is +% disabled: +\def\pgfautoxrefs{1} % We need lots of libraries\ldots \usetikzlibrary{backgrounds,circuits.logic.IEC} @@ -59,7 +74,37 @@ % http://mirrors.ctan.org/tex-archive/graphics/pgf/base/doc/macros/pgfmanual-en-macros.tex +\makeatletter +% the index of PGF contains +% ---- +% This index only contains automatically generated entries. A good index should +% also contain carefully selected keywords. This index is not a good index. +% --- +% use this line to reset that entry: +\def\index@prologue{\section*{Index}\addcontentsline{toc}{section}{Index} +} +\makeatother + + +% this here allows automatic cross referencing: +\RequirePackage{pgfmanual} + +% this here configures automatic cross referencing. +% It works for ANY package that uses pgfkeys and is independent on tikz/pgf. +\pgfkeys{ + % whenever an unqualified key is found, the following key prefix + % list is tried to find a match. + /pdflinks/search key prefixes in={/tikz/,/pgf/}, + % + % the link prefix written to the pdf file: + /pdflinks/internal link prefix=pgfp, + % + /pdflinks/codeexample links=true, + /pdflinks/warnings=false, % for debugging + /pdflinks/show labels=false,% for debugging +} +% belongs to \usepackage{makeindex} \makeindex \makeatletter @@ -99,7 +144,8 @@ % % This file really starts here, all the above is for pgfmanual % compatibility -\usetikzlibrary{circuits.ee.IEC.relay} +%\usetikzlibrary{circuits.ee.IEC.relay} +\input ../tex/tikzlibrarycircuits.ee.IEC.relay.code \tikzset{circuit symbol unit=2.5mm} \sloppy @@ -115,7 +161,7 @@ \title{Typesetting Electrical Wiring Diagrams for \emph{Relay} Control Systems with \LaTeX{} and \tikzname{}} \author{Luis Paulo Laus\\e-mail: \texttt{laus@utfpr.edu.br}} -\date{Version: 1.1, Version date: 2018-02-19} +\date{Version: 1.2, Version date: 2018-06-13} \maketitle @@ -142,7 +188,7 @@ The international standard IEC~60\,617 is worldwide adopted with perhaps the exc \section{Relay Library} \begin{pgflibrary}{circuits.ee.IEC.relay} -This library provides graphics for electrical wiring diagrams for relay control systems according to the international standard IEC~60\,617. The library was written to extend the \tikzname\-library |circuit.ee.IEC|. The reader is urged to read the Section~``Circuit Libraries'' of \tikzname\ manual. +This library provides graphics for electrical wiring diagrams for relay control systems according to the international standard IEC~60\,617. The library was written to extend the \tikzname-library |circuit.ee.IEC|. The reader is urged to read the Section~``Circuit Libraries'' of \tikzname\ manual. This library defines the following key: \begin{key}{/tikz/circuit ee IEC relay} @@ -210,32 +256,45 @@ The symbols in this library are: \begin{tabular}{lcc} \emph{key} & IEC~60\,617 \emph{number} & \emph{Appearance}\\ |/tikz/resistor| & 04-01-01 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[resistor] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[resistor] (0,1);}\\ |/tikz/fuse| & 07-21-01 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[fuse] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[fuse] (0,1);}\\ |/tikz/inductor IEC relay graphic| & 04-A3-01 & -\tikz[circuit ee IEC relay,set inductor graphic = inductor IEC relay graphic,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[inductor] (0,1);}\\ +\tikz[circuit ee IEC relay,set inductor graphic = inductor IEC relay graphic,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[inductor] (0,1);}\\ |/tikz/bulb| & 08-10-01 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[bulb] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[bulb] (0,1);}\\ |/tikz/magnetic sensor| & 02-08-02 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[magnetic sensor] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[magnetic sensor] (0,1);}\\ |/tikz/thermic sensor| & 02-08-01 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[thermic sensor] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[thermic sensor] (0,1);}\\ |/tikz/make contact| & 07-02-01 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[make contact] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[make contact] (0,1);}\\ |/tikz/break contact| & 07-02-03 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[break contact] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[break contact] (0,1);}\\ |/tikz/change over contact| & 07-02-04 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[change over contact] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[change over contact] (0,1);}\\ |/tikz/relay coil| & 07-15-01 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[relay coil] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[relay coil] (0,1);}\\ |/tikz/proximity sensor coil| & 07-19-01 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(1.5,1.5); \draw (0,0) to[proximity sensor coil] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[proximity sensor coil] (0,1);}\\ |/tikz/mechanical interlock| & 02-12-11 & -\tikz[circuit ee IEC relay,baseline=0cm] {\draw[help lines] (0,-0.5) grid[step=\tikzcircuitssizeunit] +(1.5,1); \draw[dashed] (0.25,0) to[mechanical interlock] (1.25,0);} +\tikz[circuit ee IEC relay,baseline=0cm] {\draw[help lines] (-1.25,-0.5) grid[step=\tikzcircuitssizeunit] +(2.5,1); \draw[dashed] (-0.75,0) to[mechanical interlock] (0.75,0);}\\ +|/tikz/horn| & 08-10-05 & +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[horn] (0,1);}\\ +|/tikz/var horn IEC relay graphic| & 08-10-05 & +\tikz[circuit ee IEC relay,set horn graphic = var horn IEC relay graphic,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[horn] (0,1);} \end{tabular} \end{center} \bigskip\end{minipage} +\begin{center} +\begin{tabular}{lcc} +\emph{key} & IEC~60\,617 \emph{number} & \emph{Appearance}\\ +|/tikz/buzzer| & NA & +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[buzzer] (0,1);}\\ +|/tikz/loud speaker| & NA & +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.75) grid[step=\tikzcircuitssizeunit] +(2.5,2.5); \draw (0,0) to[loud speaker] (0,1);} +\end{tabular} +\end{center} Three symbols, |resistor|, |inductor| and |bulb| are already defined in \tikzname-library |circuits.ee.IEC|. They are redefined in this package because their proportion was not in agreement with IEC~60\,617. The symbols |inductor| is listed in Annex~A of IEC~60\,617 implying it is deleted and should appear in old diagrams or documentation explaining is it obsolete. To use this symbol set the option \verb|set inductor graphic = inductor IEC relay graphic| either globally with |tikzset| or locally as option of a picture or a scope. ``Change over contact'' is short for ``change-over break before make contact''. The symbols |make contact|, |break contact| and |change over contact| can be activated (the contact changes the position) and this feature is needed for creating presentations. See Section~\ref{sec:beamer} for details. @@ -247,15 +306,15 @@ This list may look short, but several other symbols are possible combining these \begin{minipage}{\linewidth} The |relay coil| can be used alone or combined with annotations to form: \begin{center} -\begin{tikzpicture}[circuit ee IEC relay,thick,x=20\tikzcircuitssizeunit,y=3\tikzcircuitssizeunit] - \draw[help lines] (-0.8,-10) grid[step=\tikzcircuitssizeunit] +(3.3,12.6667); +\hspace*{-3ex}\begin{tikzpicture}[circuit ee IEC relay,thick,x=16\tikzcircuitssizeunit,y=\tikzcircuitssizeunit] + \draw[help lines] (-0.5,-38) grid[step=\tikzcircuitssizeunit] +(4,45); \global\xpos=0 \global\ypos=0 - \foreach \x in {, slow operating, slow releasing, slow operating and slow releasing, high speed, mechanically latched, alternating current, polarized, remanent, electronic, solenoid valve, pulse counter} + \foreach \x in {, slow operating, slow releasing, slow operating and slow releasing, high speed, mechanically latched, alternating current, polarized, electronic, remanent, var remanent, thermal, unaffected by alternating current, mechanically resonant, solenoid valve, pulse counter} { - \ifnum \xpos>2 \global\xpos=0 \global\advance\ypos by 3 \fi - \node[below] at (\the\xpos,-\the\ypos) {\verb|\x|}; - \draw (\the\xpos,-\the\ypos) to[relay coil={\x}] (\the\xpos,2-\the\ypos); + \ifnum \xpos>3 \global\xpos=0 \global\advance\ypos by 11 \fi + \node[below,align=center,text width=20\tikzcircuitssizeunit] at (\the\xpos,-\the\ypos) {\verb|\x|}; + \draw (\the\xpos,-\the\ypos) to[relay coil={\x}] (\the\xpos,6-\the\ypos); \global\advance\xpos by 1 } \end{tikzpicture} @@ -263,26 +322,43 @@ The |relay coil| can be used alone or combined with annotations to form: \bigskip\end{minipage} Note that symbol |relay coil| is used to produce the graphic for other devices which in fact are not relays at all. + \subsection{Annotation for contacts} \begin{minipage}{\linewidth} The contacts can be used alone or combined with annotations to form: \begin{center} -\begin{tikzpicture}[circuit ee IEC relay,thick,x=16\tikzcircuitssizeunit,y=3\tikzcircuitssizeunit] - \draw[help lines] (-0.5,-19) grid[step=\tikzcircuitssizeunit] +(4.125,21.6667); +\begin{tikzpicture}[circuit ee IEC relay,thick,x=16\tikzcircuitssizeunit,y=\tikzcircuitssizeunit] + \draw[help lines] (-0.5,-82) grid[step=\tikzcircuitssizeunit] +(4,89); \global\xpos=0 \global\ypos=0 - \foreach \x in {, manually operated, push button, protected manually operated, pull switch, turn switch, var push button, emergency switch, pedal operated, lever operated, key operated, crank operated, removable handle, proximity switch, touch switch, magnetic switch, position switch, roller, thermal switch, level switch, var level switch, counter switch, pressure switch, delayed activation, delayed deactivation, delayed both, static switch, circuit breaker} + \foreach \x in {, manually operated, protected manually operated, var push button, push button, pull switch, turn switch, emergency switch, pedal operated, lever operated, crank operated, key operated, removable handle, proximity switch, touch switch, magnetic switch, position switch, roller, level switch, var level switch, thermal switch, delayed activation, delayed deactivation, delayed both, static switch, circuit breaker, counter switch, pressure switch, emergency pull switch, var emergency pull switch, emergency turn switch, var emergency turn switch} { - \ifnum \xpos>3 \global\xpos=0 \global\advance\ypos by 3 \fi - \node[below] at (\the\xpos,-\the\ypos) {\verb|\x|}; - \draw (\the\xpos,-\the\ypos) to[make contact={\x}] (\the\xpos,2-\the\ypos); + \ifnum \xpos>3 \global\xpos=0 \global\advance\ypos by 11 \fi + \node[below,align=center,text width=14\tikzcircuitssizeunit] at (\the\xpos,-\the\ypos) {\verb|\x|}; + \draw (\the\xpos,-\the\ypos) to[make contact={\x}] (\the\xpos,6-\the\ypos); \global\advance\xpos by 1 } \end{tikzpicture} \end{center} \bigskip\end{minipage} -Temperature sensitive switch is indicated by either the Greek capital letter $\Theta$ or by the operating temperature conditions written at the right side of the contact and it can be achieved using the |info'| key. It is also usual to indicate pressure sensitive switch with roman letter P or by the operating pressure conditions in the same way. +Temperature sensitive switch is indicated by either the Greek capital letter $\Theta$ or by the operating temperature conditions written at the right side of the contact and it can be achieved using the |info'| key. It is also usual to indicate pressure sensitive switch with roman letter P or by the operating pressure conditions in the same way. + +Some symbols can be obtained by combining in this library with symbol from the \tikzname-library |circuit.ee.IEC|, for instance, a static switch, passing current in one direction only (IEC symbol 07-25-03) can be drawn using a |make contact| and a |diode| as: +\begin{center} +\begin{tikzpicture}[circuit ee IEC relay,thick, + x=4\tikzcircuitssizeunit, + y=2\tikzcircuitssizeunit] + \draw[help lines] (-0.5,-.5) grid[step=\tikzcircuitssizeunit] +(2,4); + \draw (0,0) -- ++(0,.5) + to [diode={scale=-1}] ++(0,1) + to [make contact] ++(0,1) -- ++(0,.5); + \draw (1,0) -- ++(0,.5) + to [diode] ++(0,1) + to [make contact] ++(0,1) -- ++(0,.5); +\end{tikzpicture} +\end{center} +In this case, the space or grid should be treated very carefully. \subsection{Annotation self-placement} \begin{minipage}{\linewidth} @@ -475,7 +551,7 @@ Finishing up the previous example, the |x| grid is set to five |\tikzcircuitssiz \end{codeexample} \noindent{}Power rails are placed using named nodes. This is not really necessary since the beginning and end of the power rails lines can be determined easily because we are working on a grid. -Because of the direction chosen when the symbols were first defined in \tikzname, we start from the bottom moving to the top of the diagram. This is not mandatory, although changing the direction requires that all symbols and annotations are negatively scale, for instance, the last example would be: +Because of the direction chosen when the symbols were first defined in \tikzname, we start from the bottom moving to the top of the diagram. This is not mandatory, although changing the direction requires that all symbols and annotations be negatively scaled (locally rotated by $180^{\circ}$), for instance, the last example would be: \begin{codeexample}[width=4.1cm] \begin{tikzpicture}[circuit ee IEC relay,thick, @@ -715,7 +791,9 @@ A complete, though minimalistic, example is provided in a separated file\footnot \subsection{Adjusting the diagram size} -The diagram size can be adjusted setting |x| and |y| units. Mainly, you change those to control the space between symbols, not the diagram size in total\footnote{The total size will change, but it is more like a collateral damage than intentional deed.}. If your diagram is too big, consider to use a landscape page. For presentations, adjustments can be done using |resizebox|. +The diagram size can be adjusted setting |x| and |y| units. Mainly, you change those to control the space between symbols, not the diagram size in total\footnote{The total size will change, but it is more like a collateral damage than intentional deed.}. If your diagram is too big, consider to use a landscape page. + +For presentations, adjustments can be done using |resizebox|. Note that you should only use |resizebox| if your diagram is slightly bigger than the presentation area. If it is too much bigger, the use of |resizebox| will render small symbols leading to readability problems. In this case, on option is to divide the diagram in smaller pieces. Also, you should reconsider way you need such a big diagram in a presentation. Usually, small examples are better to clarify your point. It is not a good idea to change the diagram size setting |\tikzcircuitssizeunit| using |circuit symbol unit|. |\tikzcircuitssizeunit| shall be set document wise in the document preamble and kept unchanged. @@ -729,7 +807,7 @@ Contacts can be considered an especial case of symbols. They have no defined bor Outer separation is also undesired when placing contact. If the normal treatment were dispensed for contacts, setting the outer separation to any positive number would disrupt the line connected to the symbol. Instead of setting the outer separation to zero, the shape code that produces contacts simply disregards the outer separation when drawing the component. -All symbols below look rotated $90^{ \circ}$ because \tikzname\ uses this orientation to place the symbol in a line. +All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ because \tikzname\ uses this orientation to place the symbol in a line. \begin{codeexample}[] @@ -838,6 +916,18 @@ All symbols below look rotated $90^{ \circ}$ because \tikzname\ uses this orient \end{codeexample} +\begin{codeexample}[] +\begin{tikzpicture}[circuit ee IEC relay] + \node[name=s, shape=mechanical interlock IEC relay, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=5.2cm]{}; + \foreach \anchor/\placement in {center/above, mid/below, 30/above right, 358/below right, + north/above, north east/above, north west/above, + south/below, south east/below, south west/below, + east/left, west/right, input/left, output/right} + \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\end{tikzpicture} +\end{codeexample} + + \section{Known Issues} This library is base in withdrawn standards and the current standardized symbols might be different. It is also rather incomplete; so many symbols are missing, though in my best knowledge the missing symbols are rarely used. Let me know if you need a symbol, I will do my best to implement it. diff --git a/Master/texmf-dist/doc/latex/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex b/Master/texmf-dist/doc/latex/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex index b4ea6ab4fce..4f78fb77acc 100644 --- a/Master/texmf-dist/doc/latex/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex +++ b/Master/texmf-dist/doc/latex/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex @@ -1,6 +1,6 @@ %% This is file `tikzlibrarycircuits.ee.IEC.relay.code.tex' -%% Version: 1.1 -%% Version date: 2018-02-19 +%% Version: 1.2 +%% Version date: 2018-06-13 %% %% Copyright (C) 2018 by Luis Paulo Laus, laus@utfpr.edu.br %% @@ -35,6 +35,15 @@ %% protected manually operated; %% new symbol: mechanical interlock; %% fix annotations separation. +%% 1.2: 13 June 2018: new shape for mechanical interlock; +%% new symbol for horn, var horn, +%% buzzer, loud speaker +%% new annotations: emergency pull +%% switch, var emergency pull switch, +%% emergency turn switch, var emergency +%% turn switch, var remanent, thermal, +%% unaffected by alternating current, +%% mechanically resonant %% \usetikzlibrary{circuits.ee.IEC} \usepgflibrary{shapes.geometric} @@ -463,6 +472,11 @@ \pgfpathlineto{\pgfqpoint{\pgf@xb}{0pt}} \pgfpathlineto{\pgfqpoint{0pt}{\pgf@yb}} \pgfpathclose + } + \foregroundpath{ + \pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}} + \pgf@xa=-\pgf@x \pgf@ya=-\pgf@y + \pgf@xb=\pgf@x \pgf@yb=\pgf@y \pgfpathmoveto{\pgfqpoint{0.75\pgf@xa}{0.25\pgf@ya}} \pgfpathlineto{\pgfqpoint{0.75\pgf@xb}{0.25\pgf@ya}} \pgfpathmoveto{\pgfqpoint{0.75\pgf@xa}{0.25\pgf@yb}} @@ -471,10 +485,74 @@ } } + +% w= 0.8; h = w/2*tan(60*PI/180); +\pgfdeclareshape{mechanical interlock IEC relay} +{ + \savedanchor\northeast{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=.5\pgf@xa% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@y=.5\pgf@ya% + } + \savedanchor\southwest{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=-.5\pgf@xa% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@y=-.5\pgf@ya% + } + \savedanchor\savedoutput{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=.25\pgf@xa% + \pgf@y=0pt% + } + + \anchor{center}{\pgfpointorigin} + \anchor{mid}{\pgfpointorigin} + \inheritanchor[from=rectangle ee]{north} + \inheritanchor[from=rectangle ee]{south} + \inheritanchor[from=rectangle ee]{east} + \inheritanchor[from=rectangle ee]{west} + \inheritanchor[from=rectangle ee]{north east} + \inheritanchor[from=rectangle ee]{north west} + \inheritanchor[from=rectangle ee]{south east} + \inheritanchor[from=rectangle ee]{south west} + \anchor{output}{\savedoutput} + \anchor{input}{% + \pgf@process{\savedoutput}% + \pgf@x=-\pgf@x% + } + \anchor{east}{\savedoutput} + \anchor{west}{% + \pgf@process{\savedoutput}% + \pgf@x=-\pgf@x% + } + + \anchorborder{% + \pgf@xa=\pgf@x% + \pgf@process{\savedoutput}% + \ifdim\pgf@xa<0pt% + \pgf@x=-\pgf@x% + \fi% + } + + \backgroundpath{ + \pgf@process{\northeast} + \pgf@xa=\pgf@x \pgf@ya=\pgf@y + \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}} + \pgfpathlineto{\pgfqpoint{-\pgf@xa}{\pgf@ya}} + \pgfpathlineto{\pgfqpoint{0pt}{-\pgf@ya}} + \pgfpathclose + } +} + \makeatother \tikzset{ circuit declare symbol=fuse, + circuit declare symbol=horn, + circuit declare symbol=buzzer, + circuit declare symbol=loud speaker, circuit declare symbol=magnetic sensor, circuit declare symbol=thermic sensor, circuit declare symbol=change over contact, @@ -531,6 +609,30 @@ [-] (\tikzlastnode.mid) edge[circuit symbol lines/.try,line join=bevel,to path={-- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) -- ++(-0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0,0.6226497\tikzcircuitssizeunit)}] () edge[circuit symbol open/.try,line join=bevel,to path={++(0.8\tikzcircuitssizeunit,3.0226497\tikzcircuitssizeunit) arc[start angle=27, delta angle=126, radius=0.9\tikzcircuitssizeunit] --cycle}] () }, + circuit declare annotation={emergency pull switch}{4.566322437\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,line join=bevel,to path={-- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) -- ++(-0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0,0.6226497\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) ++(0.5\tikzcircuitssizeunit,0.6\tikzcircuitssizeunit) -- ++(0,-0.6\tikzcircuitssizeunit) -- ++(-1\tikzcircuitssizeunit,0) -- ++(0,0.6\tikzcircuitssizeunit) ++(0.5\tikzcircuitssizeunit,-0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) } ] () edge[circuit symbol open/.try,line join=bevel,to path={++(0.8\tikzcircuitssizeunit,4.8226497\tikzcircuitssizeunit) arc[start angle=27, delta angle=126, radius=0.9\tikzcircuitssizeunit] --cycle}] () + }, + circuit declare annotation={var emergency pull switch}{2.766322437\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,line join=bevel,to path={-- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) -- ++(-0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- +(0,0.6226497\tikzcircuitssizeunit) ++(0,-1.5\tikzcircuitssizeunit) -- ++(0.6\tikzcircuitssizeunit,0) ++(0.3\tikzcircuitssizeunit,0) -- ++(0.6\tikzcircuitssizeunit,0) ++(0.3\tikzcircuitssizeunit,0) -- ++(0.6\tikzcircuitssizeunit,0) -- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) ++(0.5\tikzcircuitssizeunit,0.6\tikzcircuitssizeunit) -- ++(0,-0.6\tikzcircuitssizeunit) -- ++(-1\tikzcircuitssizeunit,0) -- ++(0,0.6\tikzcircuitssizeunit)}] () edge[circuit symbol open/.try,line join=bevel,to path={++(0.8\tikzcircuitssizeunit,3.0226497\tikzcircuitssizeunit) arc[start angle=27, delta angle=126, radius=0.9\tikzcircuitssizeunit] --cycle}] () + }, + circuit declare annotation={emergency turn switch}{4.566322437\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,line join=bevel,to path={-- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) -- ++(-0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0,0.6226497\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) ++(0.5\tikzcircuitssizeunit,-0.6\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) -- ++(-1\tikzcircuitssizeunit,0) -- ++(0,0.6\tikzcircuitssizeunit) ++(0.5\tikzcircuitssizeunit,-0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) } ] () edge[circuit symbol open/.try,line join=bevel,to path={++(0.8\tikzcircuitssizeunit,4.8226497\tikzcircuitssizeunit) arc[start angle=27, delta angle=126, radius=0.9\tikzcircuitssizeunit] --cycle}] () + }, + circuit declare annotation={var emergency turn switch}{2.766322437\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,line join=bevel,to path={-- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) -- ++(-0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- +(0,0.6226497\tikzcircuitssizeunit) ++(0,-1.5\tikzcircuitssizeunit) -- ++(0.6\tikzcircuitssizeunit,0) ++(0.3\tikzcircuitssizeunit,0) -- ++(0.6\tikzcircuitssizeunit,0) ++(0.3\tikzcircuitssizeunit,0) -- ++(0.6\tikzcircuitssizeunit,0) -- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) ++(0.5\tikzcircuitssizeunit,-0.6\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) -- ++(-1\tikzcircuitssizeunit,0) -- ++(0,0.6\tikzcircuitssizeunit)}] () edge[circuit symbol open/.try,line join=bevel,to path={++(0.8\tikzcircuitssizeunit,3.0226497\tikzcircuitssizeunit) arc[start angle=27, delta angle=126, radius=0.9\tikzcircuitssizeunit] --cycle}] () + }, % 0.5773503+1.4+1+1-1.321367 circuit declare annotation={thermal switch}{2.6559833\tikzcircuitssizeunit} { @@ -722,7 +824,7 @@ { [transform shape] [-] - (\tikzlastnode.north) edge[circuit symbol filled/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(0,\tikzcircuitssizeunit) -- ++(-0.5\tikzcircuitssizeunit,0) --++(0,-0.5\tikzcircuitssizeunit) -- ++(-1\tikzcircuitssizeunit,0) --++(0,0.5\tikzcircuitssizeunit) -- ++(-0.5\tikzcircuitssizeunit,0) --++(0,-\tikzcircuitssizeunit) --cycle}] () edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth+\tikzcircuitssizeunit) --++(-2\tikzcircuitssizeunit,0)}] () + (\tikzlastnode.north) edge[circuit symbol filled/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(0,\tikzcircuitssizeunit) -- ++(-0.5\tikzcircuitssizeunit,0) --++(0,-0.5\tikzcircuitssizeunit) -- ++(-1\tikzcircuitssizeunit,0) --++(0,0.5\tikzcircuitssizeunit) -- ++(-0.5\tikzcircuitssizeunit,0) --++(0,-\tikzcircuitssizeunit) --cycle}] () edge[circuit symbol open/.try,every relay coil/.try,to path={++(0.5\tikzcircuitssizeunit,-.5\pgflinewidth+0.5\tikzcircuitssizeunit) --++(0,0.5\tikzcircuitssizeunit) --++(-\tikzcircuitssizeunit,0) --++(0,-0.5\tikzcircuitssizeunit) --cycle}] () }, circuit declare annotation={remanent}{1\tikzcircuitssizeunit} { @@ -730,12 +832,38 @@ [-] (\tikzlastnode.north) edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(0,\tikzcircuitssizeunit) -- ++(-2\tikzcircuitssizeunit,0) --++(0,-\tikzcircuitssizeunit) --cycle}] () edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(-2\tikzcircuitssizeunit,\tikzcircuitssizeunit)}] () }, + circuit declare annotation={var remanent}{1.5\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.north) edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(0,1.5\tikzcircuitssizeunit) -- ++(-2\tikzcircuitssizeunit,0) --++(0,-1.5\tikzcircuitssizeunit) --cycle}] () edge[circuit symbol open/.try,every relay coil/.try,to path={++(.5\tikzcircuitssizeunit,-.5\pgflinewidth) --++(0,.5\tikzcircuitssizeunit) --++(-\tikzcircuitssizeunit,.5\tikzcircuitssizeunit) --++(0,.5\tikzcircuitssizeunit)}] () + }, circuit declare annotation={electronic}{0pt} { [transform shape] [-] (\tikzlastnode.center) edge[circuit symbol open/.try,every relay coil/.try,to path={-- +(0,\tikzcircuitssizeunit) ++(0.5\tikzcircuitssizeunit,0) -- ++(-\tikzcircuitssizeunit,0) ++(.3\tikzcircuitssizeunit,0) -- +(-.5\tikzcircuitssizeunit,-.5\tikzcircuitssizeunit) ++(.4\tikzcircuitssizeunit,0) -- +(.5\tikzcircuitssizeunit,-.5\tikzcircuitssizeunit)}] () }, + circuit declare annotation={thermal}{0pt} + { + [transform shape] + [-] + (\tikzlastnode.center) edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,0) -- ++(-.5\tikzcircuitssizeunit,0) -- ++(0,-\tikzcircuitssizeunit) -- ++(-\tikzcircuitssizeunit,0) -- ++(0,\tikzcircuitssizeunit) -- ++(-.5\tikzcircuitssizeunit,0)}] () + }, + circuit declare annotation={unaffected by alternating current}{0pt} + { + [transform shape] + [-] + (\tikzlastnode.center) edge[circuit symbol filled/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,2\tikzcircuitssizeunit) --++(-.5\tikzcircuitssizeunit,0) -- ++(0,-4\tikzcircuitssizeunit) -- ++(.5\tikzcircuitssizeunit,0)--cycle}] () edge[circuit symbol filled/.try,every relay coil/.try,to path={++(-\tikzcircuitssizeunit,2\tikzcircuitssizeunit) --++(.5\tikzcircuitssizeunit,0) -- ++(0,-4\tikzcircuitssizeunit) -- ++(-.5\tikzcircuitssizeunit,0)--cycle}] () + }, + circuit declare annotation={mechanically resonant}{0pt} + { + [transform shape] + [-] + (\tikzlastnode.south) edge[circuit symbol lines/.try,every relay coil/.try,to path={++(0,.5\pgflinewidth) --++(0,-.6\tikzcircuitssizeunit) ++(0,-.4\tikzcircuitssizeunit) --++(0,-\tikzcircuitssizeunit) ++(0,-.4\tikzcircuitssizeunit) --++(0,-\tikzcircuitssizeunit) + (\tikzlastnode.south) ++(0,-1.5\tikzcircuitssizeunit+.5\pgflinewidth) arc [start angle=200, end angle=340, radius=0.5\tikzcircuitssizeunit] + (\tikzlastnode.south) ++(0,-1.5\tikzcircuitssizeunit+.5\pgflinewidth) arc [start angle=20, end angle=160, radius=0.5\tikzcircuitssizeunit]}] () + }, } \tikzset{ @@ -823,14 +951,59 @@ }, transform shape }, + horn IEC relay graphic/.style={ + circuit symbol open, + circuit symbol size=width 2 height 2, + shape=rectangle ee, + append after command={% + \bgroup + edge[circuit symbol open, to path={% + (0.3333\tikzcircuitssizeunit,-\tikzcircuitssizeunit) -- (0.8956\tikzcircuitssizeunit,-4.4689\tikzcircuitssizeunit) -- (-1\tikzcircuitssizeunit,-5\tikzcircuitssizeunit) -- (-0.3333\tikzcircuitssizeunit,-\tikzcircuitssizeunit) -- cycle}] () + \egroup% + }, + transform shape + }, + var horn IEC relay graphic/.style={ + circuit symbol open, + circuit symbol size=width 2 height 2, + shape=rectangle ee, + append after command={% + \bgroup + edge[circuit symbol open, to path={% + (0.5\tikzcircuitssizeunit,-\tikzcircuitssizeunit) -- (\tikzcircuitssizeunit,-2\tikzcircuitssizeunit) -- (-\tikzcircuitssizeunit,-2\tikzcircuitssizeunit) -- (-0.5\tikzcircuitssizeunit,-\tikzcircuitssizeunit) -- cycle}] () + \egroup% + }, + transform shape + }, + buzzer IEC relay graphic/.style={ + circuit symbol open, + circuit symbol size=width 2 height 2, + shape=rectangle ee, + append after command={% + \bgroup + edge[circuit symbol lines, to path={% + (\tikzcircuitssizeunit,-\tikzcircuitssizeunit) -- (-\tikzcircuitssizeunit,-2\tikzcircuitssizeunit)}] () + \egroup% + }, + transform shape + }, + loud speaker IEC relay graphic/.style={ + circuit symbol open, + circuit symbol size=width 3 height 2, + shape=rectangle ee, + append after command={% + \bgroup + edge[circuit symbol open, to path={% + (1.5\tikzcircuitssizeunit,-\tikzcircuitssizeunit) -- (3.5\tikzcircuitssizeunit,-2.5\tikzcircuitssizeunit) -- (-3.5\tikzcircuitssizeunit,-2.5\tikzcircuitssizeunit) -- (-1.5\tikzcircuitssizeunit,-\tikzcircuitssizeunit) -- cycle}] () + \egroup% + }, + transform shape + }, mechanical interlock IEC relay graphic/.style={ circuit symbol open, - shape=regular polygon, - regular polygon sides=3, + circuit symbol size=width 0.8 height 0.69282032, inner sep=0pt, - yshift=0.075103\tikzcircuitssizeunit, - minimum size=0.87\tikzcircuitssizeunit, - rotate=180, + shape=mechanical interlock IEC relay, transform shape } } @@ -846,6 +1019,9 @@ set bulb graphic = bulb IEC relay graphic, % aditions set fuse graphic = fuse IEC relay graphic, + set horn graphic = horn IEC relay graphic, + set buzzer graphic = buzzer IEC relay graphic, + set loud speaker graphic = loud speaker IEC relay graphic, set magnetic sensor graphic = magnetic sensor IEC relay graphic, set thermic sensor graphic = thermic sensor IEC relay graphic, set make contact graphic = make contact IEC relay graphic, |