3 # $Cambridge: exim/doc/doc-docbook/TidyInfo,v 1.1 2006/04/04 14:03:49 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/;
61 # Insert the final index stuff at the end.
64 print "\@node Concept Index, , $previous, Top\n";
65 print "\n\@printindex cp\n\n";