#!/usr/bin/perl -w # # Creating contents.hhc ... # open(CONTENTS, ">./contents.hhc") || die "Can't create contents.hhc"; open(MAXIMA_TOC, "./maxima_toc.html") || die "Can't open maxima_toc.html"; while () { if ( m#.*\n"; } if ( m#.*?
  • .*?\s(.*?)# ) { print CONTENTS "
  • \n"; print CONTENTS " \n"; print CONTENTS " \n"; } } close(MAXIMA_TOC); close(CONTENTS); # # Creating index.hhk ... # open(INDEX, ">./index.hhk") || die "Can't create index.hhk"; $i = 1; %index_content = (); while (open(MAXIMA_N,"./maxima_$i.html")) { while () { if ( m#.*?"top">(.*?)# || m#.*?"top">(.*?)# ) { unless ( $index_content{$2} ) { print INDEX "
  • \n"; print INDEX " \n"; print INDEX " \n"; $index_content{$2} = 1; } } } close(MAXIMA_N); $i++; } close(INDEX);