lilypond-1.3.145
[lilypond.git] / tex / dimen.tex
blob59c50fb1e4903349f9612d18db2dac734352c4c2
2 % A tex file to help determine dims.
5 \font\musicfont=musixsps
6 \font\slurfont=xhslu16
7 \font\specfont=musixspx
8 % \def\thefont{\musicfont}
9 %\def\thefont{\specfont}
10 \def\thefont{\slurfont}
12 \def\mb#1{{\thefont\char#1}}
14 \newdimen\wid
15 \newdimen\inc
16 \newdimen\here
17 \def\hruler#1{%
18 \wid=#1pt
19 \inc=\wid
20 \divide\inc by #1
21 \divide\wid by 2
22 \here=-\wid
23 \loop\ifdim\here<\wid\advance\here by\inc
24 \hbox to0pt{\kern\here\vrule width0.05pt height 4pt\hss}%
25 \repeat%
28 \def\vruler#1{%
29 \wid=#1pt
30 \inc=\wid
31 \divide\inc by #1
32 \divide\wid by 2
33 \here=-\wid
34 \loop\ifdim\here<\wid\advance\here by\inc
35 \vbox to0pt{\vskip\here\vrule width2pt height 0.05pt\vss}%
36 \repeat%
38 \def\twhrul{\hbox to 0pt{\hbox{\hruler{20}\vrule
39 width0.1pt height 3ptdepth 1pt}}}
40 \def\twvrul{\hbox{\vbox to 20pt{\vruler{20}\vrule
41 width3pt height 0.1pt}}}
43 \def\doitem#1{
44 #1 %
45 %\twvrul%doesn't work
46 \hbox to 50pt{\qquad\twhrul\mb{#1}\hss}\setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}
48 \newcount\n
49 \def\charn{\n=-1
50 \loop\ifnum\n<255\advance\n by1
51 \doitem{\number\n}\endgraf\repeat}
54 \charn
56 \bye