diff options
author | Karl Berry <karl@freefriends.org> | 2019-09-05 22:33:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-09-05 22:33:48 +0000 |
commit | e25c6ee4ea5169bf31ab28ebddcc94c8b4992453 (patch) | |
tree | 855a21705c8e75ed71066d3e6215752d04dd43ba /Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 | |
parent | 1047c66359c02d8f8852e0dbdd69f5cf1cd1a76b (diff) |
circuit-macros (all except boxdims.sty in doc due to generic file names)
git-svn-id: svn://tug.org/texlive/trunk@52035 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4')
-rw-r--r-- | Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 new file mode 100644 index 00000000000..ef1d2158091 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 @@ -0,0 +1,44 @@ +.PS +#MC.m4 +cct_init(svg_font(Times,11bp__)) +textoffset = 3bp__ + + dv = dimen_*0.6 + dh = dimen_*0.4 + backup = dimen_/6 + + for i=1 to 3 do {{ + if i==2 then { Input: dot } else { line up (2-i)*dv } + source(right_ dimen_,AC) +# The pound sign has to be protected from m4 + llabel(,,sprintf("svg_it(v`'svg_sub(&``#''%g;,66%))",96+i)) + resistor(right_ dimen_ from Here-(backup/2,0)) + if i==1 then { llabel(,R`'svg_sub(i))} + inductor(right_ dimen_ from Here-(backup,0),W) + if i==1 then { llabel(,L`'svg_sub(i))} + line right_ i*dh + b_current(sprintf("svg_it(i`'svg_sub(&``#''%g;,66%))",96+i)); dot + { line down (3-i)*dv; capacitor(down_ dimen_) + if i==1 then { rlabel(,C`'svg_it(i)) } + if i==2 then { dot } else { line right (2-i)*dh }} + line right 3*dh; dot + E: Here+((3-i)*dh+dimen_*2,(4-2*i)*dv) + for j=1 to 3 do {{ + line up (6-j*3)*dv then right (3-i)*dh + switch(right_ E.x-Here.x) + llabel(,,sprintf("svg_it(S`'svg_sub(&``#''%g;&``#''%g;,66%))",96+i,64+j)) + if i==2 then { dot } else { line down (2-i)*dv } + }} + line from E right dh then down E.y-Here.y + arrow right dimen_/2 + { sprintf("svg_it(i`'svg_sub(&`#'%g;,66%))",64+i) above } + resistor(right_ dimen_ from Here-(arrowht/2,0)) + if i==1 then {llabel(,R`'svg_sub(o))} + inductor(right_ dimen_ from Here-(backup,0),W) + if i==1 then {llabel(,L`'svg_sub(o))} + source(right_ dimen_,AC) + llabel(sprintf("svg_it(v`'svg_sub(&``#''%g;,66%))",64+i)) + if i==2 then { Output: dot } else { line down (2-i)*dv } + }} + command "</g>" # end font +.PE |