10 Symtables::operator()(String s
)
12 if (!done_reading
){ // read on demand
13 *mlog
<< '(' << fname
;
18 return Assoc
<String
, Symtable
*>::operator[](s
);
24 Text_db
symini(fname
);
28 Text_record
r( symini
++);
32 assert (r
[0] == "table");
35 Symtable
* sp
= new Symtable
;
48 for (int j
=0; j
< 4; j
++)
49 dims
.add( r
[i
++].fvalue() *1.0/CM_TO_PT
);
51 Symbol
s(tex
, Box(dims
));
58 Symtables
the_sym_tables("symbol.ini");
62 Symbol::find_ball(int i
)
66 Symtable
* st
= the_sym_tables("balls");
67 return &(*st
)[String(j
)];
72 Symbol::find_rest(int i
)
75 return &(*the_sym_tables("rests"))[String(j
)];
78 Symbol::find_bar(String s
)
80 return &(*the_sym_tables("bars"))[s
];
82 /****************************************************************/
85 struct Linestaf_symbol
: Stretchable_symbol
{
87 String
operator ()(Real w
);
88 Linestaf_symbol(int n
) { lines
= n
;}
90 // should be done in TeX
92 Linestaf_symbol::operator()(Real w
)
95 s
+= "\\hbox to 0pt{";
97 for (int i
=0; i
<lines
; i
++) {
98 if (i
) s
+= "\\vskip1pt";
99 s
+= "\\hrule width " + String(w
* HOR_TO_PT
) +"pt";
105 const Stretchable_symbol
*
106 Stretchable_symbol::get_linestaff(int n
)
108 return new Linestaf_symbol(n
);