Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/dpv/ArrowFnDPV.m4

raw
1 .PS
2 # ArrowFnDPV.m4
3 # https://tex.stackexchange.com/questions/581089/arrow-function-diagrams
4 gen_init
5 brad = 0.04
6 bht = 0.4
7 bwid = 0.25
8 define(`rbox',`box rad brad outlined "Orange"')
9
10 B1: [
11 svg_font(Times,14bp__)
12 linethick = 1.2
13 arrowwid = 0.08
14 rbox wid 5*boxwid ht 3/2*boxwid
15 line from last box.w-(bht/4,0) "svg_it(X)" above ljust
16 T: Here
17 arrow up bwid right bwid then right bwid
18 F: rbox ht bht "svg_it(f)"
19 {"svg_it(Y)" above ljust }
20 arrow down bwid right bwid from T then right boxwid + bwid*3/2
21 G: rbox ht bht "svg_it(g)"
22 {"svg_it(Z)" above ljust }
23 S: circle diam bht "svg_it(+)" at (G.e.x+boxwid,(F.y+G.y)/2)
24 d = F.y-S.nw.y
25 arrow from F.e to S.nw+(-d,d) then to S.nw
26 arrow from G.e to S.sw+(-d,-d) then to S.sw
27 arrow right from S.e
28 command "</g>" # end font
29 ]
30 [
31 svg_font(Times,11bp__)
32 bht = bht/2
33 sbwid = boxwid*3/4
34 bbwid = sbwid*5/4
35 dh = bht/2
36 B1: rbox wid bbwid ht bbwid
37 B2: rbox wid sbwid*3/2 ht bbwid at B1+(3/2*bbwid,0)
38 B3: rbox wid bbwid ht bbwid at B2+(3/2*bbwid,0)
39 B4: rbox wid sbwid*3/2 ht bbwid at B3+(3/2*bbwid,0)
40 B5: rbox wid bbwid ht bbwid at B4+(3/2*bbwid,0)
41 F: rbox ht bht wid sbwid at B2.n-(0,bht*3/4) "svg_it(f)"
42 BR: B2.s+(0,B2.n.y-F.y)
43 G: rbox ht bht wid sbwid at (B4,F) "svg_it(g)"
44 S: circle diam bht*3/2 at B5+(bht/2,0) "svg_it(+)"
45 arrow right from S.e
46 T: B1.w+(dh,0)
47 B: rbox ht bbwid*5/4 wid boxwid*7.25 with .w at T-(sbwid*3/4,0)
48 { line from T left sbwid "svg_it(x)" above ljust }
49 arrow from T to (B1.e-(dh,0),F) then to F.w
50 arrow from F.e to (B3.w+(dh,0),F) then to (B3.e-(dh,0),BR)
51 continue to (B5.w+(dh,0),Here) then to S.sw
52 line thick 5 outlined "white" from B3.sw to B3.ne chop brad
53 arrow from T to (B1.e-(dh,0),BR) then to (B3.w+(dh,0),BR) \
54 then to (B3.e-(dh,0),G) then to G.w
55 arrow from G.e to (B5.w+(dh,0),G) then to S.nw
56 command "</g>" # end font
57 ] with .nw at B1.sw+(0,-0.2)
58
59 .PE