texlive[46555] Master/texmf-dist: tikz-ladder (6feb18)

commits+karl at tug.org commits+karl at tug.org
Wed Feb 7 00:59:08 CET 2018


Revision: 46555
          http://tug.org/svn/texlive?view=revision&revision=46555
Author:   karl
Date:     2018-02-07 00:59:08 +0100 (Wed, 07 Feb 2018)
Log Message:
-----------
tikz-ladder (6feb18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tikz-ladder/README.txt
    trunk/Master/texmf-dist/doc/latex/tikz-ladder/tikz-ladder-doc.pdf
    trunk/Master/texmf-dist/doc/latex/tikz-ladder/tikz-ladder-doc.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/tikz-ladder/tikzlibrarycircuits.plc.ladder.code.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/tikz-ladder/pgfmanual-en-macros.tex
    trunk/Master/texmf-dist/tex/latex/tikz-ladder/tikzlibraryladder.code.tex

Modified: trunk/Master/texmf-dist/doc/latex/tikz-ladder/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ladder/README.txt	2018-02-06 15:27:32 UTC (rev 46554)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ladder/README.txt	2018-02-06 23:59:08 UTC (rev 46555)
@@ -9,7 +9,7 @@
 later is part of all distributions of LaTeX version 1999/12/01
 or later.
 
- Version 1 of 10 January 2018
+ Version 1.1 2018-02-06
 
 ------------------------------------------------------------
 
@@ -23,7 +23,7 @@
 to a ``rung'' of a relay ladder logic diagram. This library
 provides TikZ symbols to draw high quality ladder diagrams.
 All standard and some non-standard symbols are possible,
-including all kids of contacts, coils and blocks. I decided
+including all kinds of contacts, coils and blocks. I decided
 to write this package, despite of the fact that there is
 available another package named `ladder' that also uses TikZ
 to typeset ladder diagrams, because that package seems to

Deleted: trunk/Master/texmf-dist/doc/latex/tikz-ladder/pgfmanual-en-macros.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ladder/pgfmanual-en-macros.tex	2018-02-06 15:27:32 UTC (rev 46554)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ladder/pgfmanual-en-macros.tex	2018-02-06 23:59:08 UTC (rev 46555)
@@ -1,1760 +0,0 @@
-% Copyright 2006 by Till Tantau
-%
-% This file may be distributed and/or modified
-%
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Free Documentation License.
-%
-% See the file doc/generic/pgf/licenses/LICENSE for more details.
-
-% $Header: /cvsroot/pgf/pgf/doc/generic/pgf/macros/pgfmanual-en-macros.tex,v 1.81 2014/03/20 10:07:44 tantau Exp $
-
-
-\providecommand\href[2]{\texttt{#1}}
-\providecommand\hypertarget[2]{\texttt{#1}}
-\providecommand\hyperlink[2]{\texttt{#1}}
-
-
-\colorlet{examplefill}{yellow!80!black}
-\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
-\definecolor{codebackground}{rgb}{0.9,0.9,1}
-
-\newenvironment{pgfmanualentry}{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}}{\endlist}
-\newcommand\pgfmanualentryheadline[1]{\itemsep=0pt\parskip=0pt{\raggedright\item\strut{#1}\par}\topsep=0pt}
-\newcommand\pgfmanualbody{\parskip3pt}
-
-\let\origtexttt=\texttt
-\def\texttt#1{{\def\textunderscore{\char`\_}\def\textbraceleft{\char`\{}\def\textbraceright{\char`\}}\origtexttt{#1}}}
-\def\exclamationmarktext{!}
-\def\atmarktext{@}
-
-{
-  \catcode`\|=12
-  \gdef\pgfmanualnormalbar{|}
-  \catcode`\|=13
-  \AtBeginDocument{\gdef|{\ifmmode\pgfmanualnormalbar\else\expandafter\verb\expandafter|\fi}}
-}
-
-
-
-\newenvironment{pgflayout}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \texttt{\string\pgfpagesuselayout\char`\{\declare{#1}\char`\}}\oarg{options}%
-    }
-    \index{#1@\protect\texttt{#1} layout}%
-    \index{Page layouts!#1@\protect\texttt{#1}}%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-
-\newenvironment{command}[1]{
-  \begin{pgfmanualentry}
-    \extractcommand#1\@@
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\makeatletter
-
-\def\includeluadocumentationof#1{
-  \directlua{require 'pgf.manual.DocumentParser'}
-  \directlua{pgf.manual.DocumentParser.include '#1'}
-}
-
-\newenvironment{luageneric}[4]{
-  \pgfmanualentry
-    \pgfmanualentryheadline{#4 \texttt{#1\declare{#2}}#3}
-    \index{#2@\protect\texttt{#2} (Lua)}%
-    \def\temp{#1}
-    \ifx\temp\pgfutil at empty\else
-      \index{#1@\protect\texttt{#1}!#2@\protect\texttt{#2} (Lua)}%
-    \fi
-  \pgfmanualbody
-}{\endpgfmanualentry}
-
-\newenvironment{luatable}[3]{
-  \medskip
-  \luageneric{#1}{#2}{ (declared in \texttt{#3})}{\textbf{Lua table}}
-}{\endluageneric}
-
-\newenvironment{luafield}[1]{
-  \pgfmanualentry
-    \pgfmanualentryheadline{Field \texttt{\declare{#1}}}
-  \pgfmanualbody
-}{\endpgfmanualentry}
-
-
-\newenvironment{lualibrary}[1]{
-  \pgfmanualentry
-  \pgfmanualentryheadline{%
-    \pgfmanualpdflabel{#1}{}%
-    \textbf{Graph Drawing Library} \texttt{\declare{#1}}%
-  }
-    \index{#1@\protect\texttt{#1} graph drawing library}%
-    \index{Libraries!#1@\protect\texttt{#1}}%
-    \index{Graph drawing libraries!#1@\protect\texttt{#1}}%
-    \vskip.25em
-    {\ttfamily\char`\\usegdlibrary\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space  \LaTeX\space and plain \TeX}\\
-    {\ttfamily\char`\\usegdlibrary[\declare{#1}]\space \char`\%\space\space Con\TeX t}\smallskip\par
-    \pgfmanualbody
-}{\endpgfmanualentry}
-
-\newenvironment{luadeclare}[4]{
-  \pgfmanualentry
-  \def\manual at temp@default{#3}%
-  \def\manual at temp@initial{#4}%
-  \def\manual at temp@{#3#4}%
-  \pgfmanualentryheadline{%
-    \pgfmanualpdflabel{#1}{}%
-    {\ttfamily/graph
-      drawing/\declare{#1}\opt{=}}\opt{#2}\hfill%
-    \ifx\manual at temp@\pgfutil at empty\else%
-    (\ifx\manual at temp@default\pgfutil at empty\else%
-    default {\ttfamily #3}\ifx\manual at temp@initial\pgfutil at empty\else, \fi%
-    \fi%
-    \ifx\manual at temp@initial\pgfutil at empty\else%
-    initially {\ttfamily #4}%
-    \fi%
-    )\fi%
-  }%
-  \index{#1@\protect\texttt{#1} key}%
-  \pgfmanualbody
-  \gdef\myname{#1}%
-%  \keyalias{tikz}
-%  \keyalias{tikz/graphs}
-}{\endpgfmanualentry}
-
-\newenvironment{luadeclarestyle}[4]{
-  \pgfmanualentry
-  \def\manual at temp@para{#2}%
-  \def\manual at temp@default{#3}%
-  \def\manual at temp@initial{#4}%
-  \def\manual at temp@{#3#4}%
-  \pgfmanualentryheadline{%
-    \pgfmanualpdflabel{#1}{}%
-    {\ttfamily/graph drawing/\declare{#1}}\ifx\manual at temp@para\pgfutil at empty\else\opt{\texttt=}\opt{#2}\fi\hfill%
-    (style\ifx\manual at temp@\pgfutil at empty\else, %
-    \ifx\manual at temp@default\pgfutil at empty\else%
-    default {\ttfamily #3}\ifx\manual at temp@initial\pgfutil at empty\else, \fi%
-    \fi%
-    \ifx\manual at temp@initial\pgfutil at empty\else%
-    initially {\ttfamily #4}%
-    \fi%
-    \fi)%
-  }%
-  \index{#1@\protect\texttt{#1} key}%
-  \pgfmanualbody%
-  \gdef\myname{#1}%
-%  \keyalias{tikz}
-%  \keyalias{tikz/graphs}
-}{\endpgfmanualentry}
-
-\newenvironment{luanamespace}[2]{
-  \luageneric{#1}{#2}{}{\textbf{Lua namespace}}
-}{\endluageneric}
-
-\newenvironment{luafiledescription}[1]{}{}
-
-\newenvironment{luacommand}[4]{
-  \hypertarget{pgf/lua/#1}{\luageneric{#2}{#3}{\texttt{(#4)}}{\texttt{function}}}
-}{\endluageneric}
-
-\newenvironment{luaparameters}{\par\emph{Parameters:}%
-  \parametercount=0\relax%
-  \let\item=\parameteritem%
-  \let\list=\restorelist%
-}
-{\par
-}
-
-\newenvironment{luareturns}{\par\emph{Returns:}%
-  \parametercount=0\relax%
-  \let\item=\parameteritem%
-  \let\list=\restorelist%
-}
-{\par
-}
-
-\newcount\parametercount
-
-\newenvironment{parameterdescription}{\unskip%
-  \parametercount=0\relax%
-  \let\item=\parameteritem%
-  \let\list=\restorelist%
-}
-{\par
-}
-\let\saveditemcommand=\item
-\let\savedlistcommand=\list
-\def\denselist#1#2{\savedlistcommand{#1}{#2}\parskip0pt\itemsep0pt}
-\def\restorelist{\let\item=\saveditemcommand\denselist}
-\def\parameteritem{\pgfutil at ifnextchar[\parameteritem@{}}%}
-\def\parameteritem@[#1]{\advance\parametercount by1\relax\hskip0.15em plus 1em\emph{\the\parametercount.}\kern1ex\def\test{#1}\ifx\test\pgfutil at empty\else#1\kern.5em\fi}
-
-\newenvironment{commandlist}[1]{%
-  \begin{pgfmanualentry}
-  \foreach \xx in {#1} {%
-    \expandafter\extractcommand\xx\@@
-  }%
-  \pgfmanualbody
-}{%
-  \end{pgfmanualentry}
-}%
-
-% \begin{internallist}[register]{\pgf at xa}
-% \end{internallist}
-%
-% \begin{internallist}[register]{\pgf at xa,\pgf at xb}
-% \end{internallist}
-\newenvironment{internallist}[2][register]{%
-  \begin{pgfmanualentry}
-  \foreach \xx in {#2} {%
-    \expandafter\extractinternalcommand\expandafter{\xx}{#1}%
-  }%
-  \pgfmanualbody
-}{%
-  \end{pgfmanualentry}
-}%
-\def\extractinternalcommand#1#2{%
-  \removeats{#1}%
-  \pgfmanualentryheadline{%
-    \pgfmanualpdflabel{\textbackslash\strippedat}{}%
-    Internal #2 \declare{\texttt{\string#1}}}%
-  \index{Internals!\strippedat @\protect\myprintocmmand{\strippedat}}%
-  \index{\strippedat @\protect\myprintocmmand{\strippedat}}%
-}
-
-%% MW: START MATH MACROS
-\def\mvar#1{{\ifmmode\textrm{\textit{#1}}\else\rmfamily\textit{#1}\fi}}
-
-\makeatletter
-
-\def\extractmathfunctionname#1{\extractmathfunctionname@#1(,)\tmpa\tmpb}
-\def\extractmathfunctionname@#1(#2)#3\tmpb{\def\mathname{#1}}
-
-\makeatother
-  
-\newenvironment{math-function}[1]{
-  \def\mathdefaultname{#1}
-  \extractmathfunctionname{#1}
-  \edef\mathurl{{math:\mathname}}\expandafter\hypertarget\expandafter{\mathurl}{}%
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{\texttt{#1}}%
-    \index{\mathname @\protect\texttt{\mathname} math function}%
-    \index{Math functions!\mathname @\protect\texttt{\mathname}}%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\def\pgfmanualemptytext{}
-\def\pgfmanualvbarvbar{\char`\|\char`\|}
-
-\newenvironment{math-operator}[4][]{%
-  \begin{pgfmanualentry}
-  \csname math#3operator\endcsname{#2}{#4}
-  \def\mathtest{#4}%
-  \ifx\mathtest\pgfmanualemptytext%
-    \def\mathtype{(#3 operator)}
-  \else%
-    \def\mathtype{(#3 operator; uses the \texttt{#4} function)}
-  \fi%
-  \pgfmanualentryheadline{\mathexample\hfill\mathtype}%
-  \def\mathtest{#1}%
-  \ifx\mathtest\pgfmanualemptytext%
-    \index{#2@\protect\texttt{#2} #3 math operator}%  
-    \index{Math operators!#2@\protect\texttt{#2}}%
-  \fi%
-  \pgfmanualbody
-}
-{\end{pgfmanualentry}}
-
-\newenvironment{math-operators}[5][]{%
-  \begin{pgfmanualentry}
-  \csname math#4operator\endcsname{#2}{#3}
-  \def\mathtest{#5}%
-  \ifx\mathtest\pgfmanualemptytext%
-    \def\mathtype{(#4 operators)}
-  \else%
-    \def\mathtype{(#4 operators; use the \texttt{#5} function)}
-  \fi%
-  \pgfmanualentryheadline{\mathexample\hfill\mathtype}%
-  \def\mathtest{#1}%
-  \ifx\mathtest\pgfmanualemptytext%
-    \index{#2#3@\protect\texttt{#2\protect\ #3} #4 math operators}% 
-    \index{Math operators!#2#3@\protect\texttt{#2\protect\ #3}}%
-  \fi%
-  \pgfmanualbody
-}
-{\end{pgfmanualentry}}
-
-\def\mathinfixoperator#1#2{%
-  \def\mathoperator{\texttt{#1}}%
-  \def\mathexample{\mvar{x}\space\texttt{#1}\space\mvar{y}}%
-}
-
-\def\mathprefixoperator#1#2{%
-  \def\mathoperator{\texttt{#1}}%
-  \def\mathexample{\texttt{#1}\mvar{x}}%
-}
-
-\def\mathpostfixoperator#1#2{%
-  \def\mathoperator{\texttt{#1}}
-  \def\mathexample{\mvar{x}\texttt{#1}}%
-}
-
-\def\mathgroupoperator#1#2{%
-  \def\mathoperator{\texttt{#1\ #2}}%
-  \def\mathexample{\texttt{#1}\mvar{x}\texttt{#2}}%
-}
-
-\expandafter\let\csname matharray accessoperator\endcsname=\mathgroupoperator
-\expandafter\let\csname matharrayoperator\endcsname=\mathgroupoperator
-
-\def\mathconditionaloperator#1#2{%
-  \def\mathoperator{#1\space#2}
-  \def\mathexample{\mvar{x}\ \texttt{#1}\ \mvar{y}\ {\texttt{#2}}\ \mvar{z}}
-}
-
-\newcommand\mathcommand[1][\mathdefaultname]{%
-  \expandafter\makemathcommand#1(\empty)\stop%
-  \expandafter\extractcommand\mathcommandname\@@%
-  \medskip
-}
-\makeatletter
-
-\def\makemathcommand#1(#2)#3\stop{%
-  \expandafter\def\expandafter\mathcommandname\expandafter{\csname pgfmath#1\endcsname}%
-  \ifx#2\empty%
-  \else%
-    \@makemathcommand#2,\stop,
-  \fi}
-\def\@makemathcommand#1,{%
-  \ifx#1\stop%
-  \else%
-    \expandafter\def\expandafter\mathcommandname\expandafter{\mathcommandname{\ttfamily\char`\{#1\char`\}}}%
-    \expandafter\@makemathcommand%
-  \fi}
-\makeatother
-
-\def\calcname{\textsc{calc}}
-
-\newenvironment{math-keyword}[1]{
-  \extracttikzmathkeyword#1@
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{\texttt{\color{red}\mathname}\mathrest}%
-    \index{\mathname @\protect\texttt{\mathname} tikz math function}%
-    \index{TikZ math functions!\mathname @\protect\texttt{\mathname}}%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\def\extracttikzmathkeyword#1#2@{%
-  \def\mathname{#1}%
-  \def\mathrest{#2}%
-}
-
-%% MW: END MATH MACROS
-
-
-\def\extractcommand#1#2\@@{%
-  \removeats{#1}%
-  \pgfmanualentryheadline{%
-    \pgfmanualpdflabel{\textbackslash\strippedat}{}%
-    \declare{\texttt{\string#1}}#2%
-  }%
-  \index{\strippedat @\protect\myprintocmmand{\strippedat}}
-}
-
-\def\luaextractcommand#1#2\relax{%
-  \declare{\texttt{\string#1}}#2\par%
-%  \removeats{#1}%
- % \index{\strippedat @\protect\myprintocmmand{\strippedat}}
- % \pgfmanualpdflabel{\textbackslash\strippedat}{}%
-}
-
-
-% \begin{environment}{{name}\marg{arguments}}
-\renewenvironment{environment}[1]{
-  \begin{pgfmanualentry}
-    \extractenvironement#1\@@
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\def\extractenvironement#1#2\@@{%
-  \pgfmanualentryheadline{%
-    \pgfmanualpdflabel{#1}{}%
-    {\ttfamily\char`\\begin\char`\{\declare{#1}\char`\}}#2%
-  }%
-  \pgfmanualentryheadline{{\ttfamily\ \ }\meta{environment contents}}%
-  \pgfmanualentryheadline{{\ttfamily\char`\\end\char`\{\declare{#1}\char`\}}}%
-  \index{#1@\protect\texttt{#1} environment}%
-  \index{Environments!#1@\protect\texttt{#1}}
-}
-
-
-\newenvironment{plainenvironment}[1]{
-  \begin{pgfmanualentry}
-    \extractplainenvironement#1\@@
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\def\extractplainenvironement#1#2\@@{%
-  \pgfmanualentryheadline{{\ttfamily\declare{\char`\\#1}}#2}%
-  \pgfmanualentryheadline{{\ttfamily\ \ }\meta{environment contents}}%
-  \pgfmanualentryheadline{{\ttfamily\declare{\char`\\end#1}}}%
-  \index{#1@\protect\texttt{#1} environment}%
-  \index{Environments!#1@\protect\texttt{#1}}%
-}
-
-
-\newenvironment{contextenvironment}[1]{
-  \begin{pgfmanualentry}
-    \extractcontextenvironement#1\@@
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\def\extractcontextenvironement#1#2\@@{%
-  \pgfmanualentryheadline{{\ttfamily\declare{\char`\\start#1}}#2}%
-  \pgfmanualentryheadline{{\ttfamily\ \ }\meta{environment contents}}%
-  \pgfmanualentryheadline{{\ttfamily\declare{\char`\\stop#1}}}%
-  \index{#1@\protect\texttt{#1} environment}%
-  \index{Environments!#1@\protect\texttt{#1}}}
-
-
-\newenvironment{shape}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Shape} {\ttfamily\declare{#1}}%
-    }%
-    \index{#1@\protect\texttt{#1} shape}%
-    \index{Shapes!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{pictype}[2]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Pic type} {\ttfamily\declare{#1}#2}%
-    }%
-    \index{#1@\protect\texttt{#1} pic type}%
-    \index{Pic Types!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{shading}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Shading} {\ttfamily\declare{#1}}}%
-    \index{#1@\protect\texttt{#1} shading}%
-    \index{Shadings!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-
-\newenvironment{graph}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Graph} {\ttfamily\declare{#1}}}%
-    \index{#1@\protect\texttt{#1} graph}%
-    \index{Graphs!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{gdalgorithm}[2]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Layout} {\ttfamily/graph drawing/\declare{#1}\opt{=}}\opt{\meta{options}}}%
-    \index{#1@\protect\texttt{#1} layout}%
-    \index{Layouts!#1@\protect\texttt{#1}}%
-    \foreach \algo in {#2}
-    {\edef\marshal{\noexpand\index{#2@\noexpand\protect\noexpand\texttt{#2} algorithm}}\marshal}%
-    \index{Graph drawing layouts!#1@\protect\texttt{#1}}
-    \item{\small alias {\ttfamily/tikz/#1}}\par
-    \item{\small alias {\ttfamily/tikz/graphs/#1}}\par
-    \item{\small Employs {\ttfamily algorithm=#2}}\par
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{dataformat}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Format} {\ttfamily\declare{#1}}}%
-    \index{#1@\protect\texttt{#1} format}%
-    \index{Formats!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{stylesheet}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Style sheet} {\ttfamily\declare{#1}}}%
-    \index{#1@\protect\texttt{#1} style sheet}%
-    \index{Style sheets!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{handler}[1]{
-  \begin{pgfmanualentry}
-    \extracthandler#1\@nil%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\def\gobble#1{}
-\def\extracthandler#1#2\@nil{%
-  \pgfmanualentryheadline{%
-    \pgfmanualpdflabel{/handlers/#1}{}%
-    \textbf{Key handler} \meta{key}{\ttfamily/\declare{#1}}#2}%
-  \index{\gobble#1@\protect\texttt{#1} handler}%
-  \index{Key handlers!#1@\protect\texttt{#1}}
-}
-
-
-\makeatletter
-
-
-\newenvironment{stylekey}[1]{
-  \begin{pgfmanualentry}
-    \def\extrakeytext{style, }
-    \extractkey#1\@nil%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\def\choicesep{$\vert$}%
-\def\choicearg#1{\texttt{#1}}
-
-\newif\iffirstchoice
-
-% \mchoice{choice1,choice2,choice3}
-\newcommand\mchoice[1]{%
-  \begingroup
-  \firstchoicetrue
-  \foreach \mchoice@ in {#1} {%
-    \iffirstchoice
-      \global\firstchoicefalse
-    \else
-      \choicesep
-    \fi
-    \choicearg{\mchoice@}%
-  }%
-  \endgroup
-}%
-
-% \begin{key}{/path/x=value}
-% \begin{key}{/path/x=value (initially XXX)}
-% \begin{key}{/path/x=value (default XXX)}
-\newenvironment{key}[1]{
-  \begin{pgfmanualentry}
-    \def\extrakeytext{}
-    %\def\altpath{\emph{\color{gray}or}}%
-    \extractkey#1\@nil%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-% \insertpathifneeded{a key}{/pgf} -> assign mykey={/pgf/a key}
-% \insertpathifneeded{/tikz/a key}{/pgf} -> assign mykey={/tikz/a key}
-%
-% #1: the key
-% #2: a default path (or empty)
-\def\insertpathifneeded#1#2{%
-  \def\insertpathifneeded@@{#2}%
-  \ifx\insertpathifneeded@@\empty
-    \def\mykey{#1}%
-  \else
-    \insertpathifneeded@#2\@nil
-    \ifpgfutil at in@
-      \def\mykey{#2/#1}%
-    \else
-      \def\mykey{#1}%
-    \fi
-  \fi
-}%
-\def\insertpathifneeded@#1#2\@nil{%
-  \def\insertpathifneeded@@{#1}%
-  \def\insertpathifneeded@@@{/}%
-  \ifx\insertpathifneeded@@\insertpathifneeded@@@
-    \pgfutil at in@true
-  \else
-    \pgfutil at in@false
-  \fi
-}%
-
-% \begin{keylist}[default path]
-%   {/path/option 1=value,/path/option 2=value2}
-% \end{keylist}
-\newenvironment{keylist}[2][]{%
-  \begin{pgfmanualentry}
-    \def\extrakeytext{}%
-  \foreach \xx in {#2} {%
-    \expandafter\insertpathifneeded\expandafter{\xx}{#1}%
-    \expandafter\extractkey\mykey\@nil%
-  }%
-  \pgfmanualbody
-}{%
-  \end{pgfmanualentry}
-}%
-
-\def\extractkey#1\@nil{%
-  \pgfutil at in@={#1}%
-  \ifpgfutil at in@%
-    \extractkeyequal#1\@nil
-  \else%
-    \pgfutil at in@{(initial}{#1}%
-    \ifpgfutil at in@%
-      \extractequalinitial#1\@nil%
-    \else
-      \pgfmanualentryheadline{%
-      \def\mykey{#1}%
-      \def\mypath{}%
-      \gdef\myname{}%
-      \firsttimetrue%
-      \pgfmanualdecomposecount=0\relax%
-      \decompose#1/\nil%
-        {\ttfamily\declare{#1}}\hfill(\extrakeytext no value)}%
-    \fi
-  \fi%
-}
-
-\def\extractkeyequal#1=#2\@nil{%
-  \pgfutil at in@{(default}{#2}%
-  \ifpgfutil at in@%
-    \extractdefault{#1}#2\@nil%
-  \else%
-    \pgfutil at in@{(initial}{#2}%
-    \ifpgfutil at in@%
-      \extractinitial{#1}#2\@nil%
-    \else
-      \pgfmanualentryheadline{%
-        \def\mykey{#1}%
-        \def\mypath{}%
-        \gdef\myname{}%
-        \firsttimetrue%
-        \pgfmanualdecomposecount=0\relax%
-        \decompose#1/\nil%
-        {\ttfamily\declare{#1}=}#2\hfill(\extrakeytext no default)}%
-    \fi%
-  \fi%
-}
-
-\def\extractdefault#1#2(default #3)\@nil{%
-  \pgfmanualentryheadline{%
-    \def\mykey{#1}%
-    \def\mypath{}%
-    \gdef\myname{}%
-    \firsttimetrue%
-    \pgfmanualdecomposecount=0\relax%
-    \decompose#1/\nil%
-    {\ttfamily\declare{#1}\opt{=}}\opt{#2}\hfill (\extrakeytext default {\ttfamily#3})}%
-}
-
-\def\extractinitial#1#2(initially #3)\@nil{%
-  \pgfmanualentryheadline{%
-    \def\mykey{#1}%
-    \def\mypath{}%
-    \gdef\myname{}%
-    \firsttimetrue%
-    \pgfmanualdecomposecount=0\relax%
-    \decompose#1/\nil%
-    {\ttfamily\declare{#1}=}#2\hfill (\extrakeytext no default, initially {\ttfamily#3})}%
-}
-
-\def\extractequalinitial#1 (initially #2)\@nil{%
-  \pgfmanualentryheadline{%
-    \def\mykey{#1}%
-    \def\mypath{}%
-    \gdef\myname{}%
-    \firsttimetrue%
-    \pgfmanualdecomposecount=0\relax%
-    \decompose#1/\nil%
-    {\ttfamily\declare{#1}}\hfill (\extrakeytext initially {\ttfamily#2})}%
-}
-
-% Introduces a key alias '/#1/<name of current key>'
-% to be used inside of \begin{key} ... \end{key}
-\def\keyalias#1{\vspace{-3pt}\item{\small alias {\ttfamily/#1/\myname}}\vspace{-2pt}\par
-  \pgfmanualpdflabel{/#1/\myname}{}%
-}
-
-\newif\iffirsttime
-\newcount\pgfmanualdecomposecount
-
-\makeatother
-
-\def\decompose/#1/#2\nil{%
-  \def\test{#2}%
-  \ifx\test\empty%
-    % aha.
-    \index{#1@\protect\texttt{#1} key}%
-    \index{\mypath#1@\protect\texttt{#1}}%
-    \gdef\myname{#1}%
-    \pgfmanualpdflabel{#1}{}
-  \else%
-    \advance\pgfmanualdecomposecount by1\relax%
-    \ifnum\pgfmanualdecomposecount>2\relax%
-      \decomposetoodeep#1/#2\nil%
-    \else%
-      \iffirsttime%
-        \begingroup%  
-          % also make a pdf link anchor with full key path.
-          \def\hyperlabelwithoutslash##1/\nil{%
-            \pgfmanualpdflabel{##1}{}%
-          }%
-          \hyperlabelwithoutslash/#1/#2\nil%
-        \endgroup%
-        \def\mypath{#1@\protect\texttt{/#1/}!}%
-        \firsttimefalse%
-      \else%
-        \expandafter\def\expandafter\mypath\expandafter{\mypath#1@\protect\texttt{#1/}!}%
-      \fi%
-      \def\firsttime{}%
-      \decompose/#2\nil%
-    \fi%
-  \fi%
-}
-
-\def\decomposetoodeep#1/#2/\nil{%
-  % avoid too-deep nesting in index
-  \index{#1/#2@\protect\texttt{#1/#2} key}%
-  \index{\mypath#1/#2@\protect\texttt{#1/#2}}%
-  \decomposefindlast/#1/#2/\nil%
-}
-\makeatletter
-\def\decomposefindlast/#1/#2\nil{%
-  \def\test{#2}%
-  \ifx\test\pgfutil at empty%
-    \gdef\myname{#1}%
-  \else%
-    \decomposefindlast/#2\nil%
-  \fi%
-}
-\makeatother
-\def\indexkey#1{%
-  \def\mypath{}%
-  \decompose#1/\nil%
-}
-
-\newenvironment{predefinedmethod}[1]{
-  \begin{pgfmanualentry}
-    \extractpredefinedmethod#1\@nil
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-\def\extractpredefinedmethod#1(#2)\@nil{%
-  \pgfmanualentryheadline{%
-    \pgfmanualpdflabel{#1}{}%
-    Method \declare{\ttfamily #1}\texttt(#2\texttt) \hfill(predefined for all classes)}
-  \index{#1@\protect\texttt{#1} method}%
-  \index{Methods!#1@\protect\texttt{#1}}
-}
-
-
-\newenvironment{ooclass}[1]{
-  \begin{pgfmanualentry}
-    \def\currentclass{#1}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Class} \declare{\texttt{#1}}}
-    \index{#1@\protect\texttt{#1} class}%
-    \index{Class #1 at Class \protect\texttt{#1}}%
-    \index{Classes!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{method}[1]{
-  \begin{pgfmanualentry}
-    \extractmethod#1\@nil
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-\def\extractmethod#1(#2)\@nil{%
-  \def\test{#1}
-  \ifx\test\currentclass
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      Constructor \declare{\ttfamily #1}\texttt(#2\texttt)}
-  \else
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      Method \declare{\ttfamily #1}\texttt(#2\texttt)}
-  \fi
-  \index{#1@\protect\texttt{#1} method}%
-  \index{Methods!#1@\protect\texttt{#1}}
-  \index{Class \currentclass!#1@\protect\texttt{#1}}%
-}
-
-\newenvironment{attribute}[1]{
-  \begin{pgfmanualentry}
-    \extractattribute#1\@nil
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-\def\extractattribute#1=#2;\@nil{%
-  \def\test{#2}%
-  \ifx\test\@empty
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      Private attribute \declare{\ttfamily #1} \hfill (initially empty)}
-  \else
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      Private attribute \declare{\ttfamily #1} \hfill (initially {\ttfamily #2})}
-  \fi
-  \index{#1@\protect\texttt{#1} attribute}%
-  \index{Attributes!#1@\protect\texttt{#1}}
-  \index{Class \currentclass!#1@\protect\texttt{#1}}%
-}
-
-
-
-\newenvironment{predefinednode}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Predefined node} {\ttfamily\declare{#1}}}%
-    \index{#1@\protect\texttt{#1} node}%
-    \index{Predefined node!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{coordinatesystem}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{Coordinate system} {\ttfamily\declare{#1}}}%
-    \index{#1@\protect\texttt{#1} coordinate system}%
-    \index{Coordinate systems!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{snake}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{\textbf{Snake} {\ttfamily\declare{#1}}}%
-    \index{#1@\protect\texttt{#1} snake}%
-    \index{Snakes!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{decoration}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{\textbf{Decoration} {\ttfamily\declare{#1}}}%
-    \index{#1@\protect\texttt{#1} decoration}%
-    \index{Decorations!#1@\protect\texttt{#1}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-
-\def\pgfmanualbar{\char`\|}
-\makeatletter
-\newenvironment{pathoperation}[3][]{
-  \begin{pgfmanualentry}
-    \def\pgfmanualtest{#1}%
-    \pgfmanualentryheadline{%
-      \ifx\pgfmanualtest\@empty%
-        \pgfmanualpdflabel{#2}{}%
-      \fi%
-      \textcolor{gray}{{\ttfamily\char`\\path}\
-        \ \dots}
-      \declare{\texttt{\noligs{#2}}}#3\ \textcolor{gray}{\dots\texttt{;}}}%
-    \ifx\pgfmanualtest\@empty%
-      \index{#2@\protect\texttt{#2} path operation}%
-      \index{Path operations!#2@\protect\texttt{#2}}%
-    \fi%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-\newenvironment{datavisualizationoperation}[3][]{
-  \begin{pgfmanualentry}
-    \def\pgfmanualtest{#1}%
-    \pgfmanualentryheadline{%
-      \ifx\pgfmanualtest\@empty%
-        \pgfmanualpdflabel{#2}{}%
-      \fi%
-      \textcolor{gray}{{\ttfamily\char`\\datavisualization}\
-        \ \dots}
-      \declare{\texttt{\noligs{#2}}}#3\ \textcolor{gray}{\dots\texttt{;}}}%
-    \ifx\pgfmanualtest\@empty%
-      \index{#2@\protect\texttt{#2} (data visualization)}%
-      \index{Data visualization!#2@\protect\texttt{#2}}%
-    \fi%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-\makeatother
-
-\def\doublebs{\texttt{\char`\\\char`\\}}
-
-
-\newenvironment{package}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      {\ttfamily\char`\\usepackage\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space  \LaTeX}}
-    \index{#1@\protect\texttt{#1} package}%
-    \index{Packages and files!#1@\protect\texttt{#1}}%
-    \pgfmanualentryheadline{{\ttfamily\char`\\input \declare{#1}.tex\space\space\space \char`\%\space\space  plain \TeX}}
-    \pgfmanualentryheadline{{\ttfamily\char`\\usemodule[\declare{#1}]\space\space \char`\%\space\space  Con\TeX t}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-
-\newenvironment{pgfmodule}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      {\ttfamily\char`\\usepgfmodule\char`\{\declare{#1}\char`\}\space\space\space
-        \char`\%\space\space  \LaTeX\space and plain \TeX\space and pure pgf}}
-    \index{#1@\protect\texttt{#1} module}%
-    \index{Modules!#1@\protect\texttt{#1}}%
-    \pgfmanualentryheadline{{\ttfamily\char`\\usepgfmodule[\declare{#1}]\space\space \char`\%\space\space  Con\TeX t\space and pure pgf}}
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{pgflibrary}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{\tikzname\ Library} \texttt{\declare{#1}}}
-    \index{#1@\protect\texttt{#1} library}%
-    \index{Libraries!#1@\protect\texttt{#1}}%
-    \vskip.25em%
-    {{\ttfamily\char`\\usepgflibrary\char`\{\declare{#1}\char`\}\space\space\space
-        \char`\%\space\space  \LaTeX\space and plain \TeX\space and pure pgf}}\\
-    {{\ttfamily\char`\\usepgflibrary[\declare{#1}]\space\space \char`\%\space\space  Con\TeX t\space and pure pgf}}\\
-    {{\ttfamily\char`\\usetikzlibrary\char`\{\declare{#1}\char`\}\space\space
-        \char`\%\space\space  \LaTeX\space and plain \TeX\space when using \tikzname}}\\
-    {{\ttfamily\char`\\usetikzlibrary[\declare{#1}]\space
-        \char`\%\space\space  Con\TeX t\space when using \tikzname}}\\[.5em]
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{purepgflibrary}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{{\small PGF} Library} \texttt{\declare{#1}}}
-    \index{#1@\protect\texttt{#1} library}%
-    \index{Libraries!#1@\protect\texttt{#1}}%
-    \vskip.25em%
-    {{\ttfamily\char`\\usepgflibrary\char`\{\declare{#1}\char`\}\space\space\space
-        \char`\%\space\space  \LaTeX\space and plain \TeX}}\\
-    {{\ttfamily\char`\\usepgflibrary[\declare{#1}]\space\space \char`\%\space\space  Con\TeX t}}\\[.5em]
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{tikzlibrary}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{%
-      \pgfmanualpdflabel{#1}{}%
-      \textbf{\tikzname\ Library} \texttt{\declare{#1}}}
-    \index{#1@\protect\texttt{#1} library}%
-    \index{Libraries!#1@\protect\texttt{#1}}%
-    \vskip.25em%
-    {{\ttfamily\char`\\usetikzlibrary\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space  \LaTeX\space and plain \TeX}}\\
-    {{\ttfamily\char`\\usetikzlibrary[\declare{#1}]\space \char`\%\space\space Con\TeX t}}\\[.5em]
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-
-
-\newenvironment{filedescription}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{File {\ttfamily\declare{#1}}}%
-    \index{#1@\protect\texttt{#1} file}%
-    \index{Packages and files!#1@\protect\texttt{#1}}%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-
-\newenvironment{packageoption}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{{\ttfamily\char`\\usepackage[\declare{#1}]\char`\{pgf\char`\}}}
-    \index{#1@\protect\texttt{#1} package option}%
-    \index{Package options for \textsc{pgf}!#1@\protect\texttt{#1}}%
-    \pgfmanualbody
-}
-{
-  \end{pgfmanualentry}
-}
-
-
-
-\newcommand\opt[1]{{\color{black!50!green}#1}}
-\newcommand\ooarg[1]{{\ttfamily[}\meta{#1}{\ttfamily]}}
-
-\def\opt{\afterassignment\pgfmanualopt\let\next=}
-\def\pgfmanualopt{\ifx\next\bgroup\bgroup\color{black!50!green}\else{\color{black!50!green}\next}\fi}
-
-
-
-\def\beamer{\textsc{beamer}}
-\def\pdf{\textsc{pdf}}
-\def\eps{\texttt{eps}}
-\def\pgfname{\textsc{pgf}}
-\def\tikzname{Ti\emph{k}Z}
-\def\pstricks{\textsc{pstricks}}
-\def\prosper{\textsc{prosper}}
-\def\seminar{\textsc{seminar}}
-\def\texpower{\textsc{texpower}}
-\def\foils{\textsc{foils}}
-
-{
-  \makeatletter
-  \global\let\myempty=\@empty
-  \global\let\mygobble=\@gobble
-  \catcode`\@=12
-  \gdef\getridofats#1@#2\relax{%
-    \def\getridtest{#2}%
-    \ifx\getridtest\myempty%
-      \expandafter\def\expandafter\strippedat\expandafter{\strippedat#1}
-    \else%
-      \expandafter\def\expandafter\strippedat\expandafter{\strippedat#1\protect\printanat}
-      \getridofats#2\relax%
-    \fi%
-  }
-
-  \gdef\removeats#1{%
-    \let\strippedat\myempty%
-    \edef\strippedtext{\stripcommand#1}%
-    \expandafter\getridofats\strippedtext @\relax%
-  }
-  
-  \gdef\stripcommand#1{\expandafter\mygobble\string#1}
-}
-
-\def\printanat{\char`\@}
-
-\def\declare{\afterassignment\pgfmanualdeclare\let\next=}
-\def\pgfmanualdeclare{\ifx\next\bgroup\bgroup\color{red!75!black}\else{\color{red!75!black}\next}\fi}
-
-
-\let\textoken=\command
-\let\endtextoken=\endcommand
-
-\def\myprintocmmand#1{\texttt{\char`\\#1}}
-
-\def\example{\par\smallskip\noindent\textit{Example: }}
-\def\themeauthor{\par\smallskip\noindent\textit{Theme author: }}
-
-
-\def\indexoption#1{%
-  \index{#1@\protect\texttt{#1} option}%
-  \index{Graphic options and styles!#1@\protect\texttt{#1}}%
-}
-
-\def\itemcalendaroption#1{\item \declare{\texttt{#1}}%
-  \index{#1@\protect\texttt{#1} date test}%
-  \index{Date tests!#1@\protect\texttt{#1}}%
-}
-
-
-
-\def\class#1{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}%
-\extractclass#1@\par\topsep=0pt}
-\def\endclass{\endlist}
-\def\extractclass#1#2@{%
-\item{{{\ttfamily\char`\\documentclass}#2{\ttfamily\char`\{\declare{#1}\char`\}}}}%
-  \index{#1@\protect\texttt{#1} class}%
-  \index{Classes!#1@\protect\texttt{#1}}}
-
-\def\partname{Part}
-
-\makeatletter
-\def\index at prologue{\section*{Index}\addcontentsline{toc}{section}{Index}
-  This index only contains automatically generated entries. A good
-  index should also contain carefully selected keywords. This index is
-  not a good index.
-  \bigskip
-}
-\c at IndexColumns=2
-  \def\theindex{\@restonecoltrue
-    \columnseprule \z@  \columnsep 29\p@
-    \twocolumn[\index at prologue]%
-       \parindent -30pt
-       \columnsep 15pt
-       \parskip 0pt plus 1pt
-       \leftskip 30pt
-       \rightskip 0pt plus 2cm
-       \small
-       \def\@idxitem{\par}%
-    \let\item\@idxitem \ignorespaces}
-  \def\endtheindex{\onecolumn}
-\def\noindexing{\let\index=\@gobble}
-
-
-\newenvironment{arrowtipsimple}[1]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{\textbf{Arrow Tip Kind} {\ttfamily#1}}
-    \index{#1@\protect\texttt{#1} arrow tip}%
-    \index{Arrow tips!#1@\protect\texttt{#1}}%
-    \def\currentarrowtype{#1}
-    \pgfmanualbody}
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{arrowtip}[4]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{\textbf{Arrow Tip Kind} {\ttfamily#1}}
-    \index{#1@\protect\texttt{#1} arrow tip}%
-    \index{Arrow tips!#1@\protect\texttt{#1}}%
-    \pgfmanualbody
-    \def\currentarrowtype{#1}
-    \begin{minipage}[t]{10.25cm}
-      #2
-    \end{minipage}\hskip5mm\begin{minipage}[t]{4.75cm}
-      \leavevmode\vskip-2em
-    \tikz{
-      \draw [black!50,line width=5mm,-{#1[#3,color=black]}] (-4,0) -- (0,0);
-      \foreach \action in {#4}
-      { \expandafter\processaction\action\relax }
-    }
-    \end{minipage}\par\smallskip
-  }
-{
-  \end{pgfmanualentry}
-}
-
-\newenvironment{arrowcap}[5]{
-  \begin{pgfmanualentry}
-    \pgfmanualentryheadline{\textbf{Arrow Tip Kind} {\ttfamily#1}}
-    \index{#1@\protect\texttt{#1} arrow tip}%
-    \index{Arrow tips!#1@\protect\texttt{#1}}%
-    \pgfmanualbody
-    \def\currentarrowtype{#1}
-    \begin{minipage}[t]{10.25cm}
-      #2
-    \end{minipage}\hskip5mm\begin{minipage}[t]{4.75cm}
-      \leavevmode\vskip-2em
-    \tikz{
-      \path [tips, line width=10mm,-{#1[#3,color=black]}] (-4,0) -- (0,0);
-      \draw [line width=10mm,black!50] (-3,0) -- (#5,0);
-      \foreach \action in {#4}
-      { \expandafter\processaction\action\relax }
-    }
-    \end{minipage}\par\smallskip
-  }
-{
-  \end{pgfmanualentry}
-}
-
-\def\processaction#1=#2\relax{
-  \expandafter\let\expandafter\pgf at temp\csname manual at action@#1\endcsname
-  \ifx\pgf at temp\relax\else
-    \pgf at temp#2/0/\relax
-  \fi
-}
-\def\manual at action@length#1/#2/#3\relax{%
-  \draw [red,|<->|,semithick,xshift=#2] ([yshift=4pt]current bounding
-  box.north -| -#1,0) coordinate (last length) -- node
-  [above=-2pt] {|length|} ++(#1,0);
-}
-\def\manual at action@width#1/#2/#3\relax{%
-  \draw [overlay, red,|<->|,semithick] (.5,-#1/2) -- node [below,sloped] {|width|} (.5,#1/2);
-}
-\def\manual at action@inset#1/#2/#3\relax{%
-  \draw [red,|<->|,semithick,xshift=#2] ([yshift=-4pt]current bounding
-  box.south -| last length) -- node [below] {|inset|} ++(#1,0);
-}
-
-\newenvironment{arrowexamples}
-{\begin{tabbing}
-    \hbox to \dimexpr\linewidth-5.5cm\relax{\emph{Appearance of the below at line width} \hfil} \= 
-     \hbox to 1.9cm{\emph{0.4pt}\hfil} \= \hbox to 2cm{\emph{0.8pt}\hfil} \= \emph{1.6pt} \\
-  }
-{\end{tabbing}\vskip-1em}
-
-\newenvironment{arrowcapexamples}
-{\begin{tabbing}
-    \hbox to \dimexpr\linewidth-5.5cm\relax{\emph{Appearance of the below at line width} \hfil} \= 
-     \hbox to 1.9cm{\emph{1ex}\hfil} \= \hbox to 2cm{\emph{1em}\hfil} \\
-  }
-{\end{tabbing}\vskip-1em}
-
-\def\arrowcapexample#1[#2]{\def\temp{#1}\ifx\temp\pgfutil at empty\arrowcapexample@\currentarrowtype[{#2}]\else\arrowcapexample@#1[{#2}]\fi}
-\def\arrowcapexample@#1[#2]{%
-  {\sfcode`\.1000\small\texttt{#1[#2]}} \>
-  \kern-.5ex\tikz [baseline,>={#1[#2]}] \draw [line
-  width=1ex,->] (0,.5ex) -- (2em,.5ex);  \>
-  \kern-.5em\tikz [baseline,>={#1[#2]}] \draw [line
-  width=1em,->] (0,.5ex) -- (2em,.5ex);  \\
-}
-
-\def\arrowexample#1[#2]{\def\temp{#1}\ifx\temp\pgfutil at empty\arrowexample@\currentarrowtype[{#2}]\else\arrowexample@#1[{#2}]\fi}
-\def\arrowexample@#1[#2]{%
-  {\sfcode`\.1000\small\texttt{#1[#2]}} \>
-  \tikz [baseline,>={#1[#2]}] \draw [line
-  width=0.4pt,->] (0,.5ex) -- (2em,.5ex); thin \>
-  \tikz [baseline,>={#1[#2]}] \draw [line
-  width=0.8pt,->] (0,.5ex) -- (2em,.5ex); \textbf{thick} \>
-  \tikz [baseline,>={#1[#2]}] \draw [line
-  width=1.6pt,->] (0,.5ex) -- (3em,.5ex); \\
-}
-\def\arrowexampledup[#1]{\arrowexample[{#1] \currentarrowtype[}]}
-\def\arrowexampledupdot[#1]{\arrowexample[{#1] . \currentarrowtype[}]}
-
-\def\arrowexampledouble#1[#2]{\def\temp{#1}\ifx\temp\pgfutil at empty\arrowexampledouble@\currentarrowtype[{#2}]\else\arrowexampledouble@#1[{#2}]\fi}
-\def\arrowexampledouble@#1[#2]{%
-  {\sfcode`\.1000\small\texttt{#1[#2]} on double line} \>
-  \tikz [baseline,>={#1[#2]}]
-    \draw [double equal sign distance,line width=0.4pt,->] (0,.5ex) -- (2em,.5ex); thin \>
-  \tikz [baseline,>={#1[#2]}]
-    \draw [double equal sign distance,line width=0.8pt,->] (0,.5ex) -- (2em,.5ex); \textbf{thick} \>
-  \tikz [baseline,>={#1[#2]}]
-    \draw [double equal sign distance, line width=1.6pt,->] (0,.5ex) -- (3em,.5ex); \\
-}
-
-
-
-\newcommand\symarrow[1]{%
-  \index{#1@\protect\texttt{#1} arrow tip}%
-  \index{Arrow tips!#1@\protect\texttt{#1}}%
-  \texttt{#1}& yields thick  
-  \begin{tikzpicture}[arrows={#1-#1},thick,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture} and thin
-  \begin{tikzpicture}[arrows={#1-#1},thin,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture}
-}
-\newcommand\symarrowdouble[1]{%
-  \index{#1@\protect\texttt{#1} arrow tip}%
-  \index{Arrow tips!#1@\protect\texttt{#1}}%
-  \texttt{#1}& yields thick  
-  \begin{tikzpicture}[arrows={#1-#1},thick,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture}
-  and thin
-  \begin{tikzpicture}[arrows={#1-#1},thin,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture}, double 
-  \begin{tikzpicture}[arrows={#1-#1},thick,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture} and 
-  \begin{tikzpicture}[arrows={#1-#1},thin,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture}
-}
-
-\newcommand\sarrow[2]{%
-  \index{#1@\protect\texttt{#1} arrow tip}%
-  \index{Arrow tips!#1@\protect\texttt{#1}}%
-  \index{#2@\protect\texttt{#2} arrow tip}%
-  \index{Arrow tips!#2@\protect\texttt{#2}}%
-  \texttt{#1-#2}& yields thick  
-  \begin{tikzpicture}[arrows={#1-#2},thick,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture} and thin
-  \begin{tikzpicture}[arrows={#1-#2},thin,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture}
-}
-
-\newcommand\sarrowdouble[2]{%
-  \index{#1@\protect\texttt{#1} arrow tip}%
-  \index{Arrow tips!#1@\protect\texttt{#1}}%
-  \index{#2@\protect\texttt{#2} arrow tip}%
-  \index{Arrow tips!#2@\protect\texttt{#2}}%
-  \texttt{#1-#2}& yields thick  
-  \begin{tikzpicture}[arrows={#1-#2},thick,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture} and thin
-  \begin{tikzpicture}[arrows={#1-#2},thin,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture}, double 
-  \begin{tikzpicture}[arrows={#1-#2},thick,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture} and 
-  \begin{tikzpicture}[arrows={#1-#2},thin,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
-    \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
-  \end{tikzpicture}
-}
-
-\newcommand\carrow[1]{%
-  \index{#1@\protect\texttt{#1} arrow tip}%
-  \index{Arrow tips!#1@\protect\texttt{#1}}%
-  \texttt{#1}& yields for line width 1ex
-  \begin{tikzpicture}[arrows={#1-#1},line width=1ex,baseline]
-    \useasboundingbox (-1mm,-0.5ex) rectangle (1.6cm,2ex);
-    \fill [black!15] (1.5cm,-.5ex) rectangle (1.6cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
-    \draw (0pt,.5ex) -- (1.5cm,.5ex);
-  \end{tikzpicture}
-}
-\def\myvbar{\char`\|}
-\newcommand\plotmarkentry[1]{%
-  \index{#1@\protect\texttt{#1} plot mark}%
-  \index{Plot marks!#1@\protect\texttt{#1}}
-  \texttt{\char`\\pgfuseplotmark\char`\{\declare{\noligs{#1}}\char`\}} &
-  \tikz\draw[color=black!25] plot[mark=#1,mark options={fill=examplefill,draw=black}] coordinates{(0,0) (.5,0.2) (1,0) (1.5,0.2)};\\
-}
-\newcommand\plotmarkentrytikz[1]{%
-  \index{#1@\protect\texttt{#1} plot mark}%
-  \index{Plot marks!#1@\protect\texttt{#1}}
-  \texttt{mark=\declare{\noligs{#1}}} & \tikz\draw[color=black!25]
-  plot[mark=#1,mark options={fill=examplefill,draw=black}] 
-    coordinates {(0,0) (.5,0.2) (1,0) (1.5,0.2)};\\
-}
-
-
-
-\ifx\scantokens\@undefined
-  \PackageError{pgfmanual-macros}{You need to use extended latex
-    (elatex) or (pdfelatex) to process this document}{}
-\fi
-
-\begingroup
-\catcode`|=0
-\catcode`[= 1
-\catcode`]=2
-\catcode`\{=12
-\catcode `\}=12
-\catcode`\\=12 |gdef|find at example#1\end{codeexample}[|endofcodeexample[#1]]
-|endgroup
-
-% define \returntospace.
-%
-% It should define NEWLINE as {}, spaces and tabs as \space.
-\begingroup
-\catcode`\^=7
-\catcode`\^^M=13
-\catcode`\^^I=13
-\catcode`\ =13%
-\gdef\returntospace{\catcode`\ =13\def {\space}\catcode`\^^I=13\def^^I{\space}}
-\gdef\showreturn{\show^^M}
-\endgroup
-
-\begingroup
-\catcode`\%=13
-\catcode`\^^M=13
-\gdef\commenthandler{\catcode`\%=13\def%{\@gobble at till@return}}
-\gdef\@gobble at till@return#1^^M{}
-\gdef\@gobble at till@return at ignore#1^^M{\ignorespaces}
-\gdef\typesetcomment{\catcode`\%=13\def%{\@typeset at till@return}}
-\gdef\@typeset at till@return#1^^M{{\def%{\char`\%}\textsl{\char`\%#1}}\par}
-\endgroup
-
-% Define tab-implementation functions
-%   \codeexample at tabinit@replacementchars@
-% and
-%   \codeexample at tabinit@catcode@
-%
-% They should ONLY be used in case that tab replacement is active.
-%
-% This here is merely a preparation step.
-%
-% Idea:
-% \codeexample at tabinit@catcode@ will make TAB active
-% and
-% \codeexample at tabinit@replacementchars@ will insert as many spaces as
-% /codeexample/tabsize contains.
-{
-\catcode`\^^I=13
-% ATTENTION: do NOT use tabs in these definitions!!
-\gdef\codeexample at tabinit@replacementchars@{%
- \begingroup
- \count0=\pgfkeysvalueof{/codeexample/tabsize}\relax
- \toks0={}%
- \loop
- \ifnum\count0>0
-  \advance\count0 by-1
-  \toks0=\expandafter{\the\toks0\ }%
- \repeat
- \xdef\codeexample at tabinit@replacementchars@@{\the\toks0}%
- \endgroup
- \let^^I=\codeexample at tabinit@replacementchars@@
-}%
-\gdef\codeexample at tabinit@catcode@{\catcode`\^^I=13}%
-}%
-
-% Called after any options have been set. It assigns
-%   \codeexample at tabinit@catcode
-% and
-%   \codeexample at tabinit@replacementchars
-% which are used inside of 
-%\begin{codeexample}
-% ...
-%\end{codeexample}
-%
-% \codeexample at tabinit@catcode  is either \relax or it makes tab
-% active.
-%
-% \codeexample at tabinit@replacementchars is either \relax or it inserts
-% a proper replacement sequence for tabs (as many spaces as
-% configured)
-\def\codeexample at tabinit{%
-  \ifnum\pgfkeysvalueof{/codeexample/tabsize}=0\relax
-    \let\codeexample at tabinit@replacementchars=\relax
-    \let\codeexample at tabinit@catcode=\relax
-  \else
-    \let\codeexample at tabinit@catcode=\codeexample at tabinit@catcode@
-    \let\codeexample at tabinit@replacementchars=\codeexample at tabinit@replacementchars@
-  \fi
-}
-
-\newif\ifpgfmanualtikzsyntaxhilighting
-
-\pgfqkeys{/codeexample}{%
-  width/.code=  {\setlength\codeexamplewidth{#1}},
-  graphic/.code=  {\colorlet{graphicbackground}{#1}},
-  code/.code=  {\colorlet{codebackground}{#1}},
-  execute code/.is if=code at execute,
-  code only/.code=  {\code at executefalse},
-  pre/.store in=\code at pre,
-  post/.store in=\code at post,
-  % #1 is the *complete* environment contents as it shall be
-  % typeset. In particular, the catcodes are NOT the normal ones.
-  typeset listing/.code=  {#1},
-  render instead/.store in=\code at render,
-  vbox/.code=  {\def\code at pre{\vbox\bgroup\setlength{\hsize}{\linewidth-6pt}}\def\code at post{\egroup}},
-  ignorespaces/.code=  {\let\@gobble at till@return=\@gobble at till@return at ignore},
-  leave comments/.code=  {\def\code at catcode@hook{\catcode`\%=12}\let\commenthandler=\relax\let\typesetcomment=\relax},
-  tabsize/.initial=0,% FIXME : this here is merely used for indentation. It is just a TAB REPLACEMENT.
-  every codeexample/.style={width=4cm+7pt, tikz syntax=true},
-  from file/.code={\codeexamplefromfiletrue\def\codeexamplesource{#1}},
-  tikz syntax/.is if=pgfmanualtikzsyntaxhilighting,
-}
-
-
-\newread\examplesource
-
-
-% Opening, reading and closing the results file
-
-\def\opensource#1{
-  \immediate\openin\examplesource=#1
-}
-\def\do at codeexamplefromfile{%
-  \immediate\openin\examplesource\expandafter{\codeexamplesource}%
-  \def\examplelines{}%
-  \readexamplelines
-  \closein\examplesource
-  \expandafter\endofcodeexample\expandafter{\examplelines}%
-}
-
-\def\readexamplelines{
-  \ifeof\examplesource%
-  \else
-    \immediate\read\examplesource to \exampleline
-    \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\examplelines\expandafter\expandafter\expandafter{\expandafter\examplelines\exampleline}
-    \expandafter\readexamplelines%
-  \fi
-}
-
-\let\code at pre\pgfutil at empty
-\let\code at post\pgfutil at empty
-\let\code at render\pgfutil at empty
-\def\code at catcode@hook{}
-
-\newif\ifcodeexamplefromfile
-\newdimen\codeexamplewidth
-\newif\ifcode at execute
-\newbox\codeexamplebox
-\def\codeexample[#1]{%
-  \begingroup%
-  \code at executetrue
-  \pgfqkeys{/codeexample}{every codeexample,#1}%
-  \pgfmanualswitchoncolors%
-  \ifcodeexamplefromfile\begingroup\fi
-  \codeexample at tabinit% assigns \codeexample at tabinit@[catcode,replacementchars]
-  \parindent0pt
-  \begingroup%
-  \par%
-  \medskip%
-  \let\do\@makeother%
-  \dospecials%
-  \obeylines%
-  \@vobeyspaces%
-  \catcode`\%=13%
-  \catcode`\^^M=13%
-  \code at catcode@hook%
-  \codeexample at tabinit@catcode
-  \relax%
-  \ifcodeexamplefromfile%
-    \expandafter\do at codeexamplefromfile%
-  \else%
-    \expandafter\find at example%
-  \fi}
-\def\endofcodeexample#1{%
-  \endgroup%
-  \ifcode at execute%
-    \setbox\codeexamplebox=\hbox{%
-      \ifx\code at render\pgfutil at empty%
-      {%
-        {%
-          \returntospace%
-          \commenthandler%
-          \xdef\code at temp{#1}% removes returns and comments
-        }%
-        \catcode`\^^M=9%
-        \colorbox{graphicbackground}{\color{black}\ignorespaces%
-          \code at pre\expandafter\scantokens\expandafter{\code at temp\ignorespaces}\code at post\ignorespaces}%
-      }%
-      \else%
-        \colorbox{graphicbackground}{\color{black}\ignorespaces%
-          \code at render}%
-      \fi%
-    }%
-    \ifdim\wd\codeexamplebox>\codeexamplewidth%
-      \def\code at start{\par}%
-      \def\code at flushstart{}\def\code at flushend{}%
-      \def\code at mid{\parskip2pt\par\noindent}%
-      \def\code at width{\linewidth-6pt}%
-      \def\code at end{}%
-    \else%
-      \def\code at start{%
-        \linewidth=\textwidth%
-        \parshape \@ne 0pt \linewidth
-        \leavevmode%
-        \hbox\bgroup}%
-      \def\code at flushstart{\hfill}%
-      \def\code at flushend{\hbox{}}%
-      \def\code at mid{\hskip6pt}%
-      \def\code at width{\linewidth-12pt-\codeexamplewidth}%
-      \def\code at end{\egroup}%
-    \fi%
-    \code at start%
-    \noindent%
-    \begin{minipage}[t]{\codeexamplewidth}\raggedright
-      \hrule width0pt%
-      \footnotesize\vskip-1em%
-      \code at flushstart\box\codeexamplebox\code at flushend%
-      \vskip-1ex
-      \leavevmode%
-    \end{minipage}%
-  \else%
-    \def\code at mid{\par}
-    \def\code at width{\linewidth-6pt}
-    \def\code at end{}
-  \fi%
-  \code at mid%  
-  \colorbox{codebackground}{%
-    \pgfkeysvalueof{/codeexample/prettyprint/base color}%
-    \begin{minipage}[t]{\code at width}%
-      {%
-        \let\do\@makeother
-        \dospecials
-        \frenchspacing\@vobeyspaces
-        \normalfont\ttfamily\footnotesize
-        \typesetcomment%
-        \codeexample at tabinit@replacementchars
-        \@tempswafalse
-        \def\par{%
-          \if at tempswa
-          \leavevmode \null \@@par\penalty\interlinepenalty
-          \else
-          \@tempswatrue
-          \ifhmode\@@par\penalty\interlinepenalty\fi
-          \fi}%
-        \obeylines
-        \everypar \expandafter{\the\everypar \unpenalty}%
-        \pgfkeysvalueof{/codeexample/typeset listing/. at cmd}{#1}\pgfeov
-      }
-    \end{minipage}}%
-  \code at end%
-  \par%
-  \medskip
-  \endcodeexample\endgroup
-}
-
-\def\endcodeexample{\endgroup}
-
-
-\makeatother
-
-\usepackage{pgfmanual}
-
-
-% autoxref is now always on
-
-% \makeatletter
-% % \pgfautoxrefs will be defined by 'make dist'
-% \pgfutil at ifundefined{pgfautoxrefs}{%
-%   \renewcommand\pgfmanualpdflabel[3][]{#3}% NO-OP
-%   \def\pgfmanualpdfref#1#2{#2}%
-%   \pgfkeys{
-%     /pdflinks/codeexample links=false,% DISABLED.
-%   }%
-% }{}
-% \makeatother
-
-\newdimen\pgfmanualcslinkpreskip
-
-% Styling of the pretty printer
-\pgfkeys{
-  /codeexample/syntax hilighting/.style={
-    /codeexample/prettyprint/key name/.code={\textcolor{keycolor}{\pgfmanualpdfref{##1}{\noligs{##1}}}},
-    /codeexample/prettyprint/key name with handler/.code 2 args={\textcolor{keycolor}{\pgfmanualpdfref{##1}{\noligs{##1}}}/\textcolor{blue!70!black}{\pgfmanualpdfref{/handlers/##2}{\noligs{##2}}}},
-    /codeexample/prettyprint/key value display only/.code={\textcolor{keycolor}{{\itshape{\let\pgfmanualwordstartup\relax\pgfmanualprettyprintcode{##1}}}}},
-    /codeexample/prettyprint/cs/.code={\textcolor{cscolor}{\pgfmanualcslinkpreskip4.25pt\pgfmanualpdfref{##1}{\noligs{##1}}}},
-    /codeexample/prettyprint/cs with args/.code 2 args={\textcolor{black}{\pgfmanualcslinkpreskip4.25pt\pgfmanualpdfref{##1}{\noligs{##1}}}\{\textcolor{black}{\pgfmanualprettyprintcode{##2}}\pgfmanualclosebrace},
-    /codeexample/prettyprint/cs arguments/pgfkeys/.initial=1,
-    /codeexample/prettyprint/cs/pgfkeys/.code 2 args={\textcolor{black}{\pgfmanualcslinkpreskip4.25pt\pgfmanualpdfref{##1}{\noligs{##1}}}\{\textcolor{black}{\pgfmanualprettyprintpgfkeys{##2}}\pgfmanualclosebrace},
-    /codeexample/prettyprint/cs arguments/begin/.initial=1,
-    /codeexample/prettyprint/cs/begin/.code 2 args={\textcolor{black}{##1}\{\textcolor{cscolor}{\pgfmanualpdfref{##2}{\noligs{##2}}}\pgfmanualclosebrace},
-    /codeexample/prettyprint/cs arguments/end/.initial=1,
-    /codeexample/prettyprint/cs/end/.code 2 args={\textcolor{black}{##1}\{\textcolor{cscolor}{\pgfmanualpdfref{##2}{\noligs{##2}}}\pgfmanualclosebrace},
-    /codeexample/prettyprint/word/.code={\pgfmanualwordstartup{\begingroup\pgfkeyssetvalue{/pdflinks/search key prefixes in}{}\pgfmanualpdfref{##1}{\noligs{##1}}\endgroup}},
-    /codeexample/prettyprint/point/.code={\textcolor{pointcolor}{\noligs{##1}}},%
-    /codeexample/prettyprint/point with cs/.code 2 args={\textcolor{pointcolor}{(\pgfmanualpdfref{##1}{\noligs{##1}}:\noligs{##2}}},%
-    /codeexample/prettyprint/comment font=\itshape,
-    /codeexample/prettyprint/base color/.initial=\color{basecolor},
-    /pdflinks/render hyperlink/.code={%
-      {\setbox0=\hbox{##1}%
-        \rlap{{\color{linkcolor}\dimen0\wd0\advance\dimen0by-\pgfmanualcslinkpreskip\hskip\pgfmanualcslinkpreskip\vrule width\dimen0 height-1pt depth1.6pt}}%
-        \box0%
-      }%
-    }
-  },/codeexample/syntax hilighting
-}
-
-\colorlet{keycolor}{black}
-\colorlet{cscolor}{black}
-\colorlet{pointcolor}{black}
-\colorlet{basecolor}{black}
-\colorlet{linkcolor}{black!8}
-
-\def\pgfmanualswitchoncolors{%
-  \colorlet{keycolor}{green!50!black}%
-  \colorlet{cscolor}{blue!70!black}
-  \colorlet{pointcolor}{violet}
-  \colorlet{basecolor}{black!55}
-  \colorlet{linkcolor}{white}
-}
-
-\makeatletter
-
-\def\pgfmanualwordstartup{\textcolor{black}}
-
-\def\noligs#1{\pgfmanualnoligs#1\kern0pt--\pgf at stop}%
-\def\pgfmanualnoligs#1--{%
-  \pgfutil at ifnextchar\pgf at stop{#1\pgfutil at gobble}{#1-\kern0pt-\kern0pt\pgfmanualnoligs}%
-}
-\makeatother
-
-
-%%% Local Variables: 
-%%% mode: latex
-%%% TeX-master: "beameruserguide"
-%%% End: 

Modified: trunk/Master/texmf-dist/doc/latex/tikz-ladder/tikz-ladder-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/tikz-ladder/tikz-ladder-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-ladder/tikz-ladder-doc.tex	2018-02-06 15:27:32 UTC (rev 46554)
+++ trunk/Master/texmf-dist/doc/latex/tikz-ladder/tikz-ladder-doc.tex	2018-02-06 23:59:08 UTC (rev 46555)
@@ -1,5 +1,6 @@
-%% This is file `tikz-ladder.tex'
-%% Version 1 of 10 January 2018
+%% This is file `tikz-ladder-doc.tex'
+%% Version: 1.1
+%% Version date: 2018-02-06
 %% 
 %% Copyright (C) 2018 by Luis Paulo Laus, laus at utfpr.edu.br
 %%
@@ -24,7 +25,6 @@
 \usepackage[pdfborder={0 0 0}]{hyperref}
 \usepackage[version=latest]{pgf}
 \usepackage{calc,listings,tikz}
-\usepackage{tikz}
 
 \usepackage{hyperref}
 \hypersetup{%
@@ -45,7 +45,8 @@
 \usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead]{geometry}
 \usepackage{amsmath,amssymb}
 \usepackage{xxcolor}
-\usepackage{pifont}
+%% \usepackage{pifont}
+%\usepackage{tgpagella} % no ligatures (test)
 \usepackage{makeidx}
 \usepackage{enumitem}
 \usepackage[T1]{fontenc}
@@ -91,8 +92,8 @@
 %
 % This file really starts here, all the above is for pgfmanual 
 % compatibility
-% \usetikzlibrary{ladder}
-\input ../tex/tikzlibraryladder.code
+% \usetikzlibrary{circuits.plc.ladder}
+\input ../tex/tikzlibrarycircuits.plc.ladder.code
 % some new lenghts
 \newlength{\ladderskip}
 \setlength{\ladderskip}{5\tikzcircuitssizeunit} % 5\tikzcircuitssizeunit = 35pt
@@ -104,7 +105,7 @@
 
 \title{Typesetting Ladder Diagrams with \LaTeX{} and \tikzname{}}
 \author{Luis Paulo Laus\\e-mail: \texttt{laus at utfpr.edu.br}}
-\date{Version 1 of 10 January 2018}
+\date{Version: 1.1, Version date: 2018-02-06}
 
 \maketitle
 
@@ -128,7 +129,7 @@
 and it is probably not what you want. With this package, you can produce something like\footnote{This slightly awkward example was extracted from~[IEC-61\,131-3/2013, p. 218]; and explained by: ``In the rung shown above, the value of the Boolean output $a$ is always |TRUE|, while the value of outputs $c$, $d$ and $e$ upon completion of an evaluation of the rung is equal to the value of the input $b$.''. In 2013 version there is typo: the $a$ is missing. The 2003 version is correct.}:
 
 \begin{center}
-\begin{tikzpicture} [ladder,thick,x=\ladderskip,y=\ladderskip]
+\begin{tikzpicture} [circuit plc ladder,thick,x=\ladderskip,y=\ladderskip]
   \draw(0,0)
     to [coil={info={$a$}}] ++(1,0)
     to [contact NO={info={$b$}}] ++(1,0) coordinate(node1)
@@ -146,12 +147,12 @@
 
 \section{Ladder Diagram Library}
 
-\begin{pgflibrary}{ladder}
-This library provides graphics for ladder diagram related to programable controllers (PLC) and according to the international standard IEC-61\,131-3. The library was written to extend the standard \tikzname\ circuit library. The reader is urged to read the Section~``Circuit Libraries'' of \tikzname\ manual.
+\begin{pgflibrary}{circuits.plc.ladder}
+This library provides graphics for ladder diagram related to programable controllers (PLC) and according to the international standard IEC-61\,131-3. The library was written to extend the standard \tikzname-library |circuit|. The reader is urged to read the Section~``Circuit Libraries'' of \tikzname\ manual.
 This library defines the following key:
 
-\begin{key}{/tikz/ladder}
-This style calls |ladder| and installs ladder diagram graphics for symbols like contacts, coils and blocks.
+\begin{key}{/tikz/circuit plc ladder}
+This style calls |circuit plc ladder| and installs ladder diagram graphics for symbols like contacts, coils and blocks.
 \end{key}
 In the next sections a description of the library features is provided.
 \end{pgflibrary}
@@ -161,7 +162,7 @@
 A contact is an element which imparts a state to the horizontal link on its right side which is equal to the Boolean |AND| of the state of the horizontal link at its left side with an appropriate function of an associated Boolean input, output, or memory variable. A contact does not modify the value of the associated Boolean variable.
 
 \begin{codeexample}[]
-\begin{tikzpicture}[ladder]
+\begin{tikzpicture}[circuit plc ladder]
   \node[name=s, shape=contact ladder, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=6cm]{};
 \foreach \anchor/\placement in {center/above, 30/above right, north/above, south/below, east/left, 
  west/right, north east/above, south east/below, south west/below, north west/above,input/left,output/right}
@@ -172,44 +173,51 @@
 All kinds of standardized contacts can be represented: normally open contact (NO); normally closed contact (NC); positive transition-sensing contact (P); negative transition-sensing contact (N); compare contacts both typed and overloaded (for typesetting purposes it makes no difference.) In the following examples, the Boolean variable associated with the contact is indicated by ``***''.
 
 Normally open contact (NO):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [contact NO={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [contact NO={info={***}}] ++(2,0);
 \end{codeexample}
 
 Normally closed contact (NC):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [contact NC={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [contact NC={info={***}}] ++(2,0);
 \end{codeexample}
 
 Variation of normally closed contact (NC):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [var contact NC={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [var contact NC={info={***}}] ++(2,0);
 \end{codeexample}
 
 Positive transition-sensing contact (P):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [contact P={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [contact P={info={***}}] ++(2,0);
 \end{codeexample}
 
 Negative transition-sensing contact (N):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [contact N={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [contact N={info={***}}] ++(2,0);
 \end{codeexample}
 
 Compare contact (typed):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [contact NO={
-  info={\scriptsize intvalue1},
-  info'={\scriptsize intvalue2},
-  symbol={\tiny$\genfrac{}{}{0pt}{}{>}{\text{Int}}$}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+ \draw(0,0) to [contact NO={
+   info={\scriptsize intvalue1},
+   info'={\scriptsize intvalue2},
+   symbol={\tiny$\genfrac{}{}{0pt}{}{>}{\text{Int}}$}}] ++(2,0);
 \end{codeexample}
 
 Compare contact (overloaded):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [contact NO={
-  info={\scriptsize value1},
-  info'={\scriptsize value2},
-  symbol={\tiny$\genfrac{}{}{0pt}{}{<>}{}$}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [contact NO={
+    info={\scriptsize value1},
+    info'={\scriptsize value2},
+    symbol={\tiny$\genfrac{}{}{0pt}{}{<>}{}$}}] ++(2,0);
 \end{codeexample}
 
 There are two possibilities for normally closed contact. It is not recommended to mix them in the same document unless to explain their equivalence.
@@ -216,7 +224,7 @@
 
 \subsection{Keys for contacts}
 
-The most common key used with contacts is |info| which sets the variable name associated with the contacts. One may also need |info'| and |name|; all standard keys. In addition to the keys described in Section~''Circuit Libraries'' of ``The TikZ and PGF Packages -- Manual for version 3.0.1a'', contacts accept:
+The most common key used with contacts is |info| which sets the variable name associated with the contacts. One may also need |info'| and |name|; both standard keys. In addition to the keys described in Section~''Circuit Libraries'' of ``The TikZ and PGF Packages -- Manual for version 3.0.1a'', contacts accept:
 \begin{key}{/tikz/symbol=\meta{name}}
 This key sets the information, usually a single letter or comparison symbol, that will appear between the vertical lines. Usable for drawing compare contacts.
 \end{key}
@@ -227,8 +235,8 @@
 A coil copies the state of the link on its left to the link on its right without modification, and stores an appropriate function of the state or transition of the left link into the associated Boolean variable. 
 
 \begin{codeexample}[]
-\begin{tikzpicture}[ladder]
-  \node[name=s, shape=coil ladder, shape example, fill=none, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=6cm]{};
+\begin{tikzpicture}[circuit plc ladder]
+  \node[name=s, shape=coil ladder, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=6cm]{};
 \foreach \anchor/\placement in {center/above, 30/above right, north/above, south/below, east/left, 
  west/right, north east/above, south east/below, south west/below, north west/above,input/left,output/right}
   \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(s.\anchor)}};
@@ -244,9 +252,10 @@
 \end{codeexample}
 The |coil ladder curvature| controls how round the coils look like. The default value is 0.2 as indicated above; 0.5 makes a round coil like\footnote{It can be used to draw relay coils according to NEMA -- National Electrical Manufacturers Association.}:
 
-\begin{codeexample}[]
-\tikz[ladder,thick]
-  \draw(0,0) to [coil R={info={Motor},coil ladder curvature=0.5,
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil R={info={Motor},
+     coil ladder curvature=0.5,
      minimum size=2.4\tikzcircuitssizeunit}] ++(2,0);
 \end{codeexample}
 
@@ -261,38 +270,45 @@
 All kind of standardized coils are supported: coil (normal); negated coil (normally activated, NA); set (latch) coil; reset (unlatch) coil; positive transition-sensing coil; and negative transition-sensing coil. In the following examples, the Boolean variable associated with the coil is indicated by ``***''.
 
 Coil (normally deactivated):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil={info={***}}] ++(2,0);
 \end{codeexample}
 
 Negated coil (normally activated, NA):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil NA={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil NA={info={***}}] ++(2,0);
 \end{codeexample}
 
 Variation of negated coil (normally activated, NA):
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [var coil NA={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [var coil NA={info={***}}] ++(2,0);
 \end{codeexample}
 
 Set (latch) coil:
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil S={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil S={info={***}}] ++(2,0);
 \end{codeexample}
 
 Reset (unlatch) coil:
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil R={info={***}}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil R={info={***}}] ++(2,0);
 \end{codeexample}
 
 Positive transition-sensing coil:
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil={info={***},symbol=P}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil={info={***},symbol=P}] ++(2,0);
 \end{codeexample}
 
 Negative transition-sensing coil:
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil={info={***},symbol=N}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil={info={***},symbol=N}] ++(2,0);
 \end{codeexample}
 
 Note that positive and negative transition-sensing coils are not supported directly because, to be honest, no one uses them. Their symbols have to be coined using a normal coil and the parameter |symbol|.
@@ -299,12 +315,13 @@
 
 There are two possibilities for negated coil (NA). It is not recommended to mix them in the same document unless to explain their equivalence.
 
-It is possible, though not recommend because it disagrees with IEC-61\,131-3, to used non-standard coils, e.g., some people uses L (for latch) and U (for unlatch) instead of, S and U, respectively. This is achieved by changing the |symbol| of a |coil| like:
+It is possible, though not recommend because it disagrees with IEC-61\,131-3, to use non-standard coils, e.g., some people uses L (for latch) and U (for unlatch) instead of, S and U, respectively. This is achieved by setting the |symbol| of a |coil| like:
 
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil={info={***},symbol=L}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil={info={***},symbol=L}] ++(2,0);
 \end{codeexample}
-The same trick used for positive and negative transition-sensing coils.
+\noindent{}The same trick used for positive and negative transition-sensing coils.
 
 
 \subsection{Keys for coils}
@@ -312,20 +329,23 @@
 The most common key used with coils is |info| which sets the variable name associated with the coil. One may also need |info'|, |name| and |minimum size|; all standard keys. In addition to the keys described in Section~``Circuit Libraries'' of ``The TikZ and PGF Packages -- Manual for version 3.0.1a'', coils accept: 
 \begin{key}{/tikz/symbol=\meta{name}}
 This key sets the information, usually a single letter, that will appear between the parenthesis. Usable for non-standard or rarely used coils lake positive and negative transition-sensing coils.
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil={info={***},symbol=L}] ++(2,0);
+\begin{codeexample}[width=2.3cm]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil={info={***},symbol=L}] ++(2,0);
 \end{codeexample}
 \end{key}
 
-\begin{key}{/tikz/coil ladder curvature=\meta{curvature index} (initially 0.5)}
+\begin{key}{/tikz/coil ladder curvature=\meta{curvature index} (initially 0.2)}
 This key sets the curvature index, a number between 0.001 and 0.5 (in practice, though higher values are permitted) that defined how much the parentheses will be bent. It is the fraction of the total coil width occupied by one parenthesis. Usable for drawing electric coils in NEMA standard. In this case, |minimum size| will have to adjusted in order to correct the coil aspect ratio.
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil={info={***},
-  coil ladder curvature=0.1}] ++(2,0);
+\begin{codeexample}[width=2.3cm,leave comments]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil={info={\%Q0.0},
+    coil ladder curvature=0.1}] ++(2,0);
 \end{codeexample}
-\begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [coil={info={***},
-  coil ladder curvature=0.3}] ++(2,0);
+\begin{codeexample}[width=2.3cm,leave comments]
+\tikz[circuit plc ladder,thick]
+  \draw(0,0) to [coil={info={\%Q0.0},
+    coil ladder curvature=0.3}] ++(2,0);
 \end{codeexample}
 \end{key}
 
@@ -332,17 +352,18 @@
 
 \section{Blocks}
 
-Blocks are used to represent all other features besides contacts and coils, namely functions and function blocks, manly: timers, counters, communication, string treatment, arithmetic and logical operations. Blocks can have many inputs and outputs. The first input and output shall be aligned with the rung line. This is done automatically and explains why the |center| anchor is not on the centre of the rectangle. For the exact rectangle centre use the |text| or |base| anchor\footnote{I am not happy with this and it might be change in the future.}.
+Blocks are used to represent all other features besides contacts and coils, namely functions and function blocks, mainly: timers, counters, communication, string treatment, arithmetic and logical operations. Blocks can have many inputs and outputs. The first input and output shall be aligned with the rung line. This is done automatically and explains why the |center| anchor is not on the centre of the rectangle. For the exact rectangle centre use the |block center| anchor.
 
 Next, a block for a counter is represented with the anchors, you can see the input |>A| causes a clock input indication and the symbol |>| itself is gobbled. The input and output names are not accordingly to the standard IEC-61\,131-3.
 
 \begin{codeexample}[]
-\begin{tikzpicture}[ladder]
+\Huge
+\begin{tikzpicture}[circuit plc ladder]
   \node[name=s, shape=block ladder, shape example, minimum width=8cm, minimum height=8cm, inner xsep=1cm,
    inner ysep=1cm, input sep=2cm, output sep=4cm, inputs={>A,B,C}, clksize=2cm,  outputs={X,Y}, symbol
-   color=black!30, symbol={\textcolor{red}{CTU}}] {block \vrule width1pt height1.5cm};
-  \foreach \anchor/\placement in {center/below, text/above left, 0/left, 30/above right, 60/above,
-   270/above, 300/above, mid/above right, mid east/above right, mid west/above left, base/below right,
+   color=black!30, symbol={\textcolor{red}{SYMBOL}}] {block \vrule width1pt height2cm};
+  \foreach \anchor/\placement in {center/right, block center/above,text/left, 0/left, 15/above right, 60/above,
+   270/above, 300/above, mid/above, mid east/right, mid west/left, base/below,
    base east/below right, base west/left, north/above, south/below, east/left, west/right,
    north east/above right, south east/below, south west/below, north west/above, input 1/left,
    input 2/left, input 3/left, output 1/right, output 2/right}
@@ -354,7 +375,7 @@
 
 \subsection{Keys for blocks}
 
-The three most common keys used with blocks are |symbol| which sets the block type, |name| which sets a \tikzname\ label to be used in future references, particularly to access the inputs and outputs, and |info| which sets the variable name associated with the POU represented by the block. One may also need |info'| and |minimum width|; all standard keys. In addition to the keys described in Section~``Circuit Libraries'' of ``The TikZ and PGF Packages -- Manual for version 3.0.1a'', blocks accept: 
+The three most common keys used with blocks are |symbol| which sets the block type, |name| which sets a \tikzname\ label to be used in future references, particularly to access the inputs and outputs, and |info| which sets the variable name associated with the POU (program organization unit) represented by the block. One may also need |info'| and |minimum width|; all standard keys. In addition to the keys described in Section~``Circuit Libraries'' of ``The TikZ and PGF Packages -- Manual for version 3.0.1a'', blocks accept: 
 \begin{key}{/tikz/symbol=\meta{name}}
 This key sets the information that appears inside the block rectangle, on the top. It specifies the POU type represented by the block.
 \end{key}
@@ -364,7 +385,7 @@
 \begin{codeexample}[width=4.4cm]
 \newsavebox{\myeqbox} % only once, preferable in the document preamble
 \savebox{\myeqbox}{\textcolor{blue}{Q}}
-\tikz[ladder,thick] \draw[orange](0,0) to [block={violet,
+\tikz[circuit plc ladder,thick] \draw[orange](0,0) to [block={violet,
    info={[blue]$CT1$},inputs={>CU,R,PV}, outputs={\usebox{\myeqbox},CV},
    symbol=CTU\_SINT, symbol color=red, minimum width=2.4cm}] ++(4,0);
 \end{codeexample}
@@ -374,7 +395,7 @@
 \begin{key}{/tikz/clksize=\meta{width} (initially 0.8\\|tikzcircuitssizeunit|)}
 This key sets the size for the clock input indicator (|>|).
 \begin{codeexample}[]
-\tikz[ladder,thick] \draw(0,0) to [block={
+\tikz[circuit plc ladder,thick] \draw(0,0) to [block={
    info=$CT1$,inputs={>$CU$,R,PV}, outputs={Q,CV},
    symbol=CTU\_SINT, clksize=0.4cm,
    minimum width=2.4cm}]  ++(4,0);
@@ -384,7 +405,7 @@
 \begin{key}{/tikz/input sep=\meta{width} (initially 1.6\\|tikzcircuitssizeunit|)}
 This key sets the vertical distance between two consecutive inputs.
 \begin{codeexample}[width=5.3cm]
-\begin{tikzpicture}[ladder,thick]
+\begin{tikzpicture}[circuit plc ladder,thick]
   \draw(0,0) to [contact NO={info={$I1$}}] ++(1,0)
      to [block={info=$TM1$,symbol=TON,
        inputs={EN,IN,PT},outputs={ENO,Q,ET},
@@ -415,7 +436,7 @@
 The standard IEC-61\,131-3 specifies three timers as follows:
 
 \noindent{}On-delay:
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={IN,PT},outputs={Q,ET},
    symbol=TON,minimum width=18mm] (tp1) {};
 \draw (tp1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -425,7 +446,7 @@
 \end{codeexample}
 
 \noindent{}Off-delay:
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={IN,PT},outputs={Q,ET},
    symbol=TOF,minimum width=18mm] (tp1) {};
 \draw (tp1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -435,7 +456,7 @@
 \end{codeexample}
 
 \noindent{}Pulse:
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={IN,PT},outputs={Q,ET},
    symbol=TP,minimum width=18mm] (tp1) {};
 \draw (tp1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -450,7 +471,7 @@
 The standard IEC-61\,131-3 specifies three counters. In the following examples, the symbol ``*'' indicates the numerical type of the counter (like |INT|, |DINT|, etc.).
 
 \noindent{}Up-Counter:
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={>CU,R,PV},outputs={Q,CV},
    symbol=CTU\_*,minimum width=20mm] (ct1) {};
 \draw (ct1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -461,7 +482,7 @@
 \end{codeexample}
 
 \noindent{}Down-counters:
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={>CD,LD,PV},outputs={Q,CV},
    symbol=CTD\_*,minimum width=20mm] (ct1) {};
 \draw (ct1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -472,7 +493,7 @@
 \end{codeexample}
 
 \noindent{}Up-down counters:
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={>CU,>CD,R,LD,PV},outputs={QU,QD,CV},
      symbol=CTUD\_*,minimum width=20mm] (ct1) {};
 \draw (ct1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -488,7 +509,7 @@
 \subsection{Standard bistable function blocks}
 
 Bistable function block (set dominant): |RS(S1,R, Q1)|
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={S1,R},outputs={Q1},
    symbol=SR,minimum width=18mm] (sr1) {};
 \draw (sr1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -497,7 +518,7 @@
 \end{codeexample}
 
 \noindent{}Bistable function block (set dominant) with long input names: |RS(SET1,RESET, Q1)|
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={SET1,RESET},outputs={Q1},
    symbol=SR,minimum width=18mm] (sr1) {};
 \draw (sr1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -506,7 +527,7 @@
 \end{codeexample}
 
 \noindent{}Bistable function block (reset dominant): |RS(S,R1, Q1)|
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={S,R1},outputs={Q1},
    symbol=SR,minimum width=18mm] (sr1) {};
 \draw (sr1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -515,7 +536,7 @@
 \end{codeexample}
 
 \noindent{}Bistable function block (reset dominant) with long input names\footnote{Here we have a clear inconsistency between the text description that presents the input |RESET1| and graphical representation where it is |R1|. It is probably just a typo, but the form presented in~[IEC-61\,131-3/2013, p. 112] was kept unchanged.}: |RS(SET,RESET1, Q1)|
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={SET,R1},outputs={Q1},
    symbol=SR,minimum width=18mm] (sr1) {};
 \draw (sr1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -527,7 +548,7 @@
 \subsection{Standard edge detection function blocks}
 
 Rising edge detector: |R_TRIG(CLK, Q)|
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={CLK},outputs={Q},
    symbol=R\_TRIG,minimum width=20mm] (ed1) {};
 \draw (ed1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -535,7 +556,7 @@
 \end{codeexample}
 
 \noindent{}Falling edge detector: |F_TRIG(CLK, Q)|
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
 \node[block,inputs={CLK},outputs={Q},
    symbol=F\_TRIG,minimum width=20mm] (ed1) {};
 \draw (ed1.input 1) -- +(-5mm,0) node[left]{BOOL}
@@ -547,8 +568,8 @@
 
 A call is used to execute a function, a function block instance, or a method of a function block or class. They are represented by blocks.
 
-The proper map for in-out variables (|VAR_IN_OUT|) need special care. This map is represented by a line internal to the block connecting the left and right side of the in-out variable. The problem is that |tikz-ladder| only creates anchors at the left side of the inputs and right side of outputs. We need the opposite. This situation can be overcome in either two ways: using |calc| library to add and subtract a suitable distance to/from the standard anchors; creating two coordinates related to the input and output anchors but dislocated a suitable amount towards the interior of the block. Using |calc| library, one examples is:
-\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[ladder,thick]},post=\end{tikzpicture}]
+The proper map for in-out variables (|VAR_IN_OUT|) needs special care. This map is represented by a line internal to the block connecting the left and right side of the in-out variable. The problem is that |tikz-ladder| only creates anchors at the left side of the inputs and right side of outputs. We need the opposite. This situation can be overcome in either two ways: using |calc| library to add and subtract a suitable distance to/from the standard anchors; creating two coordinates related to the input and output anchors but dislocated a suitable amount towards the interior of the block. Using |calc| library, one examples is:
+\begin{codeexample}[width=6cm,pre={\begin{tikzpicture}[circuit plc ladder,thick]},post=\end{tikzpicture}]
   \draw(0,0)
     to [contact NO={info={cond}}]  ++(1,0)
     to [block={inputs={EN,A,C},outputs={ENO,B,C},
@@ -568,13 +589,15 @@
   \coordinate[xshift=1em] (p1) at (mf1.input 3);
   \coordinate[xshift=-1em] (p2) at (mf1.output 3);
 \end{codeexample}
-\noindent{}between the two |\draw| commands and replace de last code line by |(p1) -- (p2);|.
+\noindent{}between the two |\draw| commands and replace de last code line by \verb|(p1) -- (p2);|.
 
 
-\section{Design Guidance}
+\section{Design Guidance\label{guidance}}
 This section brings some recommendations that reflect the way I produce ladder diagrams. It may or may not work for you. Feel free to e-mail me if you have better ideas.
 
-The first to consider is that |tikz-ladder| uses the |\tikzcircuitssizeunit| to keep all figures proportional. Therefore, when you consider any dimension related to symbol size it is good idea to set that dimension in respect to |\tikzcircuitssizeunit|, i.e., using |\tikzcircuitssizeunit| as the length unit\footnote{Therefore, all the examples in the previous sections should be reviewed.}. The default value of |\tikzcircuitssizeunit| is 7\,pt or approximately 2.46\,mm and it can be set by the |circuit symbol unit| key among several other keys. Even better, you can establish your own length unit and set $x$ and $y$ to that length unit. In this way you will be working on a grid; if it is too big or too small you will have to change a single declaration. The |\tikzcircuitssizeunit| is too small for that purpose, so I use and recommend |5\tikzcircuitssizeunit| instead. Moreover, I like to leave a small space between rungs, so a second new length can be used to keep this amount. Again, you can adjust it globally. Thus, just after loading the |tikz-ladder| library I use to declare:
+The first thing to consider is that, as the manual says, ``\tikzname\ \emph{ist kein Zeichenprogramm}'' which translates to ``\tikzname\ \emph{is not a drawing program}''. You shall start with a draft of you diagram and then codify it using \tikzname. Generally, a handmade pencil sketch will do. In this draft, you shall use node names for future reference.
+
+The second thing to consider is that |tikz-ladder| uses the |\tikzcircuitssizeunit| to keep all figures proportional. Therefore, when you consider any dimension related to symbol size it is good idea to set that dimension in respect to |\tikzcircuitssizeunit|, i.e., using |\tikzcircuitssizeunit| as the length unit\footnote{Therefore, all the examples in the previous sections should be reviewed.}. The default value of |\tikzcircuitssizeunit| is 7\,pt or approximately 2.46\,mm and it can be set by the |circuit symbol unit| key among several other keys. Even better, you can establish your own length unit and set $x$ and $y$ to that length unit. In this way you will be working on a grid; if it is too big or too small you will have to change a single declaration. The |\tikzcircuitssizeunit| is too small for that purpose, so I use and recommend |5\tikzcircuitssizeunit| instead. Moreover, I like to leave a small space between rungs, so a second new length can be used to keep this amount. Again, you can adjust it globally. Thus, just after loading the |tikz-ladder| library I use to declare:
 \begin{codeexample}[code only]
 \newlength{\ladderskip}
 \setlength{\ladderskip}{5\tikzcircuitssizeunit} % 5\tikzcircuitssizeunit = 35pt
@@ -591,10 +614,10 @@
 
 To keeps track of a few rows in a rung is easy, but to place manually everything in the diagram is not. So, I devised a strategy: draw one rung at a time and move the datum (reset the origin) at the end of every rung, thus I can start fresh another rung. This is done by macro |\ladderrungend| which resets the vertical reference to a vertical position $n$ rows below the current position (plus some inter rung space). The macro also serves to \emph{mark} rung end in the code (\tikzname\ ``program'') that generates the diagram making it more readable.
 
-The options passed to the \tikzname\ environment in the next example are |[ladder,thick,x=\ladderskip,y=\ladderskip]| meaning it is a ladder diagram and $x$ and $y$ length unit are both set to |1\ladderskip|.
+The options passed to the \tikzname\ environment in the next example are \verb|[circuit plc ladder,thick,| \verb|x=\ladderskip, y=\ladderskip]| meaning it is a ladder diagram and $x$ and $y$ length unit are both set to |1\ladderskip|.
 
 \begin{codeexample}[]
-\begin{tikzpicture} [ladder,thick,x=\ladderskip,y=\ladderskip]
+\begin{tikzpicture} [circuit plc ladder,thick,x=\ladderskip,y=\ladderskip]
   \draw(0,0)
     to [contact NO={info={E}}]  ++(1,0) --++(1,0)
     to [block={inputs={IN,PT},outputs={Q,ET},symbol=TOF,name=tp1,
@@ -605,20 +628,20 @@
         (tp1.input 2) -- +(-0.3\ladderskip,0) node[left]{T\#3s};
 \ladderrungend{1.2}
   \draw(0,0)
-    to [contact NO={info={$I$}}] ++(1,0)
-    to [contact NC={info={$M$}}] ++(1,0) coordinate(laddercoil) -- ++(2,0)
-    to [coil={info={$Q$}}] ++(1,0);
+    to [contact NO={info={I}}] ++(1,0)
+    to [contact NC={info={M}}] ++(1,0) coordinate(laddercoil) -- ++(2,0)
+    to [coil={info={Q}}] ++(1,0);
   \draw(0,-1)
-    to [contact NC={info={$I$}}] ++(1,0)
-    to [contact NO={info={$Q$}}] ++(1,0) -- (laddercoil);
+    to [contact NC={info={I}}] ++(1,0)
+    to [contact NO={info={Q}}] ++(1,0) -- (laddercoil);
 \ladderrungend{2}
   \draw(0,0)
-    to [contact NO={info={$I$}}] ++(1,0)
-    to [contact NO={info={$M$}}] ++(1,0) coordinate(laddercoil) -- ++(2,0)
-    to [coil={info={$M$}}] ++(1,0);
+    to [contact NO={info={I}}] ++(1,0)
+    to [contact NO={info={M}}] ++(1,0) coordinate(laddercoil) -- ++(2,0)
+    to [coil={info={M}}] ++(1,0);
   \draw(0,-1)
-    to [contact NC={info={$I$}}] ++(1,0)
-    to [contact NO={info={$Q$}}] ++(1,0) -- (laddercoil);
+    to [contact NC={info={I}}] ++(1,0)
+    to [contact NO={info={Q}}] ++(1,0) -- (laddercoil);
 \ladderrungend{2}
 % power rails
   \draw let \p1=(laddertopright) in
@@ -631,12 +654,12 @@
  
 Every rung starts with |\draw(0,0)| to mark the first position. The next row of the same rung will start with |\draw(0,-1)| and so forth.
 
-All contacts and coils are placed by something like, e.g., |to [contact NC={info={$I$}}] ++(1,0)|. The |to| command places the element between the current position and the next position which is one length unit at the right of the current position. Blocks are bigger and need more space, so after a block use |++(2,0)|.
+All contacts and coils are placed by something like, e.g., \verb|to [contact NC={info={$I$}}] ++(1,0)|. The |to| command places the element between the current position and the next position which is one length unit at the right of the current position. Blocks are bigger and need more space, so after a block use |++(2,0)|.
 When a row is connected to a row above it, it is wise to mark the connection point on the row above using, e.g., |coordinate(laddercoil)|. Thus, the current row can be connected by |-- (laddercoil)| or \verb!-| (laddercoil)!. If there are several rows, connect only the last one.
 
 You also may need some fillers like |-- ++(2,0)| because the row (or rung) is shorter than the others or because you want to leave some space before a block.
 
-The last thing to do is to draw the power rails. For this, the end of the first row of the first rung was marked with |coordinate(laddertopright)|. In the example, both left and right power rails were drawn. To draw only the left one (mandatory\footnote{Actually, the standard reads ``The right power rail may be explicit or implied''.}), remove the |(\x1,\y1+0.7\ladderskip) -- (\x1,\ladderskip)|.
+The last thing to do is to draw the power rails. For this, the end of the first row of the first rung was marked with |coordinate(laddertopright)|. In the example, both left and right power rails were drawn. To draw only the left one (mandatory\footnote{Actually, the standard reads ``The right power rail may be explicit or implied''.}), remove the \verb|(\x1,\y1+0.7\ladderskip) -- (\x1,\ladderskip)|.
 
 You may need to change the diagram size. There are a few options: place it into |\resizebox|; use the key |scale|; and change the |\tikzcircuitssizeunit| through the key |circuit symbol unit|. Placing into a |\resizebox| changes everything and it is the preferable option for presentations. The key |scale| only changes the space between symbols, but the font size, line width and symbol sizes are all kept the same. Changing the |\tikzcircuitssizeunit| keeps the font size and line width, but changes the symbols size and, if you were careful, the distance between symbols.
 
@@ -655,7 +678,7 @@
 \setlength{\ladderskip}{5\tikzcircuitssizeunit} % 5\tikzcircuitssizeunit = 35pt
 \setlength{\ladderrungsep}{.2\ladderskip}
 \tiny
-\begin{tikzpicture} [ladder,thick,x=\ladderskip,y=\ladderskip,execute at end picture=%
+\begin{tikzpicture} [circuit plc ladder,thick,x=\ladderskip,y=\ladderskip,execute at end picture=%
 {
 \begin{pgfonlayer}{background}
 \path[fill=graphicbackground]
@@ -673,20 +696,20 @@
         (tp1.input 2) -- +(-0.3\ladderskip,0) node[left]{T\#3s};
 \ladderrungend{1.2}
   \draw(0,0)
-    to [contact NO={info={$I$}}] ++(1,0)
-    to [contact NC={info={$M$}}] ++(1,0) coordinate(laddercoil) -- ++(2,0)
-    to [coil={info={$Q$}}] ++(1,0);
+    to [contact NO={info={I}}] ++(1,0)
+    to [contact NC={info={M}}] ++(1,0) coordinate(laddercoil) -- ++(2,0)
+    to [coil={info={Q}}] ++(1,0);
   \draw(0,-1)
-    to [contact NC={info={$I$}}] ++(1,0)
-    to [contact NO={info={$Q$}}] ++(1,0) -- (laddercoil);
+    to [contact NC={info={I}}] ++(1,0)
+    to [contact NO={info={Q}}] ++(1,0) -- (laddercoil);
 \ladderrungend{2}
   \draw(0,0)
-    to [contact NO={info={$I$}}] ++(1,0)
-    to [contact NO={info={$M$}}] ++(1,0) coordinate(laddercoil) -- ++(2,0)
-    to [coil={info={$M$}}] ++(1,0);
+    to [contact NO={info={I}}] ++(1,0)
+    to [contact NO={info={M}}] ++(1,0) coordinate(laddercoil) -- ++(2,0)
+    to [coil={info={M}}] ++(1,0);
   \draw(0,-1)
-    to [contact NC={info={$I$}}] ++(1,0)
-    to [contact NO={info={$Q$}}] ++(1,0) -- (laddercoil);
+    to [contact NC={info={I}}] ++(1,0)
+    to [contact NO={info={Q}}] ++(1,0) -- (laddercoil);
 \ladderrungend{2}
 % power rails
   \draw let \p1=(laddertopright) in
@@ -696,11 +719,128 @@
 \end{center}
 \normalsize
 
+\tikzset{circuit symbol unit=7pt}
+\setlength{\ladderskip}{5\tikzcircuitssizeunit} % 5\tikzcircuitssizeunit = 35pt
+\setlength{\ladderrungsep}{.2\ladderskip}
+
 This may not be the best way to perform big adjustments, but it can help in some occasions where a small adjust is needed. Also, if you do it frequently, consider to write a macro to encapsulate the feature.
 
 
+\subsection{Directly represented variables (\%)}
+
+Direct representation of a single-element variable shall be provided by a special symbol formed by the concatenation of:
+\begin{itemize}
+\item a percent sign ``\%'' and
+\item location prefixes I, Q or M and
+\item a size prefix X (or none), B, W, D, or L and
+\item one or more (hierarchical addressing) unsigned integers that shall be separated by periods ``.''.
+\end{itemize}
+EXAMPLES:
+\begin{itemize}
+\item \%MW1.7.9
+\item \%ID12.6
+\item \%QL20
+\end{itemize}
+
+The character \% must be preceded by a backslash ``|\%|''. It also possible to place an illustrative text along with the |info|, usually above it. In the following example, the user-friendly variable names are placed in blue above each directly represented variable. The label distance is set globally to |-4pt| to save space. Even so it is necessary that the second row be drawn |1.2\ladderskip| below the first one.
+
+\begin{codeexample}[leave comments]
+\begin{tikzpicture} [circuit plc ladder,thick,
+    x=\ladderskip,y=\ladderskip,label distance=-4pt]
+  \draw(0,0)
+    to [contact NO={info={[label={[blue]$b_1$}]\%I0.1}}] ++(1,0)
+    coordinate(laddercoil)
+    to [contact NC={info={[label={[blue]$b_0$}]\%I0.0}}] ++(1,0) 
+    to [coil={info={[label={[blue]$K_1$}]\%Q0.0}}] ++(1,0)
+    coordinate(laddertopright);
+  \draw(0,-1.2)
+    to [contact NO={info={[label={[blue]$K_1$}]\%Q0.0}}] ++(1,0)
+    -- (laddercoil);
+\ladderrungend{2.2}
+  \draw let \p1=(laddertopright) in
+    (0,\y1+0.7\ladderskip) -- (0,\ladderskip)
+    (\x1,\y1+0.7\ladderskip) -- (\x1,\ladderskip);
+\end{tikzpicture}
+\end{codeexample}
+
+
+\section{NEMA}
+
+It is possible to typeset  NEMA -- National Electrical Manufacturers Association -- standard diagrams using this package. The main difference is that coils are represented by \tikz[circuit plc ladder,thick,baseline]\draw(0,0) to [coil={coil ladder curvature=0.5, minimum size=2.4\tikzcircuitssizeunit}] ++(1,0);
+instead of \tikz[circuit plc ladder,thick,baseline]\draw(0,0) to [coil] ++(1,0);
+.
+You can replace all coil symbols for circles globally placing the following keys in the document preamble:
+
+\begin{codeexample}[code only]
+\tikzset{
+    coil NA/.style={coil={#1,symbol={$/$}}},
+    every coil/.style={minimum size=2.4\tikzcircuitssizeunit,coil ladder curvature=0.5},
+    every coil S/.style={minimum size=2.4\tikzcircuitssizeunit,coil ladder curvature=0.5},
+    every coil R/.style={minimum size=2.4\tikzcircuitssizeunit,coil ladder curvature=0.5},
+    every coil NA/.style={minimum size=2.4\tikzcircuitssizeunit,coil ladder curvature=0.5}
+}
+\end{codeexample}
+
+Than you produce:
+\tikzset{
+    coil NA/.style={coil={#1,symbol={$/$}}},
+    every coil/.style={minimum size=2.4\tikzcircuitssizeunit,coil ladder curvature=0.5},
+    every coil S/.style={minimum size=2.4\tikzcircuitssizeunit,coil ladder curvature=0.5},
+    every coil R/.style={minimum size=2.4\tikzcircuitssizeunit,coil ladder curvature=0.5},
+    every coil NA/.style={minimum size=2.4\tikzcircuitssizeunit,coil ladder curvature=0.5}
+}
+
+\begin{codeexample}[width=6cm]
+\begin{tikzpicture} [circuit plc ladder,thick,
+     x=\ladderskip,y=\ladderskip]
+  \draw(0,0)
+    to [contact NO={info={$a$}}] ++(1,0)
+    to [contact NO={info={$c$}}] ++(1,0) -- ++(1,0)
+    to [coil={info={$Q$}}] ++(1,0)
+    coordinate(laddertopright);
+  \draw(1,0) -- ++(0,-1)
+    to [contact NO={info={$d$}}] ++(1,0)
+    to [contact NO={info={$e$}}] ++(1,0) -- ++(0,1);
+  \draw(0,-2)
+    to [contact NO={info={$b$}}] ++(1,0) -| ++(1,1);
+\ladderrungend{3}
+% power rails
+  \draw let \p1=(laddertopright) in
+    (0,\y1+0.7\ladderskip) -- (0,\ladderskip)
+    (\x1,\y1+0.7\ladderskip) -- (\x1,\ladderskip);
+\end{tikzpicture}
+\end{codeexample}
+
+To test all coils:
+\begin{codeexample}[width=6cm]
+\begin{tikzpicture} [circuit plc ladder,thick,
+     x=\ladderskip,y=\ladderskip]
+  \draw(0,0)
+    to [coil={info={$a$}}] ++(1,0) 
+    to [coil S={info={$b$}}] ++(1,0) 
+    to [coil R={info={$c$}}] ++(1,0) 
+    to [coil NA={info={$d$}}] ++(1,0); 
+\end{tikzpicture}
+\end{codeexample}
+
+If, however, you have lots of diagrams you better of redefining the coil graphic which is likely the most used one (not to say the only one). It is because the algorithm used to draw coils uses arcs, which are less efficient than circles. Thus, place this key in you document preamble:
+
+\begin{codeexample}[code only]
+\tikzset{
+  set coil graphic={
+    circuit symbol lines,
+    fill=none,
+    circuit symbol size=width 2.4 height 2.4,
+    transform shape,
+    shape=circle ee,
+    node contents=\pgfkeysvalueof{/pgf/ladder symbol}
+  }
+}
+\end{codeexample}
+
+
 \section{Known Issues}
-I am not happy with the block symbol anchors, particularly |text|, |mid| and |base| anchors. Also, |center| is not in the centre and it is disturbing, to say the least. That might be changed in the future. The way the library was written also annoys me: it seems that the official libraries are written in two separated files: one for \tikzname\ stuff and another for \pgfname, but I don't know how to separate it, thus we have a single file (at least for now). 
+The |center| anchor of block symbol is not in the centre and it is disturbing, to say the least. This is due \tikzname\ positioning algorithm and it is unlike to change. The way the library was written also annoys me: it seems that the official libraries are written in two separated files: one for \tikzname\ stuff and another for \pgfname, but I don't know how to separate it, thus we have a single file (at least for now). 
 
 
 \section{Final Remarks}
@@ -711,6 +851,6 @@
 
 It should be great if someone with experience in writing \tikzname\ libraries could have a look in the code and point out error or improvements to be made. 
 
-Typesetting ladder diagrams may be boring and time consuming. One thing you can try is \verb|JQM - Java Quine McCluskey| for minimization of Boolean functions available on \url{https://sourceforge.net/projects/jqm-java-quine-mccluskey/}. It can generate the solution and create the corresponding ladder diagram based on a given truth table. Unfortunately, it does not place blocks, so the last example was generated with it, but the rung with the timer had to be done manual and also some fillers had to be added.
+Typesetting ladder diagrams may be boring and time consuming. One thing you can try is \verb|JQM - Java Quine McCluskey| for minimization of Boolean functions available on \url{https://sourceforge.net/projects/jqm-java-quine-mccluskey/}. It can generate the solution and create the corresponding ladder diagram based on a given truth table. Unfortunately, it does not place blocks, so the example in Section~\ref{guidance} was generated with it, but the rung with the timer had to be done manually and also some fillers had to be added manually.
 
 \end{document}
\ No newline at end of file

Added: trunk/Master/texmf-dist/tex/latex/tikz-ladder/tikzlibrarycircuits.plc.ladder.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-ladder/tikzlibrarycircuits.plc.ladder.code.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/tikz-ladder/tikzlibrarycircuits.plc.ladder.code.tex	2018-02-06 23:59:08 UTC (rev 46555)
@@ -0,0 +1,628 @@
+%% This is file `tikzlibrarycircuits.plc.ladder.code.tex'
+%% Version: 1.1
+%% Version date: 2018-02-06
+%% 
+%% 
+%% Copyright (C) 2018 by Luis Paulo Laus, laus at utfpr.edu.br
+%%
+%% This package can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or (at your option) any later version,
+%% with `The Package' referring to the software
+%% `tikzlibrarycircuits.plc.ladder.code.tex'
+%% and its accompanying documentation and `The Copyright Holder'
+%% referring to the person Luis Paulo Laus.
+%% 
+%% 
+%% IMPORTANT NOTICE: 
+%% 
+%% For error reports, comments or suggestions in case of UNCHANGED 
+%% versions send mail to:
+%% laus at utfpr.edu.br
+%% 
+%%
+%% Change History:
+%% 1.0: 10 January 2018:  Original Version
+%% 1.1: 06 February 2018: Macro file renamed to proper TikZ library file name.
+%%                        Parent library changed from `circuit.ee' to `circuits'.
+%%                        Bug fixes: added \pgfusepathqstroke where is was missing,
+%%                        block anchors reworked.
+
+\usetikzlibrary{circuits}
+%
+% Setting up an ladder
+%
+\tikzset{
+  circuit plc ladder/.style={
+    circuit,
+    inputs/.style={block ladder inputs={##1}},
+    outputs/.style={block ladder outputs={##1}},
+    input sep/.style={block ladder input sep={##1}},
+    output sep/.style={block ladder output sep={##1}},
+    clksize/.style={block ladder clksize={##1}},
+    symbol/.style={ladder symbol={##1}},
+    symbol color/.style={ladder symbol color={##1}},
+    every circuit plc ladder/.try
+  }
+}       
+
+\makeatletter
+
+\newif\ifpgfnormallyclosednegated%
+\pgfkeys{
+  /pgf/crossed ladder/.is if=pgfnormallyclosednegated,%
+}
+
+\pgfkeys{/pgf/.cd,
+  contact ladder symbol/.initial=, % no value
+  contact NC ladder symbol/.initial=, % no value
+  var contact NC ladder symbol/.initial=$/$,
+  contact N ladder symbol/.initial=N,
+  contact P ladder symbol/.initial=P,
+  coil ladder symbol/.initial=, % no value
+  coil NA ladder symbol/.initial=, % no value
+  var coil NA ladder symbol/.initial=$/$,
+  coil S ladder symbol/.initial=S,
+  coil R ladder symbol/.initial=R,
+  coil ladder curvature/.initial=0.2, % parameter for ( and ) in coils
+  ladder symbol color/.initial=, % no value
+  ladder symbol/.initial=,
+  block ladder input sep/.initial=1.6\tikzcircuitssizeunit,
+  block ladder output sep/.initial=1.6\tikzcircuitssizeunit,
+  block ladder inputs/.initial={IN},
+  block ladder outputs/.initial={Q},
+  block ladder clksize/.initial=0.8\tikzcircuitssizeunit,
+  block ladder symbol/.initial=TON, % blocks like TON, TOF, TP, ADD, CDU, CDUD\_*
+}
+
+% Internal macro for parsing inputs, outputs and clock inputs (no short version).
+%
+\expandafter\ifx\csname pgf at lib@sh at ladder@parseinout\endcsname\relax%
+\def\pgf at lib@sh at ladder@parseinout#1{%
+	\edef\pgf at lib@sh at temp{\pgfkeysvalueof{/pgf/block ladder \pgf at lib@sh at ladder@inout}}%
+	\c at pgf@counta#1\relax%
+	\c at pgf@countb0\relax%
+	\expandafter\pgfutil at in@\expandafter,\expandafter{\pgf at lib@sh at temp}%
+	\let\pgf at lib@sh at next\pgf at lib@sh at ladder@parseinout at long%
+	\pgf at lib@sh at next%
+}	
+\def\pgf at lib@sh at ladder@parseinout at long{%
+	\expandafter\pgf at lib@sh at ladder@parseinout@@long\pgf at lib@sh at temp,\pgf at stop,%
+}
+\def\pgf at lib@sh at ladder@parseinout@@long#1,{%
+	\ifx#1\pgf at stop%
+		\expandafter\edef\csname pgf at lib@sh at ladder@num\pgf at lib@sh at ladder@inout\endcsname{\the\c at pgf@countb}%
+		\let\pgf at lib@sh at next\relax%
+	\else%
+		\ifnum\c at pgf@countb=\c at pgf@counta%
+			\expandafter\edef\csname pgf at lib@sh at ladder@num\pgf at lib@sh at ladder@inout\endcsname{\the\c at pgf@countb}%
+			\let\pgf at lib@sh at next\relax%
+		\else%
+			\advance\c at pgf@countb1\relax%
+			\def\pgf at lib@sh at temp{#1}%
+			\expandafter\pgf at sh@resavedmacro\expandafter{\csname \pgf at lib@sh at ladder@inout-\the\c at pgf@countb\endcsname}{%
+				\expandafter\def\csname \pgf at lib@sh at ladder@inout-\the\c at pgf@countb\endcsname{\expandafter\pgf at lib@sh at temp}}%
+			\let\pgf at lib@sh at next\pgf at lib@sh at ladder@parseinout@@@long%
+		\fi%
+	\fi%
+	\pgf at lib@sh at next%
+}
+\def\pgf at lib@sh at ladder@parseinout@@@long{%
+	\pgfutil at ifnextchar x{\pgf at lib@sh at ladder@parseinout@@long}%
+		{\pgf at lib@sh at ladder@parseinout@@long}%
+}
+\fi%
+
+
+% Adjust the width and height of the ladder block  symbol.
+\def\pgf at lib@sh at ladder@dimensions{
+  \pgf at x.5\wd\pgfnodeparttextbox
+  \pgf at y.5\ht\pgfnodeparttextbox
+  \advance\pgf at y.5\dp\pgfnodeparttextbox
+
+  %
+  % Adjust the height for the number of inputs and for the width and height of the ladder block  symbol.
+  %
+  \c at pgf@counta\pgf at lib@sh at ladder@numinputs
+  \pgfmathsetlength\pgf at yb{\pgfkeysvalueof{/pgf/block ladder input sep}}
+  \edef\inputsep{\the\pgf at yb}
+  \addtosavedmacro\inputsep
+  \pgf at ya\pgf at yb
+  \advance\c at pgf@counta-1\relax
+  \multiply\pgf at yb\c at pgf@counta
+   \c at pgf@counta\pgf at lib@sh at ladder@numoutputs
+  \pgfmathsetlength\pgf at yc{\pgfkeysvalueof{/pgf/block ladder output sep}}
+  \edef\outputsep{\the\pgf at yc}
+  \addtosavedmacro\outputsep
+  \pgf at ya\pgf at yc
+  \advance\c at pgf@counta-1\relax
+  \multiply\pgf at yc\c at pgf@counta
+  \ifdim\pgf at yb<\pgf at yc% the highest between inputs and outputs
+    \pgf at yb\pgf at yc
+  \fi
+  % now the symbol width and height
+  \setbox\pgf at hbox\hbox{{$\mathrm{\pgfkeysvalueof{/pgf/ladder symbol}}$}}% add braces as color-aftergroup-fix TT (error when contains \_)
+%  \setbox\pgf at hbox\hbox{{$\ensuremath{\mathrm{\pgfkeysvalueof{/pgf/ladder symbol}}$}}}% add braces as color-aftergroup-fix TT
+%  \setbox\pgf at hbox\hbox{{$\mathrm{TESTE}$}}% add braces as color-aftergroup-fix TT
+% \typeout{Test \the\wd\pgf at hbox  \the\ht\pgf at hbox  \the\dp\pgf at hbox}
+  \pgf at xc.5\wd\pgf at hbox
+  \pgf at yc\ht\pgf at hbox
+  \advance\pgf at yc\dp\pgf at hbox
+  \advance\pgf at yc1pt
+  \advance\pgf at yb0.5\pgf at yc
+  \advance\pgf at yc2pt
+  \edef\symbolypos{\the\pgf at yc}
+  \addtosavedmacro\symbolypos
+  \advance\pgf at yc0.5\pgf at yc
+  \advance\pgf at yc\pgf at yb
+  \advance\pgf at yc0pt
+  \pgf at yc.5\pgf at yc
+  \ifdim\pgf at x<\pgf at xc
+    \pgf at x\pgf at xc
+  \fi
+  \ifdim\pgf at y<\pgf at yc
+    \pgf at y\pgf at yc
+  \fi
+  \pgfmathaddtolength\pgf at x{\pgfkeysvalueof{/pgf/inner xsep}}
+  \pgfmathaddtolength\pgf at y{\pgfkeysvalueof{/pgf/inner ysep}}
+
+  %
+  % Adjust for minimum height and width.
+  %
+  \pgfmathsetlength\pgf at xa{\pgfkeysvalueof{/pgf/minimum width}}%
+  \pgfmathsetlength\pgf at ya{\pgfkeysvalueof{/pgf/minimum height}}%
+  \ifdim\pgf at x<.5\pgf at xa%
+    \pgf at x.5\pgf at xa%
+  \fi%
+  \ifdim\pgf at y<.5\pgf at ya%
+    \pgf at y.5\pgf at ya%
+  \fi%
+  %
+  % Take into account the outer sep.
+  %
+  \pgfmathaddtolength\pgf at x{\pgfkeysvalueof{/pgf/outer xsep}}%
+  \pgfmathaddtolength\pgf at y{\pgfkeysvalueof{/pgf/outer ysep}}%
+  %
+  \edef\halfwidth{\the\pgf at x}%
+  \edef\halfheight{\the\pgf at y}%
+  \addtosavedmacro\halfwidth%
+  \addtosavedmacro\halfheight%
+
+  \advance\pgf at yb\pgf at y
+  \advance\pgf at yb-\pgf at yc
+  \edef\boxdepth{\the\pgf at yb}% below 1st input
+  \addtosavedmacro\boxdepth
+}%
+
+
+\def\pgf at lib@sh at ladder@inputanchor#1{%
+  \dimensions%
+  \pgfpointorigin%
+  \advance\pgf at x-\halfwidth%
+  %
+  \pgfutil at tempdima\inputsep%
+  \multiply\pgfutil at tempdima#1\relax%
+  \advance\pgf at y-\pgfutil at tempdima%
+  \advance\pgf at y\inputsep%
+}
+
+\def\pgf at lib@sh at ladder@outputanchor#1{%
+  \dimensions%
+  \pgfpointorigin%
+  \advance\pgf at x\halfwidth%
+  %
+  \pgfutil at tempdima\outputsep%
+  \multiply\pgfutil at tempdima#1\relax%
+  \advance\pgf at y-\pgfutil at tempdima%
+  \advance\pgf at y\outputsep%
+}
+
+\def\pgfutil at first@until at relax#1#2\relax{#1}
+
+% Shapes
+% block
+\pgfdeclareshape{block ladder}{
+	\expandafter\pgfutil at g@addto at macro\csname pgf at sh@s at block ladder\endcsname{%
+	     \def\pgf at lib@sh at ladder@inout{inputs}
+		\pgf at lib@sh at ladder@parseinout{1024}% Maximum 1024 (!) inputs.
+		%
+		\pgfmathloop%
+			\ifnum\pgfmathcounter>\pgf at lib@sh at ladder@numinputs%
+			\else%
+				\pgfutil at ifundefined{pgf at anchor@block ladder at input \pgfmathcounter}{%
+					\expandafter\xdef\csname pgf at anchor@block ladder at input \pgfmathcounter\endcsname{%
+						\noexpand\pgf at lib@sh at ladder@inputanchor{\pgfmathcounter}%
+					}%
+				}{}%
+		\repeatpgfmathloop%
+		\ifnum\pgf at lib@sh at ladder@numinputs<1\relax%
+			\pgferror{A block must have at least one input}%
+		\fi%
+		%
+	     \def\pgf at lib@sh at ladder@inout{outputs}
+		\pgf at lib@sh at ladder@parseinout{1024}% Maximum 1024 (!) outputs.
+		%
+		\pgfmathloop%
+			\ifnum\pgfmathcounter>\pgf at lib@sh at ladder@numoutputs%
+			\else%
+				\pgfutil at ifundefined{pgf at anchor@block ladder at output \pgfmathcounter}{%
+					\expandafter\xdef\csname pgf at anchor@block ladder at output \pgfmathcounter\endcsname{%
+						\noexpand\pgf at lib@sh at ladder@outputanchor{\pgfmathcounter}%
+					}%
+				}{}%
+		\repeatpgfmathloop%
+		\ifnum\pgf at lib@sh at ladder@numoutputs<1\relax%
+			\pgferror{A block must have at least one output}%
+		\fi%
+	}%
+
+	\savedmacro\numinputs{\let\numinputs\pgf at lib@sh at ladder@numinputs}%
+	\savedmacro\numoutputs{\let\numoutputs\pgf at lib@sh at ladder@numoutputs}%
+	\savedmacro\dimensions{%
+		\pgf at lib@sh at ladder@dimensions%
+	}
+	\savedanchor\centerpoint{%
+		\pgfpointorigin
+	}
+	\savedanchor\midpoint{%
+      \pgfpointorigin
+      \advance\pgf at y-.5\ht\pgfnodeparttextbox
+      \advance\pgf at y.5\dp\pgfnodeparttextbox
+		\pgfmathaddtolength\pgf at y{+0.5ex}%
+	}
+   \savedanchor\basepoint{%
+      \pgfpointorigin
+      \advance\pgf at y-.5\ht\pgfnodeparttextbox
+      \advance\pgf at y.5\dp\pgfnodeparttextbox
+   }
+	\savedanchor\textpoint{%
+      \pgfpointorigin
+      \advance\pgf at x-.5\wd\pgfnodeparttextbox
+      \advance\pgf at y-.5\ht\pgfnodeparttextbox
+      \advance\pgf at y.5\dp\pgfnodeparttextbox
+   }
+	\anchor{center}{\pgfpointorigin}%
+	\anchor{block center}{\dimensions\pgfpointorigin\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
+	\anchor{text}{\dimensions\textpoint\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
+	\anchor{mid}{\dimensions\midpoint\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
+	\anchor{mid west}{\dimensions\midpoint\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at x-\halfwidth}%
+	\anchor{mid east}{\dimensions\midpoint\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at x\halfwidth}%
+	\anchor{base}{\dimensions\basepoint\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
+	\anchor{base west}{\dimensions\basepoint\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at x-\halfwidth}%
+	\anchor{base east}{\dimensions\basepoint\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at x\halfwidth}%
+	\anchor{north}{\dimensions\pgfpointorigin\advance\pgf at y\halfheight\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
+	\anchor{south}{\dimensions\pgfpointorigin\advance\pgf at y-\boxdepth}%
+	\anchor{east}{\dimensions\pgfpointorigin\advance\pgf at x\halfwidth\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
+	\anchor{west}{\dimensions\pgfpointorigin\advance\pgf at x-\halfwidth\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
+	\anchor{north east}{\dimensions\pgfpointorigin\advance\pgf at x\halfwidth\advance\pgf at y\halfheight\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
+	\anchor{north west}{\dimensions\pgfpointorigin\advance\pgf at x-\halfwidth\advance\pgf at y\halfheight\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
+	\anchor{south east}{\dimensions\pgfpointorigin\advance\pgf at x\halfwidth\advance\pgf at y-\boxdepth}%
+	\anchor{south west}{\dimensions\pgfpointorigin\advance\pgf at x-\halfwidth\advance\pgf at y-\boxdepth}%
+	\backgroundpath{%
+		\dimensions%
+		\pgf at xc\halfwidth%
+		\pgf at yc\halfheight%
+		\pgfmathaddtolength\pgf at xc{-\pgfkeysvalueof{/pgf/outer xsep}}%
+		\pgfmathaddtolength\pgf at yc{-\pgfkeysvalueof{/pgf/outer ysep}}%
+		      
+		\pgf at yb\boxdepth%
+		\pgfmathaddtolength\pgf at yb{-\pgfkeysvalueof{/pgf/outer ysep}}%
+		{%
+			\pgfpathrectangle{\pgfqpoint{-\pgf at xc}{-\pgf at yb}}%
+			{%
+				\pgf at x2.0\pgf at xc%
+				\pgf at y2.0\pgf at yc%
+			}%
+			\pgfpathclose%
+		}%
+	}
+	\foregroundpath{
+		\dimensions%
+		{%
+			%
+			% Write block type (symbol)
+			%
+			\pgf at yc\symbolypos
+			\expandafter\pgftext\expandafter[/pgf/text/at=\pgfqpoint{0pt}{\pgf at yc},/pgf/text/center]{%
+				\pgfkeysgetvalue{/pgf/ladder symbol color}{\pgf at lib@sh at temp}%
+				\ifx\pgf at lib@sh at temp\pgfutil at empty%
+				\else%
+					\expandafter\color\expandafter{\pgf at lib@sh at temp}%
+				\fi%
+				{\pgfkeysvalueof{/pgf/ladder symbol}}%
+			}%
+			% Draw inputs.
+			%
+			\pgf at xc-\halfwidth%
+			\pgfmathaddtolength\pgf at xc{\pgfkeysvalueof{/pgf/outer xsep}}
+			\pgf at xa\pgf at xc
+			\pgfmathaddtolength\pgf at xc{\pgfkeysvalueof{/pgf/inner xsep}}
+  			\pgf at yc\inputsep%
+			\pgfmathloop%
+			\ifnum\pgfmathcounter>\numinputs%
+			\else%
+				\advance\pgf at yc-\inputsep%
+				\edef\pgf at lib@sh at temp{\csname inputs-\pgfmathcounter\endcsname}
+				\pgf at xb\pgf at xc
+				\if>\expandafter\pgfutil at first@until at relax\pgf at lib@sh at temp\relax
+                           \edef\pgf at lib@sh at temp{\expandafter\expandafter\expandafter\pgfutil at gobble\pgf at lib@sh at temp}
+					\pgf at ya\pgf at yc
+					\pgfmathsetlength\pgf at yb{\pgfkeysvalueof{/pgf/block ladder clksize}}
+					\pgfmathaddtolength\pgf at ya{0.5\pgf at yb}
+					\pgfpathmoveto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
+					\pgfmathaddtolength\pgf at ya{-0.5\pgf at yb}
+					\pgfmathaddtolength\pgf at xa{\pgf at yb}
+					\pgfpathlineto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
+					\pgfmathaddtolength\pgf at ya{-0.5\pgf at yb}
+					\pgfmathaddtolength\pgf at xa{-\pgf at yb}
+					\pgfpathlineto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
+					\pgfmathaddtolength\pgf at xb{\pgf at yb}
+					\pgfpathclose
+				\fi
+				\expandafter\pgftext\expandafter[/pgf/text/at=\pgfqpoint{\pgf at xb}{\pgf at yc},/pgf/text/left]{%
+					\pgfkeysgetvalue{/pgf/ladder symbol color}{\pgf at lib@sh@@temp}%
+					\ifx\pgf at lib@sh@@temp\pgfutil at empty%
+					\else%
+						\expandafter\color\expandafter{\pgf at lib@sh@@temp}%
+					\fi%
+					{\pgf at lib@sh at temp}%
+				}%
+			\repeatpgfmathloop%
+			% Draw outputs.
+			%
+			\pgf at xc\halfwidth%
+			\pgfmathaddtolength\pgf at xc{-\pgfkeysvalueof{/pgf/inner xsep}}
+			\pgfmathaddtolength\pgf at xc{-\pgfkeysvalueof{/pgf/outer xsep}}
+  			\pgf at yc\outputsep%
+			\pgfmathloop%
+			\ifnum\pgfmathcounter>\numoutputs%
+			\else%
+				\advance\pgf at yc-\outputsep%
+				\expandafter\pgftext\expandafter[/pgf/text/at=\pgfqpoint{\pgf at xc}{\pgf at yc},/pgf/text/right]{%
+					\pgfkeysgetvalue{/pgf/ladder symbol color}{\pgf at lib@sh at temp}%
+					\ifx\pgf at lib@sh at temp\pgfutil at empty%
+					\else%
+						\expandafter\color\expandafter{\pgf at lib@sh at temp}%
+					\fi%
+					{\csname outputs-\pgfmathcounter\endcsname}%
+				}%
+			\repeatpgfmathloop%
+		}%
+	} 
+	\anchorborder{%
+		\dimensions%
+		\pgfextract at process\externalpoint{}%
+		\ifdim\pgf at y<0pt%
+			\pgf at process{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\boxdepth}}}%
+		\else%
+			\pgf at yc\halfheight
+			\advance\pgf at yc\halfheight\advance\pgf at yc-\boxdepth
+			\pgf at process{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\pgf at yc}}}%
+		\fi%
+	}%  
+}
+
+
+
+
+% contact
+\pgfdeclareshape{contact ladder}
+{
+  \inheritsavedanchors[from=rectangle]
+  \inheritanchor[from=rectangle]{center}
+  \inheritanchor[from=rectangle]{north}
+  \inheritanchor[from=rectangle]{south}
+  \inheritanchor[from=rectangle]{east}
+  \inheritanchor[from=rectangle]{west}
+  \inheritanchor[from=rectangle]{north east}
+  \inheritanchor[from=rectangle]{north west}
+  \inheritanchor[from=rectangle]{south east}
+  \inheritanchor[from=rectangle]{south west}
+  \inheritanchor[from=rectangle]{input}
+  \inheritanchor[from=rectangle]{output}
+  \inheritanchorborder[from=rectangle]  % New:
+  \anchor{input}{
+    \pgf at process{\northeast}%
+    \pgf at ya=.5\pgf at y%
+    \pgf at process{\southwest}%
+    \pgf at y=.5\pgf at y%
+    \advance\pgf at y by \pgf at ya%
+  }
+  \anchor{output}{%
+    \pgf at process{\southwest}%
+    \pgf at ya=.5\pgf at y%
+    \pgf at process{\northeast}%
+    \pgf at y=.5\pgf at y%
+    \advance\pgf at y by \pgf at ya%
+  }
+  \savedanchor\centerpoint{%
+    \pgf at x.5\wd\pgfnodeparttextbox%
+    \pgf at y.5\ht\pgfnodeparttextbox%
+    \advance\pgf at y-.5\dp\pgfnodeparttextbox%
+  }
+
+  \backgroundpath{
+    \pgf at process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
+    \pgf at xa=\pgf at x \pgf at ya=\pgf at y
+    \pgf at process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}
+    \pgf at xb=\pgf at x \pgf at yb=\pgf at y
+    \pgfpathmoveto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
+    \pgfpathmoveto{\pgfqpoint{\pgf at xa}{\pgf at yb}}
+    \pgfpathlineto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
+    \ifpgfnormallyclosednegated
+       \pgfsetbeveljoin
+       \pgfpathlineto{\pgfqpoint{\pgf at xb}{\pgf at yb}}
+    \else
+       \pgfpathmoveto{\pgfqpoint{\pgf at xb}{\pgf at yb}}
+    \fi
+    \pgfpathlineto{\pgfqpoint{\pgf at xb}{\pgf at ya}}
+    \pgfusepathqstroke
+  }
+  \foregroundpath{
+    \pgftransformshift{\centerpoint}
+    \pgftext{\pgfkeysvalueof{/pgf/ladder symbol}}
+  }
+}
+
+% coil
+\pgfdeclareshape{coil ladder}
+{
+  \inheritsavedanchors[from=rectangle]
+  \inheritanchor[from=rectangle]{center}
+  \inheritanchor[from=rectangle]{north}
+  \inheritanchor[from=rectangle]{south}
+  \inheritanchor[from=rectangle]{east}
+  \inheritanchor[from=rectangle]{west}
+  \inheritanchor[from=rectangle]{north east}
+  \inheritanchor[from=rectangle]{north west}
+  \inheritanchor[from=rectangle]{south east}
+  \inheritanchor[from=rectangle]{south west}
+  \inheritanchor[from=rectangle]{input}
+  \inheritanchor[from=rectangle]{output}
+  \inheritanchorborder[from=rectangle]  % New:
+  \anchor{input}{
+    \pgf at process{\northeast}%
+    \pgf at ya=.5\pgf at y%
+    \pgf at process{\southwest}%
+    \pgf at y=.5\pgf at y%
+    \advance\pgf at y by \pgf at ya%
+  }
+  \anchor{output}{%
+    \pgf at process{\southwest}%
+    \pgf at ya=.5\pgf at y%
+    \pgf at process{\northeast}%
+    \pgf at y=.5\pgf at y%
+    \advance\pgf at y by \pgf at ya%
+  }
+  \savedanchor\centerpoint{%
+    \pgf at x.5\wd\pgfnodeparttextbox%
+    \pgf at y.5\ht\pgfnodeparttextbox%
+    \advance\pgf at y-.5\dp\pgfnodeparttextbox%
+  }
+
+  \backgroundpath{
+    \pgf at process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
+    \pgf at xa=\pgf at x \pgf at ya=\pgf at y
+    \pgf at process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}
+    \pgf at xb=\pgf at x \pgf at yb=\pgf at y
+    
+    \pgfmathsetlength\pgf at xc{\pgfkeysvalueof{/pgf/coil ladder curvature}\pgf at xb-\pgfkeysvalueof{/pgf/coil ladder curvature}\pgf at xa} % uses a reduction of 20% (by default) for beginning of the arcs, if it is 0.5 and width=height we got a circle, do not set to zero
+    \pgfmathsetlength\pgf at yc{.5\pgf at yb-.5\pgf at ya}
+    \pgfmathsetlength\pgf at ya{0.5\pgf at xc + 0.5\pgf at yc*\pgf at yc / \pgf at xc} % radius
+    \advance\pgf at xa by \pgf at xc
+    \advance\pgf at xb by-\pgf at xc
+    \pgfmathsetlength\pgf at yc{\pgf at yc / \pgf at ya}
+    \pgfmathasin{\pgf at yc}
+    \pgfmathsetlength\pgf at yc{\pgfmathresult} % angle
+    \pgfpathmoveto{\pgfqpoint{\pgf at xa}{\pgf at yb}}
+    \pgfpatharc{180-\pgf at yc}{180+\pgf at yc}{\pgf at ya}
+    \ifpgfnormallyclosednegated
+       \pgfsetbeveljoin
+       \pgfpathlineto{\pgfqpoint{\pgf at xb}{\pgf at yb}}
+    \else
+       \pgfpathmoveto{\pgfqpoint{\pgf at xb}{\pgf at yb}}
+    \fi
+    \pgfpatharc{\pgf at yc}{-\pgf at yc}{\pgf at ya}
+    \pgfusepathqstroke
+  }
+  \foregroundpath{
+    \pgftransformshift{\centerpoint}
+    \pgftext{\pgfkeysvalueof{/pgf/ladder symbol}}
+  }
+}
+\makeatother
+
+\tikzset{
+  circuit declare symbol=contact NO,
+  circuit declare symbol=contact NC,
+  circuit declare symbol=var contact NC,
+  circuit declare symbol=contact P,
+  circuit declare symbol=contact N,
+  circuit declare symbol=coil,
+  circuit declare symbol=coil NA,
+  circuit declare symbol=var coil NA,
+  circuit declare symbol=coil S,
+  circuit declare symbol=coil R,
+  circuit declare symbol=block,
+  set contact NO graphic={
+    circuit symbol lines,
+    circuit symbol size=width 1.5 height 2,
+    transform shape,
+    shape=contact ladder
+  },
+  set contact NC graphic={
+    circuit symbol lines,
+    circuit symbol size=width 1.5 height 2,
+    transform shape,
+    crossed ladder=true,
+    shape=contact ladder
+  },
+  set var contact NC graphic={
+    circuit symbol lines,
+    circuit symbol size=width 1.5 height 2,
+    transform shape,
+    ladder symbol=\pgfkeysvalueof{/pgf/var contact NC ladder symbol},
+    shape=contact ladder
+  },
+  set contact P graphic={
+    circuit symbol lines,
+    circuit symbol size=width 1.5 height 2,
+    transform shape,
+    ladder symbol=\pgfkeysvalueof{/pgf/contact P ladder symbol},
+    shape=contact ladder
+  },
+  set contact N graphic={
+    circuit symbol lines,
+    circuit symbol size=width 1.5 height 2,
+    transform shape,
+    ladder symbol=\pgfkeysvalueof{/pgf/contact N ladder symbol},
+    shape=contact ladder
+  },
+  set coil graphic={
+    circuit symbol lines,
+    fill=none,
+    circuit symbol size=width 2.4 height 2,
+    transform shape,
+    shape=coil ladder
+  },
+  set coil NA graphic={
+    circuit symbol lines,
+    circuit symbol size=width 2.4 height 2,
+    crossed ladder=true,
+    transform shape,
+    shape=coil ladder
+  },
+  set var coil NA graphic={
+    circuit symbol lines,
+    circuit symbol size=width 2.4 height 2,
+    ladder symbol=\pgfkeysvalueof{/pgf/var coil NA ladder symbol},
+    transform shape,
+    shape=coil ladder
+  },
+  set coil S graphic={
+    circuit symbol lines,
+    circuit symbol size=width 2.4 height 2,
+    ladder symbol=\pgfkeysvalueof{/pgf/coil S ladder symbol},
+    transform shape,
+    shape=coil ladder
+  },
+  set coil R graphic={
+    circuit symbol lines,
+    circuit symbol size=width 2.4 height 2,
+    ladder symbol=\pgfkeysvalueof{/pgf/coil R ladder symbol},
+    transform shape,
+    shape=coil ladder
+  },
+  set block graphic={
+    circuit symbol lines,
+    circuit symbol size=width 2.4 height 2,
+    ladder symbol=\pgfkeysvalueof{/pgf/block ladder symbol},
+    transform shape,
+    inner sep=.5ex,
+    shape=block ladder,
+    every ladder block/.try
+  }
+}
+
+\endinput
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/tikz-ladder/tikzlibrarycircuits.plc.ladder.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/tex/latex/tikz-ladder/tikzlibraryladder.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-ladder/tikzlibraryladder.code.tex	2018-02-06 15:27:32 UTC (rev 46554)
+++ trunk/Master/texmf-dist/tex/latex/tikz-ladder/tikzlibraryladder.code.tex	2018-02-06 23:59:08 UTC (rev 46555)
@@ -1,580 +0,0 @@
-%% This is file `tikzlibraryladder.code.tex'
-%% Version 1 of 10 January 2018
-%% 
-%% Copyright (C) 2018 by Luis Paulo Laus, laus at utfpr.edu.br
-%%
-%% This package can be redistributed and/or modified under the terms
-%% of the LaTeX Project Public License distributed from CTAN
-%% archives in directory macros/latex/base/lppl.txt; either
-%% version 1 of the License, or (at your option) any later version,
-%% with `The Package' referring to the software `tikzlibraryladder.code.tex' and its
-%% accompanying documentation and `The Copyright Holder' referring to the
-%% person Luis Paulo Laus.
-%% 
-%% 
-%% IMPORTANT NOTICE: 
-%% 
-%% For error reports, comments or suggestions in case of UNCHANGED 
-%% versions send mail to:
-%% laus at utfpr.edu.br
-%% 
-%%
-
-
-\usetikzlibrary{circuits.ee}
-%
-% Setting up an ladder
-%
-\tikzset{
-  ladder/.style={
-    circuit ee,
-    inputs/.style={block ladder inputs={##1}},
-    outputs/.style={block ladder outputs={##1}},
-    input sep/.style={block ladder input sep={##1}},
-    output sep/.style={block ladder output sep={##1}},
-    clksize/.style={block ladder clksize={##1}},
-    symbol/.style={ladder symbol={##1}},
-    symbol color/.style={ladder symbol color={##1}},
-    every ladder/.try
-  }
-}       
-
-\makeatletter
-
-\newif\ifpgfnormallyclosednegated%
-\pgfkeys{
-  /pgf/crossed ladder/.is if=pgfnormallyclosednegated,%
-}
-
-\pgfkeys{/pgf/.cd,
-  contact ladder symbol/.initial=, % no value
-  contact NC ladder symbol/.initial=, % no value
-  var contact NC ladder symbol/.initial=$/$,
-  contact N ladder symbol/.initial=N,
-  contact P ladder symbol/.initial=P,
-  coil ladder symbol/.initial=, % no value
-  coil NA ladder symbol/.initial=, % no value
-  var coil NA ladder symbol/.initial=$/$,
-  coil S ladder symbol/.initial=S,
-  coil R ladder symbol/.initial=R,
-  coil ladder curvature/.initial=0.2, % parameter for ( and ) in coils
-  ladder symbol color/.initial=, % no value
-  ladder symbol/.initial=,
-  block ladder input sep/.initial=1.6\tikzcircuitssizeunit,
-  block ladder output sep/.initial=1.6\tikzcircuitssizeunit,
-  block ladder inputs/.initial={IN},
-  block ladder outputs/.initial={Q},
-  block ladder clksize/.initial=0.8\tikzcircuitssizeunit,
-  block ladder symbol/.initial=TON, % blocks like TON, TOF, TP, ADD, CDU, CDUD\_*
-}
-
-% Internal macro for parsing inputs, outputs and clock inputs (no short version).
-%
-\expandafter\ifx\csname pgf at lib@sh at ladder@parseinout\endcsname\relax%
-\def\pgf at lib@sh at ladder@parseinout#1{%
-	\edef\pgf at lib@sh at temp{\pgfkeysvalueof{/pgf/block ladder \pgf at lib@sh at ladder@inout}}%
-	\c at pgf@counta#1\relax%
-	\c at pgf@countb0\relax%
-	\expandafter\pgfutil at in@\expandafter,\expandafter{\pgf at lib@sh at temp}%
-	\let\pgf at lib@sh at next\pgf at lib@sh at ladder@parseinout at long%
-	\pgf at lib@sh at next%
-}	
-\def\pgf at lib@sh at ladder@parseinout at long{%
-	\expandafter\pgf at lib@sh at ladder@parseinout@@long\pgf at lib@sh at temp,\pgf at stop,%
-}
-\def\pgf at lib@sh at ladder@parseinout@@long#1,{%
-	\ifx#1\pgf at stop%
-		\expandafter\edef\csname pgf at lib@sh at ladder@num\pgf at lib@sh at ladder@inout\endcsname{\the\c at pgf@countb}%
-		\let\pgf at lib@sh at next\relax%
-	\else%
-		\ifnum\c at pgf@countb=\c at pgf@counta%
-			\expandafter\edef\csname pgf at lib@sh at ladder@num\pgf at lib@sh at ladder@inout\endcsname{\the\c at pgf@countb}%
-			\let\pgf at lib@sh at next\relax%
-		\else%
-			\advance\c at pgf@countb1\relax%
-			\def\pgf at lib@sh at temp{#1}%
-			\expandafter\pgf at sh@resavedmacro\expandafter{\csname \pgf at lib@sh at ladder@inout-\the\c at pgf@countb\endcsname}{%
-				\expandafter\def\csname \pgf at lib@sh at ladder@inout-\the\c at pgf@countb\endcsname{\expandafter\pgf at lib@sh at temp}}%
-			\let\pgf at lib@sh at next\pgf at lib@sh at ladder@parseinout@@@long%
-		\fi%
-	\fi%
-	\pgf at lib@sh at next%
-}
-\def\pgf at lib@sh at ladder@parseinout@@@long{%
-	\pgfutil at ifnextchar x{\pgf at lib@sh at ladder@parseinout@@long}%
-		{\pgf at lib@sh at ladder@parseinout@@long}%
-}
-\fi%
-
-
-% Adjust the width and height of the ladder block  symbol.
-\def\pgf at lib@sh at ladder@dimensions{
-  \pgf at x.5\wd\pgfnodeparttextbox
-  \pgf at y.5\ht\pgfnodeparttextbox
-  \advance\pgf at y.5\dp\pgfnodeparttextbox
-
-  %
-  % Adjust the height for the number of inputs and for the width and height of the ladder block  symbol.
-  %
-  \c at pgf@counta\pgf at lib@sh at ladder@numinputs
-  \pgfmathsetlength\pgf at yb{\pgfkeysvalueof{/pgf/block ladder input sep}}
-  \edef\inputsep{\the\pgf at yb}
-  \addtosavedmacro\inputsep
-  \pgf at ya\pgf at yb
-  \advance\c at pgf@counta-1\relax
-  \multiply\pgf at yb\c at pgf@counta
-   \c at pgf@counta\pgf at lib@sh at ladder@numoutputs
-  \pgfmathsetlength\pgf at yc{\pgfkeysvalueof{/pgf/block ladder output sep}}
-  \edef\outputsep{\the\pgf at yc}
-  \addtosavedmacro\outputsep
-  \pgf at ya\pgf at yc
-  \advance\c at pgf@counta-1\relax
-  \multiply\pgf at yc\c at pgf@counta
-  \ifdim\pgf at yb<\pgf at yc% the highest between inputs and outputs
-    \pgf at yb\pgf at yc
-  \fi
-  % now the symbol width and height
-  \setbox\pgf at hbox\hbox{{$\mathrm{\pgfkeysvalueof{/pgf/ladder symbol}}$}}% add braces as color-aftergroup-fix TT (error when contains \_)
-%  \setbox\pgf at hbox\hbox{{$\ensuremath{\mathrm{\pgfkeysvalueof{/pgf/ladder symbol}}$}}}% add braces as color-aftergroup-fix TT
-%  \setbox\pgf at hbox\hbox{{$\mathrm{TESTE}$}}% add braces as color-aftergroup-fix TT
-% \typeout{Test \the\wd\pgf at hbox  \the\ht\pgf at hbox  \the\dp\pgf at hbox}
-  \pgf at xc.5\wd\pgf at hbox
-  \pgf at yc\ht\pgf at hbox
-  \advance\pgf at yc\dp\pgf at hbox
-  \advance\pgf at yc1pt
-  \advance\pgf at yb0.5\pgf at yc
-  \advance\pgf at yc2pt
-  \edef\symbolypos{\the\pgf at yc}
-  \addtosavedmacro\symbolypos
-  \advance\pgf at yc0.5\pgf at yc
-  \advance\pgf at yc\pgf at yb
-  \advance\pgf at yc0pt
-  \pgf at yc.5\pgf at yc
-  \ifdim\pgf at x<\pgf at xc
-    \pgf at x\pgf at xc
-  \fi
-  \ifdim\pgf at y<\pgf at yc
-    \pgf at y\pgf at yc
-  \fi
-  \pgfmathaddtolength\pgf at x{\pgfkeysvalueof{/pgf/inner xsep}}
-  \pgfmathaddtolength\pgf at y{\pgfkeysvalueof{/pgf/inner ysep}}
-
-  %
-  % Adjust for minimum height and width.
-  %
-  \pgfmathsetlength\pgf at xa{\pgfkeysvalueof{/pgf/minimum width}}%
-  \pgfmathsetlength\pgf at ya{\pgfkeysvalueof{/pgf/minimum height}}%
-  \ifdim\pgf at x<.5\pgf at xa%
-    \pgf at x.5\pgf at xa%
-  \fi%
-  \ifdim\pgf at y<.5\pgf at ya%
-    \pgf at y.5\pgf at ya%
-  \fi%
-  %
-  % Take into account the outer sep.
-  %
-  \pgfmathaddtolength\pgf at x{\pgfkeysvalueof{/pgf/outer xsep}}%
-  \pgfmathaddtolength\pgf at y{\pgfkeysvalueof{/pgf/outer ysep}}%
-  %
-  \edef\halfwidth{\the\pgf at x}%
-  \edef\halfheight{\the\pgf at y}%
-  \addtosavedmacro\halfwidth%
-  \addtosavedmacro\halfheight%
-
-  \advance\pgf at yb\pgf at y
-  \advance\pgf at yb-\pgf at yc
-  \edef\boxdepth{\the\pgf at yb}% below 1st input
-  \addtosavedmacro\boxdepth
-}%
-
-
-\def\pgf at lib@sh at ladder@inputanchor#1{%
-  \dimensions%
-  \pgfpointorigin%
-  \advance\pgf at x-\halfwidth%
-  %
-  \pgfutil at tempdima\inputsep%
-  \multiply\pgfutil at tempdima#1\relax%
-  \advance\pgf at y-\pgfutil at tempdima%
-  \advance\pgf at y\inputsep%
-}
-
-\def\pgf at lib@sh at ladder@outputanchor#1{%
-  \dimensions%
-  \pgfpointorigin%
-  \advance\pgf at x\halfwidth%
-  %
-  \pgfutil at tempdima\outputsep%
-  \multiply\pgfutil at tempdima#1\relax%
-  \advance\pgf at y-\pgfutil at tempdima%
-  \advance\pgf at y\outputsep%
-}
-
-\def\pgfutil at first@until at relax#1#2\relax{#1}
-
-% Shapes
-% block
-\pgfdeclareshape{block ladder}{
-	\expandafter\pgfutil at g@addto at macro\csname pgf at sh@s at block ladder\endcsname{%
-	     \def\pgf at lib@sh at ladder@inout{inputs}
-		\pgf at lib@sh at ladder@parseinout{1024}% Maximum 1024 (!) inputs.
-		%
-		\pgfmathloop%
-			\ifnum\pgfmathcounter>\pgf at lib@sh at ladder@numinputs%
-			\else%
-				\pgfutil at ifundefined{pgf at anchor@block ladder at input \pgfmathcounter}{%
-					\expandafter\xdef\csname pgf at anchor@block ladder at input \pgfmathcounter\endcsname{%
-						\noexpand\pgf at lib@sh at ladder@inputanchor{\pgfmathcounter}%
-					}%
-				}{}%
-		\repeatpgfmathloop%
-		\ifnum\pgf at lib@sh at ladder@numinputs<1\relax%
-			\pgferror{An block must have at least one input}%
-		\fi%
-		%
-	     \def\pgf at lib@sh at ladder@inout{outputs}
-		\pgf at lib@sh at ladder@parseinout{1024}% Maximum 1024 (!) outputs.
-		%
-		\pgfmathloop%
-			\ifnum\pgfmathcounter>\pgf at lib@sh at ladder@numoutputs%
-			\else%
-				\pgfutil at ifundefined{pgf at anchor@block ladder at output \pgfmathcounter}{%
-					\expandafter\xdef\csname pgf at anchor@block ladder at output \pgfmathcounter\endcsname{%
-						\noexpand\pgf at lib@sh at ladder@outputanchor{\pgfmathcounter}%
-					}%
-				}{}%
-		\repeatpgfmathloop%
-		\ifnum\pgf at lib@sh at ladder@numoutputs<1\relax%
-			\pgferror{An block must have at least one output}%
-		\fi%
-	}%
-
-	\savedmacro\numinputs{\let\numinputs\pgf at lib@sh at ladder@numinputs}%
-	\savedmacro\numoutputs{\let\numoutputs\pgf at lib@sh at ladder@numoutputs}%
-	\savedmacro\dimensions{%
-		\pgf at lib@sh at ladder@dimensions%
-	}
-	\savedanchor\centerpoint{%
-		\pgfpointorigin
-	}
-	\savedanchor\midpoint{%
-		\pgf at x0pt%
-		\pgfmathsetlength\pgf at y{+0.5ex}%
-	}
-	\savedanchor\basepoint{%
-		\pgf at x0pt%
-		\pgf at y0pt%
-	}
-	\anchor{text}{\dimensions\pgfpointorigin\advance\pgf at x-.5\wd\pgfnodeparttextbox\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at y-.5\ht\pgfnodeparttextbox\advance\pgf at y-.5\dp\pgfnodeparttextbox}
-%	\anchor{text}{\dimensions\pgfpointorigin\pgf at y\symbolypos\advance\pgf at x-.5\wd\pgfnodeparttextbox\advance\pgf at y-.5\ht\pgfnodeparttextbox\advance\pgf at y-.5\dp\pgfnodeparttextbox} % symbol
-	\anchor{center}{\pgfpointorigin}
-	\anchor{mid}{\dimensions\midpoint\advance\pgf at x-.5\wd\pgfnodeparttextbox\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at y-.5\ht\pgfnodeparttextbox\advance\pgf at y-.5\dp\pgfnodeparttextbox\advance\pgf at y0.5ex}
-	\anchor{mid west}{\dimensions\midpoint\advance\pgf at x-\halfwidth\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at y-.5\ht\pgfnodeparttextbox\advance\pgf at y-.5\dp\pgfnodeparttextbox\advance\pgf at y0.5ex}%
-	\anchor{mid east}{\dimensions\midpoint\advance\pgf at x\halfwidth\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at y-.5\ht\pgfnodeparttextbox\advance\pgf at y-.5\dp\pgfnodeparttextbox\advance\pgf at y0.5ex}%
-	\anchor{base}{\dimensions\basepoint\advance\pgf at x-.5\wd\pgfnodeparttextbox\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at y-.5\ht\pgfnodeparttextbox\advance\pgf at y-.5\dp\pgfnodeparttextbox}
-	\anchor{base west}{\dimensions\basepoint\advance\pgf at x-\halfwidth\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at y-.5\ht\pgfnodeparttextbox\advance\pgf at y-.5\dp\pgfnodeparttextbox}%
-	\anchor{base east}{\dimensions\basepoint\advance\pgf at x\halfwidth\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth\advance\pgf at y-.5\ht\pgfnodeparttextbox\advance\pgf at y-.5\dp\pgfnodeparttextbox}%
-	\anchor{north}{\dimensions\pgfpointorigin\advance\pgf at y\halfheight\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
-	\anchor{south}{\dimensions\pgfpointorigin\advance\pgf at y-\boxdepth}%
-	\anchor{east}{\dimensions\pgfpointorigin\advance\pgf at x\halfwidth\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
-	\anchor{west}{\dimensions\pgfpointorigin\advance\pgf at x-\halfwidth\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
-	\anchor{north east}{\dimensions\pgfpointorigin\advance\pgf at x\halfwidth\advance\pgf at y\halfheight\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
-	\anchor{north west}{\dimensions\pgfpointorigin\advance\pgf at x-\halfwidth\advance\pgf at y\halfheight\advance\pgf at y\halfheight\advance\pgf at y-\boxdepth}%
-	\anchor{south east}{\dimensions\pgfpointorigin\advance\pgf at x\halfwidth\advance\pgf at y-\boxdepth}%
-	\anchor{south west}{\dimensions\pgfpointorigin\advance\pgf at x-\halfwidth\advance\pgf at y-\boxdepth}%
-	\backgroundpath{%
-		\dimensions%
-		\pgf at xc\halfwidth%
-		\pgf at yc\halfheight%
-		\pgfmathaddtolength\pgf at xc{-\pgfkeysvalueof{/pgf/outer xsep}}%
-		\pgfmathaddtolength\pgf at yc{-\pgfkeysvalueof{/pgf/outer ysep}}%
-		      
-		\pgf at yb\boxdepth%
-		\pgfmathaddtolength\pgf at yb{-\pgfkeysvalueof{/pgf/outer ysep}}%
-		{%
-			\pgfpathrectangle{\pgfqpoint{-\pgf at xc}{-\pgf at yb}}%
-			{%
-				\pgf at x2.0\pgf at xc%
-				\pgf at y2.0\pgf at yc%
-			}%
-			\pgfpathclose%
-		}%
-	}
-	\foregroundpath{
-		\dimensions%
-		{%
-			%
-			% Write block type (symbol)
-			%
-			\pgf at yc\symbolypos
-			\expandafter\pgftext\expandafter[/pgf/text/at=\pgfqpoint{0pt}{\pgf at yc},/pgf/text/center]{%
-				\pgfkeysgetvalue{/pgf/ladder symbol color}{\pgf at lib@sh at temp}%
-				\ifx\pgf at lib@sh at temp\pgfutil at empty%
-				\else%
-					\expandafter\color\expandafter{\pgf at lib@sh at temp}%
-				\fi%
-				{\pgfkeysvalueof{/pgf/ladder symbol}}%
-			}%
-			% Draw inputs.
-			%
-			\pgf at xc-\halfwidth%
-			\pgfmathaddtolength\pgf at xc{\pgfkeysvalueof{/pgf/outer xsep}}
-			\pgf at xa\pgf at xc
-			\pgfmathaddtolength\pgf at xc{\pgfkeysvalueof{/pgf/inner xsep}}
-  			\pgf at yc\inputsep%
-			\pgfmathloop%
-			\ifnum\pgfmathcounter>\numinputs%
-			\else%
-				\advance\pgf at yc-\inputsep%
-				\edef\pgf at lib@sh at temp{\csname inputs-\pgfmathcounter\endcsname}
-				\pgf at xb\pgf at xc
-				\if>\expandafter\pgfutil at first@until at relax\pgf at lib@sh at temp\relax
-                           \edef\pgf at lib@sh at temp{\expandafter\expandafter\expandafter\pgfutil at gobble\pgf at lib@sh at temp}
-					\pgf at ya\pgf at yc
-					\pgfmathsetlength\pgf at yb{\pgfkeysvalueof{/pgf/block ladder clksize}}
-					\pgfmathaddtolength\pgf at ya{0.5\pgf at yb}
-					\pgfpathmoveto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
-					\pgfmathaddtolength\pgf at ya{-0.5\pgf at yb}
-					\pgfmathaddtolength\pgf at xa{\pgf at yb}
-					\pgfpathlineto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
-					\pgfmathaddtolength\pgf at ya{-0.5\pgf at yb}
-					\pgfmathaddtolength\pgf at xa{-\pgf at yb}
-					\pgfpathlineto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
-					\pgfmathaddtolength\pgf at xb{\pgf at yb}
-					\pgfpathclose
-				\fi
-				\expandafter\pgftext\expandafter[/pgf/text/at=\pgfqpoint{\pgf at xb}{\pgf at yc},/pgf/text/left]{%
-					\pgfkeysgetvalue{/pgf/ladder symbol color}{\pgf at lib@sh@@temp}%
-					\ifx\pgf at lib@sh@@temp\pgfutil at empty%
-					\else%
-						\expandafter\color\expandafter{\pgf at lib@sh@@temp}%
-					\fi%
-					{\pgf at lib@sh at temp}%
-				}%
-			\repeatpgfmathloop%
-			% Draw outputs.
-			%
-			\pgf at xc\halfwidth%
-			\pgfmathaddtolength\pgf at xc{-\pgfkeysvalueof{/pgf/inner xsep}}
-			\pgfmathaddtolength\pgf at xc{-\pgfkeysvalueof{/pgf/outer xsep}}
-  			\pgf at yc\outputsep%
-			\pgfmathloop%
-			\ifnum\pgfmathcounter>\numoutputs%
-			\else%
-				\advance\pgf at yc-\outputsep%
-				\expandafter\pgftext\expandafter[/pgf/text/at=\pgfqpoint{\pgf at xc}{\pgf at yc},/pgf/text/right]{%
-					\pgfkeysgetvalue{/pgf/ladder symbol color}{\pgf at lib@sh at temp}%
-					\ifx\pgf at lib@sh at temp\pgfutil at empty%
-					\else%
-						\expandafter\color\expandafter{\pgf at lib@sh at temp}%
-					\fi%
-					{\csname outputs-\pgfmathcounter\endcsname}%
-				}%
-			\repeatpgfmathloop%
-
-		}%
-	} 
-	\anchorborder{%
-		\dimensions%
-		\pgfextract at process\externalpoint{}%
-		\ifdim\pgf at y<0pt%
-			\pgf at process{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\boxdepth}}}%
-		\else%
-			\pgf at yc\halfheight
-			\advance\pgf at yc\halfheight\advance\pgf at yc-\boxdepth
-			\pgf at process{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\pgf at yc}}}%
-		\fi%
-	}%  
-}
-
-
-
-
-% contact
-\pgfdeclareshape{contact ladder}
-{
-  \inheritsavedanchors[from=rectangle ee]
-  \inheritanchor[from=rectangle ee]{center}
-  \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}
-  \inheritanchor[from=rectangle ee]{input}
-  \inheritanchor[from=rectangle ee]{output}
-  \inheritanchorborder[from=rectangle ee]
-  \savedanchor\centerpoint{%
-    \pgf at x.5\wd\pgfnodeparttextbox%
-    \pgf at y.5\ht\pgfnodeparttextbox%
-    \advance\pgf at y-.5\dp\pgfnodeparttextbox%
-  }
-
-  \backgroundpath{
-    \pgf at process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
-    \pgf at xa=\pgf at x \pgf at ya=\pgf at y
-    \pgf at process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}
-    \pgf at xb=\pgf at x \pgf at yb=\pgf at y
-    \pgfpathmoveto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
-    \pgfpathmoveto{\pgfqpoint{\pgf at xa}{\pgf at yb}}
-    \pgfpathlineto{\pgfqpoint{\pgf at xa}{\pgf at ya}}
-    \ifpgfnormallyclosednegated
-       \pgfsetbeveljoin
-       \pgfpathlineto{\pgfqpoint{\pgf at xb}{\pgf at yb}}
-    \else
-       \pgfpathmoveto{\pgfqpoint{\pgf at xb}{\pgf at yb}}
-    \fi
-    \pgfpathlineto{\pgfqpoint{\pgf at xb}{\pgf at ya}}
-  }
-  \foregroundpath{
-    \pgftransformshift{\centerpoint}
-    \pgftext{\pgfkeysvalueof{/pgf/ladder symbol}}
-  }
-}
-
-% coil
-\pgfdeclareshape{coil ladder}
-{
-  \inheritsavedanchors[from=rectangle ee]
-  \inheritanchor[from=rectangle ee]{center}
-  \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}
-  \inheritanchor[from=rectangle ee]{input}
-  \inheritanchor[from=rectangle ee]{output}
-  \inheritanchorborder[from=rectangle ee]
-  \savedanchor\centerpoint{%
-    \pgf at x.5\wd\pgfnodeparttextbox%
-    \pgf at y.5\ht\pgfnodeparttextbox%
-    \advance\pgf at y-.5\dp\pgfnodeparttextbox%
-  }
-
-  \backgroundpath{
-    \pgf at process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
-    \pgf at xa=\pgf at x \pgf at ya=\pgf at y
-    \pgf at process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}
-    \pgf at xb=\pgf at x \pgf at yb=\pgf at y
-    
-    \pgfmathsetlength\pgf at xc{\pgfkeysvalueof{/pgf/coil ladder curvature}\pgf at xb-\pgfkeysvalueof{/pgf/coil ladder curvature}\pgf at xa} % uses a reduction of 20% (by default) for beginning of the arcs, if it is 0.5 and width=height we got a circle, do not set to zero
-    \pgfmathsetlength\pgf at yc{.5\pgf at yb-.5\pgf at ya}
-    \pgfmathsetlength\pgf at ya{0.5\pgf at xc + 0.5\pgf at yc*\pgf at yc / \pgf at xc} % radius
-    \advance\pgf at xa by \pgf at xc
-    \advance\pgf at xb by-\pgf at xc
-    \pgfmathsetlength\pgf at yc{\pgf at yc / \pgf at ya}
-    \pgfmathasin{\pgf at yc}
-    \pgfmathsetlength\pgf at yc{\pgfmathresult} % angle
-    \pgfpathmoveto{\pgfqpoint{\pgf at xa}{\pgf at yb}}
-    \pgfpatharc{180-\pgf at yc}{180+\pgf at yc}{\pgf at ya}
-    \ifpgfnormallyclosednegated
-       \pgfsetbeveljoin
-       \pgfpathlineto{\pgfqpoint{\pgf at xb}{\pgf at yb}}
-    \else
-       \pgfpathmoveto{\pgfqpoint{\pgf at xb}{\pgf at yb}}
-    \fi
-    \pgfpatharc{\pgf at yc}{-\pgf at yc}{\pgf at ya}
-  }
-  \foregroundpath{
-    \pgftransformshift{\centerpoint}
-    \pgftext{\pgfkeysvalueof{/pgf/ladder symbol}}
-  }
-}
-\makeatother
-
-\tikzset{
-  circuit declare symbol=contact NO,
-  circuit declare symbol=contact NC,
-  circuit declare symbol=var contact NC,
-  circuit declare symbol=contact P,
-  circuit declare symbol=contact N,
-  circuit declare symbol=coil,
-  circuit declare symbol=coil NA,
-  circuit declare symbol=var coil NA,
-  circuit declare symbol=coil S,
-  circuit declare symbol=coil R,
-  circuit declare symbol=block,
-  set contact NO graphic={
-    circuit symbol lines,
-    circuit symbol size=width 1.5 height 2,
-    transform shape,
-    shape=contact ladder
-  },
-  set contact NC graphic={
-    circuit symbol lines,
-    circuit symbol size=width 1.5 height 2,
-    transform shape,
-    crossed ladder=true,
-    shape=contact ladder
-  },
-  set var contact NC graphic={
-    circuit symbol lines,
-    circuit symbol size=width 1.5 height 2,
-    transform shape,
-    ladder symbol=\pgfkeysvalueof{/pgf/var contact NC ladder symbol},
-    shape=contact ladder
-  },
-  set contact P graphic={
-    circuit symbol lines,
-    circuit symbol size=width 1.5 height 2,
-    transform shape,
-    ladder symbol=\pgfkeysvalueof{/pgf/contact P ladder symbol},
-    shape=contact ladder
-  },
-  set contact N graphic={
-    circuit symbol lines,
-    circuit symbol size=width 1.5 height 2,
-    transform shape,
-    ladder symbol=\pgfkeysvalueof{/pgf/contact N ladder symbol},
-    shape=contact ladder
-  },
-  set coil graphic={
-    circuit symbol lines,
-    fill=none,
-    circuit symbol size=width 2.4 height 2,
-    transform shape,
-    shape=coil ladder
-  },
-  set coil NA graphic={
-    circuit symbol lines,
-    circuit symbol size=width 2.4 height 2,
-    crossed ladder=true,
-    transform shape,
-    shape=coil ladder
-  },
-  set var coil NA graphic={
-    circuit symbol lines,
-    circuit symbol size=width 2.4 height 2,
-    ladder symbol=\pgfkeysvalueof{/pgf/var coil NA ladder symbol},
-    transform shape,
-    shape=coil ladder
-  },
-  set coil S graphic={
-    circuit symbol lines,
-    circuit symbol size=width 2.4 height 2,
-    ladder symbol=\pgfkeysvalueof{/pgf/coil S ladder symbol},
-    transform shape,
-    shape=coil ladder
-  },
-  set coil R graphic={
-    circuit symbol lines,
-    circuit symbol size=width 2.4 height 2,
-    ladder symbol=\pgfkeysvalueof{/pgf/coil R ladder symbol},
-    transform shape,
-    shape=coil ladder
-  },
-  set block graphic={
-    circuit symbol lines,
-    circuit symbol size=width 2.4 height 2,
-    ladder symbol=\pgfkeysvalueof{/pgf/block ladder symbol},
-    transform shape,
-    inner sep=.5ex,
-    shape=block ladder,
-    every ladder block/.try
-  }
-}
\ No newline at end of file



More information about the tex-live-commits mailing list