jpffhelp 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. From jpff@codemist.co.uk Thu Jul 08 17:49:17 2004
  2. Date: Thu, 8 Jul 2004 17:49:13 +0100
  3. From: jpff@codemist.co.uk
  4. To: acn1@cam.ac.uk
  5. Subject: Not tested
  6. but I think the changed to add logos to help are as below. Not sure
  7. it deals with the top node but I have not found where that is done.
  8. Also not sure if one can escape " in a string in Standard LISP, or
  9. whether one needs to use the %c or equivalent stuff. May be that some
  10. of the " as not needed.
  11. ==John
  12. ------------------------------------------------------------------------
  13. in help/htmlhelp2.red
  14. symbolic procedure emit_node_title(u,dummy,type);
  15. <<fonton();
  16. myterpri();
  17. html_open "TITLE";
  18. textout_name u;
  19. html_close "TITLE";
  20. html_close "A"; % from emit_node_label
  21. myterpri();
  22. %%% Two new lines
  23. channelprintf(outfile!*,"<p align=\"center\"><img src=\"redlogo.gif\" width=621 height=60 border=0 alt=\"REDUCE\"></p>");
  24. myterpri();
  25. %%% End of insert
  26. channelprintf(outfile!*,"<b><a href=%w>INDEX</a></b><p><p>%n",indexfilename);
  27. >>;
  28. and later in same file
  29. symbolic procedure html_indexfile();
  30. begin scalar u,v,q,r,s,rr,!*lower;
  31. prin2t "..... compiling html index file";
  32. s := for each q in node_file_labels join
  33. if pairp car q then {sort_term car q . q};
  34. s := sort(s,'html_indexfile_sort);
  35. % remove trivial entries
  36. r:=s;
  37. while r do
  38. <<u:=car r; r:=cdr r;
  39. if car u member
  40. '((c o m m a n d)
  41. (c o n c e p t)
  42. (c o n s t a n t)
  43. (d e c l a r a t i o n)
  44. (i n t r o d u c t i o n)
  45. (o p e r a t o r)
  46. (p a c k a g e)
  47. (s w i t c h)
  48. (v a r i a b l e)
  49. )
  50. then s:=deletip(u,s);
  51. >>;
  52. % remove duplicates
  53. r:=s;
  54. while r and cdr r do
  55. <<u:=car r; rr:=r:=cdr r;
  56. while rr and html_indexfile_subsetp(car u,car (v:=car rr)) do
  57. <<if cddr u = cddr v then s:=deletip(u,s); rr:=cdr rr>>;
  58. >>;
  59. open_node_file "index";
  60. channelprintf(outfile!*, "<title>%w search index</title>%n",rootname());
  61. % channelprintf(outfile!*, "<dl compact><isindex>%n");
  62. channelprintf(outfile!*, "<dl compact>%n");
  63. %%% Two new lines
  64. channelprintf(outfile!*,"<p align=\"center\"><img src=\"redlogo.gif\" width=621 height=60 border=0 alt=\"REDUCE\"></p>");
  65. myterpri();
  66. %%% End of insert
  67. channelprintf(outfile!*, "<menu>%n");
  68. for each x in s do
  69. <<channelprin2(outfile!*, "<dt>");
  70. for each c in cadr x do
  71. if c='!_ then channelprin2(outfile!*," ") else
  72. if not(c='!\) then channelprin2(outfile!*,c);
  73. channelprintf(outfile!*, ": <a href=%w>",cddr x);
  74. q := cdr assoc(cddr x,labels2nodes);
  75. for each c in q do
  76. if c='!_ then channelprin2(outfile!*," ") else
  77. if not(c='!\) then channelprin2(outfile!*,c);
  78. channelprin2t(outfile!*, "</a>");
  79. >>;
  80. channelprintf(outfile!*, "</menu>%n");
  81. close outfile!*;
  82. outfile!*:=nil;
  83. end;