]> mj.ucw.cz Git - ga.git/blob - all/preprocess
Ruzne typograficke drobnosti.
[ga.git] / all / preprocess
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 foreach my $f (@ARGV) {
7         my $d = $f;
8         $d =~ s@/[^/]*$@/@;
9         open X, $f or die;
10         while (<X>) {
11                 /^\\input .*sgr\.tex/ && next;
12                 /^\\references/ && next;
13                 /^\\bye/ && last;
14                 s@\\(figure|fig|epsfbox){([^}]+)}@\\$1\{$d$2}@g;
15                 print;
16         }
17         close X;
18         print "\\chapterend\n";
19 }