section-type
        title pos current-section current-subsection)
     (save-excursion
-      (find-file (expand-file-name "refman.toc" latex-dir))
+      (find-file (expand-file-name "m17nlib.toc" latex-dir))
       (while (re-search-forward "{\\(sub\\)*section}" nil t)
        (goto-char (1+ (match-beginning 0)))
        (setq section-type (intern (buffer-substring
 
+++ /dev/null
-BEGIN {
-  filtering = 1;
-}
-
-/^.section/ {
-  printf "%s",text;
-  text=$0"\n";
-  next;
-}
-
-/^.input{files}/ {
-  text="";
-  next;
-}
-
-/^.printindex/ {
-  filtering = 0;
-  print "\\input{conclusion.tex}"
-}
-
-{
-  if (filtering)
-    text=text$0"\n";
-  else
-    print;
-}
 
--- /dev/null
+/The M17N Library File Index/,/files/ d
+/The M17N Library File Documentation/,/printindex/ d
+$ i \
+\\printindex
+
 
 else
   LATEX=platex
 fi
-${LATEX} refman.tex
+${LATEX} m17nlib.tex
 if [ "$2" = "ja" ] ; then
-  nkf -e < refman.idx > temp.idx; mv temp.idx refman.idx
+  nkf -e < m17nlib.idx > temp.idx; mv temp.idx refman.idx
 fi
-makeindex refman.idx
-${LATEX} refman.tex
-dvips ${PAPER} -o refman.ps refman.dvi
+makeindex m17nlib.idx
+${LATEX} m17nlib.tex
+dvips ${PAPER} -o m17nlib.ps m17nlib.dvi