]> git.donarmstrong.com Git - lilypond.git/blob - tex/dimen.tex
release: 0.1.7
[lilypond.git] / tex / dimen.tex
1 %
2 % A tex file to help determine dims.
3 %
4
5 \font\musicfont=musix16
6 \font\slurfont=xslu16
7 \font\specfont=musixspx
8 \def\thefont{\musicfont}
9 %\def\thefont{\specfont}
10
11 \def\mb#1{{\thefont\char#1}}
12
13 \newdimen\wid
14 \newdimen\inc
15 \newdimen\here
16 \def\hruler#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                 \hbox to0pt{\kern\here\vrule width0.05pt height 1pt depth 1pt\hss}%
24         \repeat%
25 }
26
27 \def\vruler#1{%
28         \wid=#1pt
29         \inc=\wid
30         \divide\inc by #1
31         \divide\wid by 2
32         \here=-\wid
33         \loop\ifdim\here<\wid\advance\here by\inc
34                 \hbox to0pt{\vbox to0pt{\vss\hrule width2pt height 0.05pt\kern\here}\hss}%
35         \repeat%
36 }
37 \def\twhrul{\hbox to 0pt{\hbox{\hruler{20}%
38         \vrule width0.1pt height 2pt depth 2pt}}}
39 \def\twvrul{\vbox to0pt{\vss\hbox to0pt{\hss\vruler{12}}\vss}%
40         \kern-1pt\vrule width4pt height 0.1pt}%
41         
42  
43 \def\doitem#1{
44         #1%
45         \vbox to12pt{\vfill\hbox to0pt{\qquad\kern-1pt\twvrul\hss}}%
46         \hbox to50pt{\qquad\twhrul\mb{#1}\hss}%
47         \setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}
48
49 \newcount\n
50 \def\charn{\n=-1
51         \loop\ifnum\n<255\advance\n by1
52         \doitem{\number\n}\endgraf\repeat}
53
54
55         \charn
56
57 \bye