10 return "$outdir/$outname$mudcount.ly";
15 return "$outdir/$outname$mudcount.tex";
22 print MUDELA "}\n \\paper { linewidth = -1.0\\cm; } }\n";
26 print BOOK "\\end{verbatim}\n\\interexample";
31 if ( -f gen_mufile ) {
32 $status = system "diff -q $outdir/book-mudela.ly " . gen_mufile;
37 rename "$outdir/book-mudela.ly", gen_mufile;
41 if ( ! -f gen_texfile) {
42 system "lilypond ". gen_mufile;
43 rename "lelie.tex", gen_texfile;
45 print BOOK "\\preexample\\input " . gen_texfile . "\n\\postexample\n";
53 open MUDELA, ">$outdir/book-mudela.ly";
55 print BOOK "\\begin{verbatim}\n";
58 print MUDELA "\\score { \\melodic {";
66 return (/^\\begin{$s}/) ;
72 return (/^\\end{$s}/) ;
79 $verbatim_b =1 if ($s =~ /verbatim/ );
80 $fragment_b = 1 if ($s =~ /fragment/ );
85 GetOptions( 'outdir=s', 'outname=s');
86 $outdir = $opt_outdir;
87 $outname = $opt_outname if (defined ($opt_outname) && $opt_outname);
88 open INFILE, $ARGV[0];
90 open BOOK, ">$outdir/$outname";
100 $s =~ s/\t/ /g; #shit
105 if (/^\\begin(\[.*\])?{mudela}/ ) {
107 $opts = $1 if ( defined ($1));
109 parse_mudela_opts($opts);