summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/libcct.m4')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/libcct.m469
1 files changed, 42 insertions, 27 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4
index 5ce00640ace..3a3e1f398ab 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4
@@ -1,7 +1,7 @@
divert(-1)
libcct.m4
-* Circuit_macros Version 10.0, copyright (c) 2022 J. D. Aplevich under *
+* Circuit_macros Version 10.1, copyright (c) 2022 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
@@ -1977,36 +1977,51 @@ define(`m4gen_d',`{dnl
`line from 0.5 between M4_s and M4_e to M4_e \
chop m4dh ifelse(m4a,,/2,m4a,d,/2+m4dv/4) chop 0')
')dnl
- `em_arrows( type,degrees,length)
- type=[N|I|E][D] N=nonionizing, I=ionizing,
- E=simple; D=dot on arrow stem
- degrees = absolute arrow direction'
-define(`em_arrows',`[ define(`m4dnm_',`ifelse($1,,N,$1)')dnl
+ `em_arrows( type|keys,angle,length )
+ type=N|I|E [D|T]
+ N=nonionizing, I=ionizing, E=simple;
+ D=dot on arrow stem; T=anchor tail
+ keys: type=chars as above;
+ lgth=expr;
+ sep=expr; arrow separation
+ angle=degrees; absolute direction'
+define(`em_arrows',`[
+ pushkeys_(`$1',`type:m4nul:N; angle:ifelse(`$2',,135,`($2)')*dtor_')dnl
+ ifelse(m4type,m4nul,
+ `popdef(`m4type')pushdef(`m4type',`ifelse(`$1',,N,`$1')')')dnl
arrowhead = em_arrowhead
- define(`m4_len',
- `ifelse(`$3',,`dimen_*ifinstr(`$1',E,0.25,0.46)',`($3)')')
- ang = ifelse(`$2',,135,`($2)')*dtor_
- sc_draw(`m4dnm_',N,
- `{ A1: arrow m4c_l to rrot_(m4_len,0,ang) wid em_arrowwid ht em_arrowht }
- move to rrot_(0,-em_arrowwid*9/8,ang)
- { A2: arrow m4c_l to rrot_(m4_len,0,ang) wid em_arrowwid ht em_arrowht } ')
- sc_draw(`m4dnm_',I,`m4_rad_arr(A1)
- move to rrot_(0,-em_arrowwid*9/8,ang); m4_rad_arr(A2)')
- sc_draw(`m4dnm_',E,
- `{ A1: line to rrot_(m4_len,0,ang) \
- then to rrot_(m4_len-dimen_/18,dimen_/18,ang) }
- move to rrot_(0,-dimen_/8,ang)
- { A2: line to rrot_(m4_len,0,ang) \
- then to rrot_(m4_len-dimen_/18,dimen_/18,ang) }')
- sc_draw(`m4dnm_',D,`dot(at A1.start); dot(at A2.start)')
+ sc_draw(`m4type',N,
+ `pushkeys_(`$1',lgth:ifelse(`$3',,dimen_*0.46,`$3'); sep:em_arrowwid*9/8)dnl
+ { A1: arrow m4c_l to rrot_(m4lgth,0,m4angle) wid em_arrowwid ht em_arrowht}
+ move to rrot_(0,-m4sep,m4angle)
+ { A2: arrow m4c_l to rrot_(m4lgth,0,m4angle) wid em_arrowwid ht em_arrowht}')
+ sc_draw(`m4type',I,
+ `pushkeys_(`$1',lgth:ifelse(`$3',,dimen_*0.46,`$3'); sep:em_arrowwid*9/8)dnl
+ m4em_serp(A1)
+ move to rrot_(0,-m4sep,m4angle); m4em_serp(A2)')
+ sc_draw(`m4type',E,
+ `pushkeys_(`$1',lgth:ifelse(`$3',,dimen_*0.25,`$3'); sep:dimen_/8)dnl
+ { A1: line to rrot_(m4lgth,0,m4angle) \
+ then to rrot_(m4lgth-dimen_/18,dimen_/18,m4angle) }
+ move to rrot_(0,-m4sep,m4angle)
+ { A2: line to rrot_(m4lgth,0,m4angle) \
+ then to rrot_(m4lgth-dimen_/18,dimen_/18,m4angle) }')
+ sc_draw(`m4type',D,`dot(at A1.start); dot(at A2.start)')
+ sc_draw(`m4type',T,`m4em_anchor(A1.start); m4em_anchor(A2.start)')
Tail: 0.5 between A1.start and A2.start
Head: 0.5 between A1.end and A2.end
- `$4']')
-define(`m4_rad_arr',`{{`$1': line invis to rrot_(m4_len,0,ang)}
- for_(1,3,1,
- `arc ifelse(m4x,2,c)cw to rrot_(dimen_/10,0,ang) \
- with .c at rrot_(dimen_/20,0,ang)')
+ `$4' popdef(`m4typ',`m4type',`m4angle',`m4lgth',`m4sep') ]')
+define(`m4em_serp',`{{`$1': line invis to rrot_(m4lgth,0,m4angle)}
+ for i=1 to (m4lgth-em_arrowht*3/4)/(em_arrowwid) do {
+ if i%2 then {define m4cw {cw}} else {define m4cw {ccw}}
+ arc m4cw to rrot_(em_arrowwid,0,m4angle) \
+ with .c at rrot_((em_arrowwid)/2,0,m4angle) }; round
arrow m4c_l to `$1'.end wid em_arrowwid ht em_arrowht*3/4 }')
+define(`m4em_anchor',`{ move to `$1'
+ {arc cw to rrot_(0,em_arrowwid/2,m4angle) \
+ with .c at rrot_(0,em_arrowwid/4,m4angle)}
+ {arc to rrot_(0,-arrowwid/2,m4angle) \
+ with .c at rrot_(0,-arrowwid/4,m4angle)}}')
`thyristor(linespec,
[SCR|SCS|SUS|SBS|IEC][chars])