3 foreach $filename (@ARGV) {
5 open(TEXFILE, "<$filename");
7 $notes_filename = $filename;
8 $notes_filename =~ s/\.tex$/.pdfpc/;
10 $pdf_filename = $filename;
11 $pdf_filename =~ s/\.tex$/.pdf/;
13 open(NOTESFILE, "\>$notes_filename");
14 print NOTESFILE "[file]\n$pdf_filename\n[notes]\n";
18 while ($line = <TEXFILE>) {
19 # if this is a new frame
20 if ($line =~ /^\\begin\{frame\}/) {
24 if ($line =~ /^\% pdfpc\:end/) {
27 print NOTESFILE "\#\#\# $slide_counter\n$note_text\n";
30 # record if we're between a begin and an end
33 $line_tmp =~ s/^\%\s*//;
34 $note_text = $note_text . $line_tmp;
38 if ($line =~ /^\% pdfpc\:begin/) {