summaryrefslogtreecommitdiff
path: root/dimen.tex
blob: 0be3eca9a86dc3bb298190204676be05fb2d009c (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
\font\musicfnt=musix20
\def\mb#1{{\musicfnt\musicfnt\char#1}}
\newdimen\wid
\newdimen\inc
\newdimen\here
\def\hruler#1{%
	\wid=#1pt
	\inc=\wid
	\divide\inc by #1
	\divide\wid by 2
	\here=-\wid
	\loop\ifdim\here<\wid\advance\here by\inc
		\hbox to0pt{\kern\here\vrule width0.05pt height 2pt\hss}%
	\repeat%
}
\def\vruler#1{%
	\wid=#1pt
	\inc=\wid
	\divide\inc by #1
	\divide\wid by 2
	\here=-\wid
	\loop\ifdim\here<\wid\advance\here by\inc
		\vbox to0pt{\vskip\here\vrule width2pt height 0.05pt\vss}%
	\repeat%
}
\def\twhrul{\hbox to 0pt{\hbox{\hruler{20}\vrule
	width0.1pt height 3ptdepth 1pt}}}
\def\twvrul{\hbox{\vbox to 20pt{\vruler{20}\vrule
	width3pt height 0.1pt}}}
 
\def\doitem#1{
	#1 %
	 %\twvrul%doesn't work
	\hbox to 50pt{\qquad\twhrul\mb{#1}\hss}\setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}

\newcount\n
\def\charn{\n=0
	\loop\ifnum\n<255\advance\n by1
	\doitem{\number\n}\endgraf\repeat}


	\charn






\bye