Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/extras/Wheat.m4

raw
1 .PS
2 # `Wheat.m4'
3 gen_init
4
5 boxwid = boxht
6
7 [ for j = 0 to 7 do {
8 for i = 0 to 7 do {
9 x = 2^(j+8*i)
10 box fill_((i+j)%2) at (j*boxwid,-i*boxwid)
11 k = ((i+j)%2==0); setrgb(k,k,k)
12 if x < 10000 then { sprintf("\Large$%g$",x) at last box } \
13 else { y = int(log(x))
14 sprintf("{\Large$%g$}$\cdot 10^{%g}$",round_(x/(10^y)),y) at last box }
15 resetrgb
16 }
17 }
18 ]
19 box wid 8*boxwid ht 8*boxwid at last []
20
21 .PE