diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4')
-rw-r--r-- | Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4 | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4 index a797c81e96a..c70fa8fc74d 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Wheat.m4 @@ -4,17 +4,18 @@ gen_init boxwid = boxht -for j = 0 to 7 do { - for i = 0 to 7 do { - box fill_((i+j)%2) at (j*boxwid,-i*boxwid) - x = 2^(j+8*i) - if (i+j)%2==0 then { command "{\white" } else { command "{\black" } - if x < 10000 then { sprintf("\Large$%g$",x) at last box } \ - else { y = int(log(x)) - sprintf("{\Large$%g$}$\cdot 10^{%g}$",round_(x/(10^y)),y) \ - at last box } - command "}" +[ for j = 0 to 7 do { + for i = 0 to 7 do { + x = 2^(j+8*i) + box fill_((i+j)%2) at (j*boxwid,-i*boxwid) + k = ((i+j)%2==0); setrgb(k,k,k) + if x < 10000 then { sprintf("\Large$%g$",x) at last box } \ + else { y = int(log(x)) + sprintf("{\Large$%g$}$\cdot 10^{%g}$",round_(x/(10^y)),y) at last box } + resetrgb + } } - } + ] +box wid 8*boxwid ht 8*boxwid at last [] .PE |