#!/usr/bin/perl $makepdf = 0; $addslideno = 0; $fname = ""; # Parse command line arguments for ($i = 0; $i ) { chop($line); if ($line =~ /^!\s*ONLYSLIDE\s[0-9]+\-([0-9]+)/) { $nb = $1; if ($count $fname-$slide.gle") || die "Bug"; while ($line=) { chop($line); if ($line =~ /^!\s*ONLYSLIDE\s([0-9]+)\-([0-9]+)/) { $nb1 = $1; $nb2 = $2; if (($slide >= $nb1) && ($slide = $nb) { $enable = 1; } else { $enable = 0; } } else { if ($nb == $slide) { $enable = 1; } else { $enable = 0; } } } else { if ($enable == 1) { print OUT "$line\n"; } } } if ($addslideno == 1) { print OUT "set hei 0.3\n"; print OUT "set just bl\n"; print OUT "amove 0.01 0.01\n"; print OUT "write \"$slide\"\n"; } close(OUT); close(FILE); print "gle_ps /eps $fname-$slide.gle\n"; system("gle_ps /eps $fname-$slide.gle"); if ($makepdf == 1) { system("epstopdf $fname-$slide.eps"); } }