2 tex.cc -- implement TeX related misc functions
4 source file of the GNU LilyPond music typesetter
6 (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "dimension.hh"
17 return String ("\\vrule height ") + print_dimen (h
) + "depth 0pt width 0pt";
22 substitute_arg (String
& r
, String arg
)
24 int p
= r
.index_i ('%');
28 r
= r
.left_str (p
) + arg
+ r
.right_str (r
.length_i() - p
-1);
33 substitute_args (String source
, Array
<String
> args
)
35 String
retval (source
);
36 for (int i
= 0 ; i
< args
.size(); i
++)
37 substitute_arg (retval
, args
[i
]);
42 substitute_args (String source
, Array
<Scalar
> args
)
45 for (int i
= 0 ; i
< args
.size(); i
++)
48 return substitute_args (source
, sv
);