Diff for /loncom/xml/londefdef.pm between versions 1.43 and 1.44

version 1.43, 2002/02/21 04:29:27 version 1.44, 2002/02/26 21:44:45
Line 1 Line 1
   
 # The LearningOnline Network with CAPA  # The LearningOnline Network with CAPA
 # Tags Default Definition Module   # Tags Default Definition Module 
 #  #
Line 49  use Apache::lonxml; Line 50  use Apache::lonxml;
   
 BEGIN {  BEGIN {
   
     &Apache::lonxml::register('Apache::londefdef',('m','html','head','map','select','option','input','textarea','form','meta','title','body','center','b','strong','table','dt','h1','h2','h3','h4','h5','h6','cite','i','address','dd','dl','dir','ol','ul','menu','dfn','kbd','tt','code','em','q','p','br','big','small','basefont','font','s','sub','strike','sup','hr','a','li','u','output','param','applet','img','embed','tr','td','allow','frameset','pre'));      &Apache::lonxml::register('Apache::londefdef',('m','html','head','map','select','option','input','textarea','form','meta','title','body','center','b','strong','table','dt','h1','h2','h3','h4','h5','h6','cite','i','address','dd','dl','dir','ol','ul','menu','dfn','kbd','tt','code','em','q','p','br','big','small','basefont','font','s','sub','strike','sup','hr','a','li','u','output','param','applet','img','embed','tr','td','allow','frameset','pre','insert'));
   
 }  }
   
Line 123  sub end_m { Line 124  sub end_m {
                                  \setlength{\marginparwidth}{90pt}                                   \setlength{\marginparwidth}{90pt}
                                  \setlength{\textfloatsep}{8pt plus 2.0pt minus 4.0pt}                                   \setlength{\textfloatsep}{8pt plus 2.0pt minus 4.0pt}
                                  \newcommand{\keephidden}[1]{}                                              \newcommand{\keephidden}[1]{}           
                                  \usepackage[dvips]{graphicx}';                                   \usepackage[dvips]{graphicx}
                                    \usepackage{epsfig}';
     }      }
    return $currentstring;     return $currentstring;
  }   }
Line 1309  EDITBUTTON Line 1311  EDITBUTTON
     my ($target,$token) = @_;      my ($target,$token) = @_;
             my $currentstring = '';              my $currentstring = '';
             if ($target eq 'web') {              if ($target eq 'web') {
               $currentstring = $token->[4];                     $currentstring = $token->[4];
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
       $currentstring = '';        $currentstring = '';
     }       } 
Line 1319  EDITBUTTON Line 1321  EDITBUTTON
     my ($target,$token) = @_;      my ($target,$token) = @_;
             my $currentstring = '';              my $currentstring = '';
             if ($target eq 'web') {              if ($target eq 'web') {
               $currentstring = $token->[2];                     $currentstring = $token->[2];
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
               $currentstring = '';                  $currentstring = '';
     }       }
    return $currentstring;     return $currentstring;
  }   }
 #-- <img> tag  #-- <img> tag
         sub start_img {          sub start_img {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
             $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=                 $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
                                         $token->[2]->{'src'};                                          $token->[2]->{'src'};
             my $currentstring = '';              my $currentstring = '';
   
     if ($target eq 'web') {      if ($target eq 'web') {
               $currentstring = $token->[4];                     $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
   #<<<<<<< londefdef.pm
   #                my $durty = $token->[2]->{'src'};
   #                $durty =~ s!(^.*)/(.*)$!$1/!;
   #                my $durtytwo = $2;
   # $currentstring = '\graphicspath{{/home/httpd/html'.$durty.'}}\fbox{\includegraphics{'.$durtytwo.'}}';
   #    }
   #   return $currentstring;
   #=======
       my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);        my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
       my $file;        my $file;
       my $path;        my $path;
Line 1360  EDITBUTTON Line 1371  EDITBUTTON
       }        }
     }      }
     return $currentstring;      return $currentstring;
   #>>>>>>> 1.43
  }   }
         sub end_img {          sub end_img {
     my ($target,$token) = @_;      my ($target,$token) = @_;
             my $currentstring = '';              my $currentstring = '';
             if ($target eq 'web') {              if ($target eq 'web') {
               $currentstring = $token->[2];                  $currentstring = $token->[2];
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
               $currentstring = '';                  $currentstring = '';
     }       }
    return $currentstring;     return $currentstring;
  }   }
 #-- <applet> tag  #-- <applet> tag
Line 1377  EDITBUTTON Line 1389  EDITBUTTON
     my ($target,$token) = @_;      my ($target,$token) = @_;
               $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=                   $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=   
                                         $token->[2]->{'code'};                                          $token->[2]->{'code'};
               $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=                   $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
                                         $token->[2]->{'archive'};                                          $token->[2]->{'archive'};
             my $currentstring = '';              my $currentstring = '';
             if ($target eq 'web') {              if ($target eq 'web') {
               $currentstring = $token->[4];                     $currentstring = $token->[4];
     } elsif ($target eq 'tex') {  
               $currentstring = " \\begin{figure} ";    
     }   
    return $currentstring;  
  }  
         sub end_applet {  
     my ($target,$token) = @_;  
             my $currentstring = '';  
             if ($target eq 'web') {  
               $currentstring = $token->[2];       
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
               $currentstring = " \\end{figure}";                  $currentstring = " \\begin{figure} ";
     }       } 
    return $currentstring;     return $currentstring;
  }   }
   sub end_applet {
       my ($target,$token) = @_;
       my $currentstring = '';
       if ($target eq 'web') {
    $currentstring = $token->[2];
       } elsif ($target eq 'tex') {
    $currentstring = " \\end{figure}";
       } 
       return $currentstring;
   }
   
 #-- <embed> tag  #-- <embed> tag
   
         sub start_embed {  sub start_embed {
     my ($target,$token) = @_;      
             $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=         my ($target,$token) = @_;
                                         $token->[2]->{'src'};      $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
            my $currentstring = '';   $token->[2]->{'src'};
             if ($target eq 'web') {      my $currentstring = '';
               $currentstring = $token->[4];           if ($target eq 'web') {
     } elsif ($target eq 'tex') {   $currentstring = $token->[4];
               $currentstring = " \\begin{figure} ";        } elsif ($target eq 'tex') {
     }    $currentstring = " \\begin{figure} ";  
    return $currentstring;      } 
  }      return $currentstring;
   }
         sub end_embed {          sub end_embed {
     my ($target,$token) = @_;      my ($target,$token) = @_;
             my $currentstring = '';              my $currentstring = '';
Line 1506  EDITBUTTON Line 1519  EDITBUTTON
     }      }
            return $currentstring;             return $currentstring;
  }   }
   #-- <insert>
    sub start_insert {
       my ($target,$token) = @_;
               my $currentstring = '';
               if ($target eq 'web') {
          $currentstring .= '<b>'.$token->[2]->{'display'}.'</b>';;
       }
              return $currentstring;
    }
           sub end_insert {
       my ($target,$token) = @_;
               my $currentstring = '';
               if ($target eq 'web') {
          $currentstring .= '';
       }
              return $currentstring;
    }
 1;  1;
 __END__  __END__

Removed from v.1.43  
changed lines
  Added in v.1.44


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>