11 Symtables::operator()(String s)
13 if (!done_reading){ // read on demand
14 *mlog << '(' << fname ;
19 return Assoc<String, Symtable*>::operator[](s);
25 Text_db symini(fname);
26 while (!symini.eof()) {
27 Text_record r( symini++);
28 assert (r[0] == "table");
31 Symtable * sp = new Symtable;
32 while (!symini.eof()){
42 for (int j=0; j < 4; j++)
43 dims.add( r[i++].fvalue() *1.0/CM_TO_PT);
45 Symbol s(tex, Box(dims));
52 Symtables the_sym_tables("symbol.ini");
56 Symbol::find_ball(int i)
60 Symtable * st = the_sym_tables("balls");
61 return &(*st)[String(j)];
66 Symbol::find_rest(int i)
69 return &(*the_sym_tables("rests"))[String(j)];
72 Symbol::find_bar(String s)
74 return &(*the_sym_tables("bars"))[s];
76 /****************************************************************/
79 struct Linestaf_symbol : Stretchable_symbol {
81 String operator ()(Real w);
82 Linestaf_symbol(int n) { lines = n;}
83 Interval height(Real) const { return Interval(0,lines*1/CM_TO_PT); }
88 // should be done in TeX
90 Linestaf_symbol::operator()(Real w)
93 s += "\\hbox to 0pt{";
95 for (int i=0; i<lines; i++) {
96 if (i) s+= "\\vskip1pt";
97 s+= "\\hrule width " + String(w* HOR_TO_PT) +"pt";
103 const Stretchable_symbol *
104 Stretchable_symbol::get_linestaff(int n)
106 return new Linestaf_symbol(n);