flower-1.1.6
[lilypond.git] / dimen.tex
blobe53263181d0802276d372c8fb7ed561d868e1fba
1 \font\musicfont=musixsps
2 \font\slurfont=xslu16
3 \def\thefont{\musicfont}
5 \def\mb#1{{\thefont\char#1}}
7 \newdimen\wid
8 \newdimen\inc
9 \newdimen\here
10 \def\hruler#1{%
11 \wid=#1pt
12 \inc=\wid
13 \divide\inc by #1
14 \divide\wid by 2
15 \here=-\wid
16 \loop\ifdim\here<\wid\advance\here by\inc
17 \hbox to0pt{\kern\here\vrule width0.05pt height 2pt\hss}%
18 \repeat%
21 \def\vruler#1{%
22 \wid=#1pt
23 \inc=\wid
24 \divide\inc by #1
25 \divide\wid by 2
26 \here=-\wid
27 \loop\ifdim\here<\wid\advance\here by\inc
28 \vbox to0pt{\vskip\here\vrule width2pt height 0.05pt\vss}%
29 \repeat%
31 \def\twhrul{\hbox to 0pt{\hbox{\hruler{20}\vrule
32 width0.1pt height 3ptdepth 1pt}}}
33 \def\twvrul{\hbox{\vbox to 20pt{\vruler{20}\vrule
34 width3pt height 0.1pt}}}
36 \def\doitem#1{
37 #1 %
38 %\twvrul%doesn't work
39 \hbox to 50pt{\qquad\twhrul\mb{#1}\hss}\setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}
41 \newcount\n
42 \def\charn{\n=-1
43 \loop\ifnum\n<255\advance\n by1
44 \doitem{\number\n}\endgraf\repeat}
47 \charn
49 \bye