pipadoc update, new upstream version with macro facility
[nobug] / doc / asciidoc.pawk
1
2 # Create an asciidoc paragraph and index entry
3 #             Sec       Name  Index Explanation
4 match($0, com"(.*) PARA (.*); (.*); *(.*)", p) {
5   append("index", p[3], "xref:"p[3]"["p[2]"]:: "p[4])
6   append(p[1],"","[["p[3]"]]")
7   append(p[1],"","."p[2])
8   next
9 }
10
11 # Create an asciidoc headline and index entry
12 #             Sec      Typ Name  Index Explanation
13 match($0, com"(.*) HEAD(.) (.*); (.*); *(.*)", p) {
14   append("index", p[4], "xref:"p[4]"["p[3]"]:: "p[5])
15   append(p[1],"","[["p[4]"]]")
16   append(p[1],"",p[3])
17   append(p[1],"",gensub(/./, p[2], "g", p[3]))
18   next
19 }