### do the dirty work


@files = <*.tex>;
#@files = ("test.tex");

foreach (@files) {
  next if /^tutorial/;		# don't change tutorial_ files
  print "Working on $_\n";
  $oldfile = "$_.old";
  $newfile = $_;
  system "cp $newfile $oldfile\n";
  open(INFILE,"$oldfile") || die "couldn't open INDFILE: $!";
  open(OUTFILE,">$newfile") || die "couldn't open OUTFL $!";
  while (<INFILE>) {
    s/\\vec/\\bfvec/g;
    print OUTFILE $_;
  }
}
#     if (/(.*)\\htmladdnormallink\{([^\}]+)}\{([^\}]+)\}(.*)/) { ### for double args
# ##     if (/(.*)\\htref\{([^\}]+)\}(.*)/) { # 3 matches
#        print OUTFILE "$1 \\href\{$2\}\{$2\}$3\n";
#      } else {
#        print OUTFILE $_;
#      }
#    }
