summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m4
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-09-05 22:33:48 +0000
committerKarl Berry <karl@freefriends.org>2019-09-05 22:33:48 +0000
commite25c6ee4ea5169bf31ab28ebddcc94c8b4992453 (patch)
tree855a21705c8e75ed71066d3e6215752d04dd43ba /Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m4
parent1047c66359c02d8f8852e0dbdd69f5cf1cd1a76b (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/Counting.m4')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m426
1 files changed, 26 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m4
new file mode 100644
index 00000000000..18002ba99ff
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Counting.m4
@@ -0,0 +1,26 @@
+.PS
+# Counting.m4
+gen_init
+
+ g = 0.4 # grid size
+ define grid { (($2)*g,-($1)*g) }
+ circlerad = 0.1
+
+for i=1 to 4 do {
+ sprintf(`"$S_%g$:"',i) ljust at grid(i,-0.5)
+ for j=1 to 4 do { if i+j < 8 then {
+ sprintf(`"$s_{%g%g}$"',i,j) at grid(i,j) } } }
+
+"$\vdots$" at grid(4.75,0)
+for i=1 to 3 do { `"$\cdots$"' at grid(i,5) }
+"$\cdots$" at grid(4,4)
+
+P: grid(1,1)
+for k=3 to 5 do {
+ for i=1 to k-1 do { if (k%2==1) then { m=i; n=k-i } else { m=k-i; n=i }
+ Q: grid(m,n)
+ arrow from P to Q chop
+ P: Q }
+ }
+
+.PE