2 # $Cambridge: exim/doc/doc-scripts/DoConts,v 1.1 2004/10/07 15:04:35 ph10 Exp $
4 $style = (@ARGV > 0)? $ARGV[0] : "a4ps";
6 open(IN, "z-rawindex") || die "Can't open z-rawindex\n";
7 open(OUT, ">z-contents") || die "Can't open z-contents\n";
11 .linelength ~~sys.linelength + 0.2in
12 .pagedepth ~~sys.pagedepth - 0.2in
22 .set p ~~sys.pagenumber
35 s/\$e\s*$//; # "see also" lines have no line number
36 s/--\s*\d+$//; # remove "extra" number for index page
38 s/\n$//; # trailing newline
43 print OUT ".if ~~sys.leftonpage < 2*~~sys.linedepth\n";
44 print OUT ".newpage\n";
46 print OUT "\$shead\{$_\}\n";
59 system("sgcal z-contents -to zc-gcode -style $style -index /dev/null");
62 system("sgtops zc-gcode -to zc-ps");
63 print "PostScript in zc-ps\n";
67 system("mv -f zc-gcode zc-txt");
68 print "Text in zc-txt\n";