diff options
author | Norbert Preining <norbert@preining.info> | 2022-10-14 03:01:58 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-10-14 03:01:58 +0000 |
commit | 1c0d5e0721918b8ee790c9f1c11f1543e0403322 (patch) | |
tree | 945544ad8dae56580c1578e1d2c96c7fe0fc29eb /graphics/circuit_macros/libcct.m4 | |
parent | ba720f8eaac74c537fb16f8556e4cf0ab4cd8235 (diff) |
CTAN sync 202210140301
Diffstat (limited to 'graphics/circuit_macros/libcct.m4')
-rw-r--r-- | graphics/circuit_macros/libcct.m4 | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/graphics/circuit_macros/libcct.m4 b/graphics/circuit_macros/libcct.m4 index 16ae9ba91e..5ce00640ac 100644 --- a/graphics/circuit_macros/libcct.m4 +++ b/graphics/circuit_macros/libcct.m4 @@ -1,7 +1,7 @@ divert(-1) libcct.m4 -* Circuit_macros Version 9.9, copyright (c) 2022 J. D. Aplevich under * +* Circuit_macros Version 10.0, 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 * @@ -450,6 +450,7 @@ define(`rarrow',`define(`m4h',`min(lin_leng(last line),linewid)/2')dnl `inductor( linespec, W|L, cycles, M|P|K[n], loop wid ) W=wide arcs (default narrow); L=looped arcs + arg3= integer (number of loops) arg4= M[n]=metal core P[n]=(ferrite) powder core (dashed lines) K[n]=long-dashed core lines @@ -459,7 +460,7 @@ define(`rarrow',`define(`m4h',`min(lin_leng(last line),linewid)/2')dnl define(`inductor',`eleminit_(`$1') define(`m4hlw',`ifelse(`$5',,`dimen_/10',`($5)/2')')dnl half loop wid define(`m4n',`ifelse(`$3',,4,`$3')')dnl - ifelse(`$2',W, `define(`m4wd',((2*m4n-2)*m4c2t+2)*m4hlw)', + ifelse(`$2',W, `define(`m4wd',((2*m4n-2)*m4c2t+2*m4ct)*m4hlw)', `$2',L, `define(`m4wd',(m4n+1)*m4hlw)', `define(`m4ht',`ifelse(`$5',,`dimen_/16',(`$5')/2)')dnl half other loop wid define(`m4wd',m4n*m4ht*2)')dnl @@ -2010,6 +2011,7 @@ define(`m4_rad_arr',`{{`$1': line invis to rrot_(m4_len,0,ang)} `thyristor(linespec, [SCR|SCS|SUS|SBS|IEC][chars]) Composite element in [ ] block + (To place as two-terminal, see thyristor_t()). SCR: silicon controlled rectifier (default) SCS: silicon controlled switch SUS: silicon unilateral switch @@ -2064,22 +2066,30 @@ define(`thyristor', `m4gen_d( LG'xtract(m4thx,G)`uA`'m4thAc`'HdQ`'m4thAc`'R,m4thf)')') ifinstr(m4thf,E,`Env: circle diam m4thyd with .c at rvec_(rp_len/2,0)') `$3']')')') + `thyristor_t(linespec, thyristor chars], label) + A wrapper to place thyristor(linespec,...) + as a two-terminal element with arg3 + as label of the [] block (see also scr())' +define(`thyristor_t',`eleminit_(`$1') + M4_thyS: last line.start; M4_thyE: last line.end + ifelse(`$3',,,`$3:') thyristor(from M4_thyS to M4_thyE,`$2',`$4') \ + with .A at M4_thyS; line invis from M4_thyS to M4_thyE') `scr(linespec, [R][E], label) and similar Place thyristor as a two-term element with arg 3 as label of the [] block' define(`scr',`eleminit_(`$1'); M4_scrS: last line.start; M4_scrE: last line.end ifelse(`$3',,,`$3:') thyristor(from M4_scrS to M4_scrE,SCR`'`$2',`$4') \ - with .A at M4_scrS') -define(`scs',`eleminit_(`$1'); M4_scrS: last line.start; M4_scrE: last line.end - ifelse(`$3',,,`$3:') thyristor(from M4_scrS to M4_scrE,SCS`'`$2'`',`$4') \ - with .A at M4_scrS') -define(`sus',`eleminit_(`$1'); M4_scrS: last line.start; M4_scrE: last line.end - ifelse(`$3',,,`$3:') thyristor(from M4_scrS to M4_scrE,SUS`'`$2'`',`$4') \ - with .A at M4_scrS') -define(`sbs',`eleminit_(`$1'); M4_scrS: last line.start; M4_scrE: last line.end - ifelse(`$3',,,`$3:') thyristor(from M4_scrS to M4_scrE,SBS`'`$2'`',`$4') \ - with .A at M4_scrS') + with .A at M4_scrS; line invis from M4_scrS to M4_scrE') +define(`scs',`eleminit_(`$1'); M4_scsS: last line.start; M4_scsE: last line.end + ifelse(`$3',,,`$3:') thyristor(from M4_scsS to M4_scsE,SCS`'`$2',`$4') \ + with .A at M4_scsS; line invis from M4_scsS to M4_scsE') +define(`sus',`eleminit_(`$1'); M4_susS: last line.start; M4_susE: last line.end + ifelse(`$3',,,`$3:') thyristor(from M4_susS to M4_susE,SUS`'`$2',`$4') \ + with .A at M4_susS; line invis from M4_susS to M4_susE') +define(`sbs',`eleminit_(`$1'); M4_sbsS: last line.start; M4_sbsE: last line.end + ifelse(`$3',,,`$3:') thyristor(from M4_sbsS to M4_sbsE,SBS`'`$2',`$4') \ + with .A at M4_sbsS; line invis from M4_sbsS to M4_sbsE') `tgate( linespec, [B][R|L] ) Transmission gate B= box form @@ -2131,11 +2141,10 @@ define(`ptrans',`[ eleminit_(`$1') define(`m4ptm',ifinstr(`$2',L,-)) define(`tline',`eleminit_(`$1') define(`m4v',`ifelse(`$2',,`dimen_/6',`($2)')')dnl define(`m4h',`ifelse(`$3',,`dimen_*2/3',min(rp_len-m4v/2,`$3'))')dnl - {[box invis ht_ m4v wid_ m4h+m4v/2] at last line.c} {line from last line.c+vec_(m4h/2+m4v/4,0) \ to last line.end} {line to 2nd last line.c+vec_(-m4h/2,0); round - ifdpic( + [ifdpic( `line from rvec_(0,-m4v/2) \ to rvec_(m4h,-m4v/2) spline 0.5523 to rvec_(m4v/4,0) \ @@ -2159,8 +2168,8 @@ define(`tline',`eleminit_(`$1') then to Here \ then to rvec_(-m4v/2,0) \ then to rvec_(-m4v/2,-m4v)\ - then to rvec_(0,-m4v)') } - line to 5th last line.end invis ') + then to rvec_(0,-m4v)')] with .c at rvec_(m4h/2,0) } + line to 3rd last line.end invis ') define(`m4_U',`dimen_/10') `Semiconductor grid size' define(`m4_Aht',`m4_U*10/6') `Semiconductor arrowhead ht and wd' @@ -2935,7 +2944,8 @@ define(`contacts',`[ Arg 2 deprecated, kept for compatibility chars: O|C= normally open, normally closed (default) - I= open circles for contacts + I= open dots for contacts + X= filled dots P= three position R= right orientation (default left) T= T contacts @@ -2943,12 +2953,13 @@ define(`contacts',`[ define(`contact',`[ dnl define(`m4pm',`ifelse(ifinstr(`$1',R,R,`$2',R,R),R,-)')dnl define(`m4dr',`dotrad_')define(`m4TL',dimen_/12)dnl - P: dot(,m4dr,1) + define(`m4fll',`ifinstr(`$1',X,,1)')dnl + P: dot(,m4dr,m4fll) T: P+vec_(dimen_/2-dimen_/12,0) ifinstr(`$1',P,`ifinstr( `$1',I, - `{C: dot(at T+vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,1)} - {O: dot(at T-vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,1)} + `{C: dot(at T+vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,m4fll)} + {O: dot(at T-vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,m4fll)} A: line from P to ifinstr( `$1',O,`(LCtangent(P,O,dotrad_+lthick/2)) chop m4dr chop -m4dr', `$1',C,`(LCtangent(P,C,dotrad_+lthick/2,R)) chop m4dr chop -m4dr', @@ -2990,7 +3001,7 @@ define(`contact',`[ dnl `move to T ifinstr( `$1',I, - `{ C: dot(at rvec_(0,m4pm`'(m4dr+lthick/2)),m4dr,1) } + `{ C: dot(at rvec_(0,m4pm`'(m4dr+lthick/2)),m4dr,m4fll) } ifinstr(m4CO,O,,`O: Here')', `$1',U, `{C: T+vec_(m4TL*2,m4pm`'(dimen_/6)) @@ -3009,7 +3020,7 @@ define(`contact',`[ dnl `move to T+vec_(0,-(m4pm`'dimen_/8)) ifinstr( `$1',I, - `{O: dot(at rvec_(0,m4pm`'(-m4dr*2)),m4dr,1) } + `{O: dot(at rvec_(0,m4pm`'(-m4dr*2)),m4dr,m4fll) } ifinstr(m4CO,C,,`C: T ')', `$1',U, `{O: T+vec_(m4TL*2,m4pm`'(-dimen_/6)) @@ -3027,7 +3038,6 @@ define(`contact',`[ dnl ') `$3'] ') - `relaycoil( chars, wid, ht, U|D|L|R|degrees ) chars: (see IEC 60617 S00305 - S00319) X or default: external lines from A2 and B2 |