4 # (c) K. Anton Feenstra 2001
6 # subindex v. 0.1 - 12 feb 2001
8 # reads tex index entries as generated by makeindex and
9 # combines identical words into sub-entries
17 if ( substr(1,1,$
0)!="%" )
28 sub(", \\\\see.
*","",pp);
32 printf("%% %d %d %d %d
|", mc, nc, mp, np);
33 for(i=1;i<=nc;i++) printf(" %s
",c[i]);
35 for(i=1;i<=np;i++) printf(" %s
",p[i]);
43 for(i=1; $(i)!="\\hfill
" && i<=NF; i++) {
46 if (i<=np && c[i]==p[i]) mc=i;
61 if (key != pkey && mc<np)
62 printf(" \\item %s
\\hfill
\\nopagebreak
\n", key);
65 if (mp) m=mp; else m=mc;
67 for(i=m+2; i<=np; i++)
70 for(i=1; i<=mp || i<=mc; i++) {
71 sub("item
"key" ", "subitem
", pp);
72 sub("item
"key", "skey, "subitem
"skey" $
\\sim$
", pp);