home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / hypertext / latex2html_1 / !latex2htm_files_styles_html_perl < prev    next >
Encoding:
Text File  |  1996-07-15  |  2.5 KB  |  109 lines

  1. # HTML.PERL by Nikos Drakos <nikos@cbl.leeds.ac.uk> 2-DEC-93
  2. # Computer Based Learning Unit, University of Leeds.
  3. #
  4. # Extension to LaTeX2HTML to translate hypermedia extensions
  5. # to LaTeX defined in html.sty to equivalent HTML commands.
  6. #
  7. #
  8. #
  9. # Modifications:
  10. #
  11. #  nd = Nikos Drakos <nikos@cbl.leeds.ac.uk>
  12. #  jz = Jelle van Zeijl <jvzeijl@isou17.estec.esa.nl>
  13.  
  14. # nd 18-AUG-94 - Added do_cmd_htmladdtonavigation
  15. # nd 26-JUL-94 - Moved do_env_latexonly from main script and added support
  16. #                for do_cmd_latexonly
  17. # jz 22-APR-94 - Added command htmlref
  18. # nd 15-APR-94 - Added command htmladdnormallinkfoot
  19. # nd  2-DEC-93 - Created
  20.  
  21. package main; 
  22.  
  23. sub do_cmd_htmladdnormallink{
  24.     local($_) = @_;
  25.     local($text, $url);
  26.     s/$next_pair_pr_rx/$text = $2; ''/eo;
  27.     s/$next_pair_pr_rx/$url = $2; ''/eo;
  28.     join('',&make_href($url,$text),$_);
  29. }
  30.  
  31. sub do_cmd_htmladdnormallinkfoot{
  32.     &do_cmd_htmladdnormallink;
  33. }
  34.  
  35. sub do_cmd_htmladdimg{
  36.     local($_) = @_;
  37.     local($url);
  38.     s/$next_pair_pr_rx/$url = $2; ''/eo;
  39.     $url = &revert_to_raw_tex($url);
  40.     join('',&embed_image($url,"external",0,0),$_);
  41. }
  42.  
  43. sub do_cmd_externallabels{
  44.     local($_) = @_;
  45.     local($URL,$labelfile);
  46.     s/$next_pair_pr_rx/$URL = $2; ''/eo;
  47.     s/$next_pair_pr_rx/$labelfile = $2; ''/eo;
  48.     if (-f "$labelfile") {
  49.     require($labelfile)}
  50.     else {
  51.     $warnings .= "Could not find the external label file!\n" ;
  52.     }
  53.     $_;
  54. }
  55.  
  56. sub do_cmd_externalref{
  57.     local($_) = @_;
  58.     &process_ref($external_ref_mark,$external_ref_mark);
  59. }
  60.  
  61. sub do_cmd_hyperref {
  62.     local($_) = @_;
  63.     local($text);
  64.     s/$next_pair_pr_rx/$text = $2; ''/eo;
  65.     s/$next_pair_pr_rx//o; # Throw this away ...
  66.     s/$next_pair_pr_rx//o; # ... and this
  67.     &process_ref($cross_ref_mark,$cross_ref_mark,$text);
  68. }
  69.  
  70. sub do_cmd_htmlref {
  71.     local($_) = @_;
  72.     local($text);
  73.     s/$next_pair_pr_rx/$text = $2; ''/eo;
  74.     &process_ref($cross_ref_mark,$cross_ref_mark,$text);
  75. }
  76.  
  77. # IGNORE the contents of this environment 
  78. sub do_env_latexonly {
  79.     "";
  80. }
  81.  
  82. # IGNORE the argument of this command
  83. sub do_cmd_latexonly {
  84.     local($_) = @_;
  85.     s/$next_pair_pr_rx//o;
  86.     $_;
  87. }
  88.  
  89. # IGNORE the argument of this command
  90. sub do_cmd_htmlimage {
  91.     local($_) = @_;
  92.     s/$next_pair_pr_rx//o;
  93.     $warnings .= "\nThe command \"htmlimage\" is only effective inside an
  94. environment which generates an image (eg \"figure\")\n";
  95.     $_;
  96. }
  97.  
  98. sub do_cmd_htmladdtonavigation {
  99.     local($_) = @_;
  100.     s/$next_pair_pr_rx//o;
  101.     $CUSTOM_BUTTONS = $2;
  102.     $_;
  103. }
  104.  
  105. 1;                # This must be the last line
  106.  
  107.  
  108.  
  109.