m17n-docs
[m17n/m17n-docs.git] / utils / refman-filter.awk
1 BEGIN {
2   filtering = 1;
3 }
4
5 /^.section/ {
6   printf "%s",text;
7   text=$0"\n";
8   next;
9 }
10
11 /^.input{files}/ {
12   text="";
13   next;
14 }
15
16 /^.printindex/ {
17   filtering = 0;
18   print "\\input{conclusion.tex}"
19 }
20
21 {
22   if (filtering)
23     text=text$0"\n";
24   else
25     print;
26 }