summaryrefslogtreecommitdiff
path: root/macros/generic/variations/variations.tex
blob: c5b37c58a9ce61e24b4ce8734246175f72e77225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
% Macros pour la composition des tableaux de variations
% Version 0.3 du 13/09/06
% Copyright (c) Christian Obrecht 2005-2006

\catcode`@=11

\font\lf@nt=line10

\def\bvariations{\leavevmode\hbox\bgroup\vbox\bgroup

\def\tc@{{\lf@nt\char0}}
\def\fc@{{\lf@nt\char0}\kern-1em{\lf@nt\char18}}
\def\td@{{\lf@nt\char64}}
\def\fd@{{\lf@nt\char64}\kern-1em{\lf@nt\char82}}

\def\tc@@{{\lf@nt\char8}}
\def\fc@@{{\lf@nt\char8}\kern-1em{\lf@nt\char42}}
\def\td@@{{\lf@nt\char72}}
\def\fd@@{{\lf@nt\char72}\kern-1em{\lf@nt\char106}}

\def\sk@p##1{\vrule height ##1 depth 2pt width 0pt}
\let\@ils=\offinterlineskip

\def\cb{
\vbox{\offinterlineskip\halign{&####\cr
&&\fc@@\cr
&\tc@@\cr
\tc@@\cr
\sk@p{.5em}\cr}}}

\def\db{
\vbox{\@ils\halign{&####\cr
\td@@\cr
&\td@@\cr
&&\fd@@\cr
\sk@p{.5em}\cr}}}

\def\ch{
\vbox{\@ils\halign{&####\cr
\sk@p{.5em}\cr
&&\fc@@\cr
&\tc@@\cr
\tc@@\cr
\sk@p{2.5em}\cr}}}

\def\dh{
\vbox{\@ils\halign{&####\cr
\sk@p{.5em}\cr
\td@@\cr
&\td@@\cr
&&\fd@@\cr
\sk@p{2.5em}\cr}}}

\def\c{
\vbox{\@ils\halign{&####\cr
&&\fc@\cr
&\tc@\cr
\tc@\cr
\sk@p{.75em}\cr}}}

\def\d{
\vbox{\@ils\halign{&####\cr
\td@\cr
&\td@\cr
&&\fd@\cr
&&&\sk@p{.75em}\cr}}}

\newdimen\@w
\@w=.2pt
\newdimen\@l
\setbox100\hbox{0}
\@l=\wd100
\advance\@l by -\@w
\divide\@l by 2
\newdimen\@r
\@r=\@l
\advance\@r by \@w

\def\str@t{\vrule height 10pt depth 4pt width 0pt}
\def\c@##1{\hfil$\str@t##1$\hfil}
\def\@n{\kern.5em}

\def\z{\hbox to 1em{\hfil\str@t\kern\@l\vrule width\@w\kern-\@r0\hfil}}
\def\l{\vrule width\@w}
\def\bb{\vrule\kern1pt\vrule}
\def\bg{\omit\kern1pt\vrule\hfil}
\def\bd{\omit\hfil\vrule\kern1pt}
\def\mI{\,-\infty\,}
\def\pI{\,+\infty\,}

\let\\=\cr
\def\filet{\noalign{\hrule}}
\def\dr##1{\omit\quad\hfil$##1$\hfil&\quad}
\def\ga##1{\quad&\omit\hfil$##1$\hfil\quad}
\def\m##1{\vbox{\@ils\halign{&####\cr$\smash{##1}$\cr\sk@p{2em}\cr}}}
\def\h##1{\vbox{\@ils\halign{&####\cr\str@t${##1}$\cr\sk@p{3.5em}\cr}}}

\hbox\bgroup\vrule\vbox\bgroup
\halign\bgroup\c@{\@n##\@n}\vrule&&\c@{##}\cr\filet}

\def\evariations{\filet\egroup\egroup\vrule\egroup\egroup\egroup}

\catcode`@=12

\endinput