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