summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/dpv/VariableDPV.m4
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-12-01 03:01:22 +0000
committerNorbert Preining <norbert@preining.info>2022-12-01 03:01:22 +0000
commit77362f5f4b083c21c2044b0c54d228da42804c72 (patch)
tree232ef82c01eeddcc36e279df6e98c1ac6299ea8d /graphics/circuit_macros/examples/dpv/VariableDPV.m4
parentcb9bbbf5f4fdb303e5da460ebf17b50811d06a6a (diff)
CTAN sync 202212010301
Diffstat (limited to 'graphics/circuit_macros/examples/dpv/VariableDPV.m4')
-rw-r--r--graphics/circuit_macros/examples/dpv/VariableDPV.m429
1 files changed, 29 insertions, 0 deletions
diff --git a/graphics/circuit_macros/examples/dpv/VariableDPV.m4 b/graphics/circuit_macros/examples/dpv/VariableDPV.m4
new file mode 100644
index 0000000000..fb23355e87
--- /dev/null
+++ b/graphics/circuit_macros/examples/dpv/VariableDPV.m4
@@ -0,0 +1,29 @@
+.PS
+# `VariableDPV.m4'
+cct_init
+
+define(`elen_',dimen_); down_
+[ { variable(`resistor',A) }; {"svg_tt(A)" at last line.end below}; move right
+ { variable(`resistor',N) }; {"svg_tt(N)" at last line.end below}; move right
+ { variable(`resistor',uN) }; {"svg_tt(uN)" at last line.end below}; move right
+ { variable(`resistor',NN) }; {"svg_tt(uN)" at last line.end below}; move right
+ { variable(`resistor',uNN) }; {"svg_tt(uNN)" at last line.end below}
+ ]
+[
+ skp = 0.4
+ hskip = linewid*0.5
+ cskip = hskip
+Orig: Here
+ { move right cskip+elen_+hskip
+ line invis right_ elen_ "svg_tt(C)"; move right_ hskip
+ { move up_ 0.25 }
+ line invis right_ elen_ "svg_tt(S)" }
+ Loopover_(`char',
+ `move down skp ifelse(char,A,*0.5)
+ { line invis right_ cskip "svg_tt(char)"
+ variable(`capacitor(,C)',char); move right_ hskip
+ variable(`capacitor(,C)',char`'C); move right_ hskip
+ variable(`capacitor(,C)',char`'S) }',
+ A,P,L,N)
+ ] with .w at last [].e+(0.4,0)
+.PE