commit 5f0e4b3ff4d372364aa232004f719f04f2eaaed8
parent 50486a684f8ea6ad1cb3148318cb5ae87892a617
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Fri, 24 Jan 2014 12:13:24 +0100
NOTOC
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/shorthand.pl b/shorthand.pl
@@ -64,6 +64,9 @@ my $header2 = <<END;
\\end{frame}
}
}
+END
+
+my $header3 = <<END;
\\begin{document}
\\begin{frame}
@@ -75,16 +78,22 @@ END
print $header;
my $defaultlang = "";
+my $toc = 1;
while (<>) {
last if /^$/;
if (/^\\usepackage\[[^]]*,([^\],]*)\]{babel}/) {
$defaultlang = $1;
}
+ if (/NOTOC/) {
+ $toc = 0;
+ next;
+ }
print;
}
-print $header2;
+print $header2 if $toc;
+print $header3;
while (<>) {
my $l = $_;