3 # $Cambridge: exim/doc/doc-docbook/TidyInfo,v 1.2 2007/04/17 13:06:09 ph10 Exp $
5 # This is script to tidy up the Texinfo file that docbook2texi produces. We
6 # have to change "conceptindex" and "optionindex" to "cindex" and "findex", and
7 # we also have to add access to the index into the menus and a final node.
9 # Find the start of the first menu.
17 # Find the end of the first menu.
25 # Insert a menu link to the index.
27 print "* Concept Index::\n\n";
29 # Find the final @bye line. En route, we look for the last chapter node, the
30 # one that has nothing following, and insert a pointer to an index node. Also,
31 # change the index names.
36 if (/^\@node ([^,]+), , (.*)/)
44 print "\@node $save1, Concept Index, $save2\n";
55 s/conceptindex/cindex/;
56 s/optionindex/findex/;
57 s/variableindex/findex/;
62 # Insert the final index stuff at the end.
65 print "\@node Concept Index, , $previous, Top\n";
66 print "\n\@printindex cp\n\n";