File: Wheat.m4

package info (click to toggle)
texlive-base 2020.20210202-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 791,092 kB
  • sloc: perl: 45,038; sh: 4,926; makefile: 4,655; ansic: 2,266; ruby: 2,231; tcl: 2,156; xml: 1,874; python: 822; cpp: 695; awk: 606; lisp: 199; sed: 8
file content (20 lines) | stat: -rw-r--r-- 442 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.PS
# `Wheat.m4'
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 "}"
    }
  }

.PE