Fix bug #1848: taytorat leaks internal gensyms from multivar expansions
[maxima.git] / doc / info / extract_categories1.awk
blobb8649c5a4729adf6125e98b015c013850642ed7d
1 BEGIN {
2 print "(defvar *categories* (make-hash-table :test 'equal))"
3 print "(defvar *filenamebase*)"
4 print "(defvar items)"
5 print "(defvar fn)"
6 print "(defun foo (lst)"
7 print " (loop :for x :in lst"
8 print " :collect (list *filenamebase* x)))"
11 { print; }
13 END {
14 print "(loop :for key :being :the :hash-keys of *categories* :using (hash-value value) :do"
15 print " (setq fn (concatenate 'string \"Category-\" key \".texi\"))"
16 print " (with-open-file (out-stream fn :direction :output :if-exists :overwrite :if-does-not-exist :create)"
17 print " (format out-stream \"~&@anchor{Category: ~A}\" key)"
18 print " (format out-stream \"~&@opencatbox\")"
19 print " (format out-stream \"~&@b{Category: ~A}~%~%\" key)"
20 print " (setq items value)"
21 print " (cond ((> (length items) 0)"
22 print " (setq items (sort items #'string< :key #'third))"
23 print " (loop :for x :in items"
24 print " :for y :from 1"
25 print " :when (> y 1)"
26 print " :do (format out-stream \"~&@html~%&middot;~%@end html\")"
27 print " :do (format out-stream \"~&@ref{Item: ~A/~A/~A, ~A}\" (first x) (first (second x)) (second (second x)) (second (second x))))))"
28 print " (format out-stream \"~&@closecatbox\")))"
29 print ""