diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-31 21:18:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-31 21:18:52 +0000 |
commit | ce57a48ad32828c6b55ab174a7ae857475dbdd22 (patch) | |
tree | 201dd15a66a2f8a0323070835f4ab46739decb2b /Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty | |
parent | 4071c391a929d5e37fc50476a19c15f32eaaeb93 (diff) |
circuitikz (31aug19)
git-svn-id: svn://tug.org/texlive/trunk@52002 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty')
-rw-r--r-- | Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty b/Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty index d158bb21a52..5e11576ca24 100644 --- a/Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty +++ b/Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ctikzmanutils}[2019/04/14 utilities for formatting circuitikz manual] +\ProvidesPackage{ctikzmanutils}[2019/07/26 utilities for formatting circuitikz manual] \RequirePackage{ifthen} \RequirePackage{xparse} \RequirePackage{showexpl} @@ -27,6 +27,16 @@ } % filling color for filled-enabled component \colorlet{fillcol}{cyan!30!white} +% find the class for the element. Thanks to Symbol 1 +% https://tex.stackexchange.com/a/501389/38080 +\def\checkclass#1{% + \csname pgf@sh@ma@#1\endcsname + \ifdefined\ctikzclass + Class: \texttt{\ctikzclass}.% + \else + No class.% + \fi +} % description of a node component: % optional star for fillable % optional: scale of the component in the entry @@ -51,7 +61,9 @@ \end{circuitikz}% }{\sloppy% {#4, type: node\IfBooleanT{#1}{, fillable}% - } (\texttt{node[#3]\IfValueT{#7}{(N)}\{#5\}}) \index{#3} } + } (\texttt{node[#3]\IfValueT{#7}{(N)}\{#5\}}). \index{#3}% + \checkclass{N}% + }% } % description of a path-style component: % optional: main name, if different from above @@ -80,14 +92,13 @@ \IfValueT{#7}{, \texttt{name=B}}% \IfValueTF{#2}{, nodename: #2shape.%\drawphantomshape{#2shape}% }{, nodename: #3shape.%\drawphantomshape{#3shape}% - } + }% }% - \ifthenelse{\equal{#5}{}}{}{% - Aliases: \texttt{#5}.}% - } + \ifthenelse{\equal{#5}{}}{ }{% + Aliases: \texttt{#5}. }\checkclass{B}% + }% } - %new environment for grouping descriptions \newenvironment{groupdesc}{\medskip\begingroup}{\endgroup\par\medskip\par\noindent} |