]> git.donarmstrong.com Git - lilypond.git/blob - tex/lily-debug.tex
(set_spacing_rods): rewrite to O(n)
[lilypond.git] / tex / lily-debug.tex
1
2 % debugging stuff
3 \def\vruler#1{{%
4         \def\wid{\dimen0}%
5         \def\inc{\dimen1}%
6         \wid=#1pt
7         \inc=\wid
8         \divide\inc by #1
9         \divide\wid by 2
10         \here=-\wid
11         \loop\ifdim\here<\wid\advance\here by\inc
12                 \hbox to0pt{\vbox to0pt{\vss\hrule width2pt height 0.05pt\kern\here}\hss}%
13         \repeat%
14 }}
15 \def\hruler#1#2{\hbox{%
16         \def\wid{\dimen0}%
17         \def\here{\dimen3}%
18         \wid=#1pt
19         \divide\wid by 2
20         \here=-\wid
21         \loop\ifdim\here<\wid\advance\here by #2
22                 \hbox to0pt{\kern\here\vrule width0.05pt height 1pt depth 1pt\hss}%
23         \repeat%
24 }}
25
26