[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 26 Feb 2002 21:44:45 -0000


sakharuk		Tue Feb 26 16:44:45 2002 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  added <insert> tag
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.43 loncom/xml/londefdef.pm:1.44
--- loncom/xml/londefdef.pm:1.43	Wed Feb 20 23:29:27 2002
+++ loncom/xml/londefdef.pm	Tue Feb 26 16:44:45 2002
@@ -1,7 +1,8 @@
+
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.43 2002/02/21 04:29:27 albertel Exp $
+# $Id: londefdef.pm,v 1.44 2002/02/26 21:44:45 sakharuk Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -49,7 +50,7 @@
 
 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'));
 
 }
 
@@ -123,7 +124,8 @@
                                  \setlength{\marginparwidth}{90pt}
                                  \setlength{\textfloatsep}{8pt plus 2.0pt minus 4.0pt}
                                  \newcommand{\keephidden}[1]{}           
-                                 \usepackage[dvips]{graphicx}';
+                                 \usepackage[dvips]{graphicx}
+                                 \usepackage{epsfig}';
 	    }
 	   return $currentstring;
 	}
@@ -1309,7 +1311,7 @@
 	    my ($target,$token) = @_;
             my $currentstring = '';
             if ($target eq 'web') {
-              $currentstring = $token->[4];     
+              $currentstring = $token->[4];
 	    } elsif ($target eq 'tex') {
 	      $currentstring = '';
 	    } 
@@ -1319,21 +1321,30 @@
 	    my ($target,$token) = @_;
             my $currentstring = '';
             if ($target eq 'web') {
-              $currentstring = $token->[2];     
+              $currentstring = $token->[2];
 	    } elsif ($target eq 'tex') {
-              $currentstring = '';  
-	    } 
+              $currentstring = '';
+	    }
 	   return $currentstring;
 	}
 #-- <img> tag
         sub start_img {
 	    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
-            $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=   
+            $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
                                         $token->[2]->{'src'};
             my $currentstring = '';
+
 	    if ($target eq 'web') {
               $currentstring = $token->[4];     
 	    } 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 $file;
 	      my $path;
@@ -1360,15 +1371,16 @@
 	      }
 	    }
 	    return $currentstring;
+#>>>>>>> 1.43
 	}
         sub end_img {
 	    my ($target,$token) = @_;
             my $currentstring = '';
             if ($target eq 'web') {
-              $currentstring = $token->[2];  
+              $currentstring = $token->[2];
 	    } elsif ($target eq 'tex') {
-              $currentstring = '';  
-	    } 
+              $currentstring = '';
+	    }
 	   return $currentstring;
 	}
 #-- <applet> tag
@@ -1377,41 +1389,42 @@
 	    my ($target,$token) = @_;
               $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=   
                                         $token->[2]->{'code'};
-              $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=   
+              $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
                                         $token->[2]->{'archive'};
             my $currentstring = '';
             if ($target eq 'web') {
-              $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];     
+              $currentstring = $token->[4];
 	    } elsif ($target eq 'tex') {
-              $currentstring = " \\end{figure}";  
+              $currentstring = " \\begin{figure} ";
 	    } 
 	   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
 
-        sub start_embed {
-	    my ($target,$token) = @_;
-            $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=   
-                                        $token->[2]->{'src'};
-           my $currentstring = '';
-            if ($target eq 'web') {
-              $currentstring = $token->[4];     
-	    } elsif ($target eq 'tex') {
-              $currentstring = " \\begin{figure} ";  
-	    } 
-	   return $currentstring;
-	}
+sub start_embed {
+    
+    my ($target,$token) = @_;
+    $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
+	$token->[2]->{'src'};
+    my $currentstring = '';
+    if ($target eq 'web') {
+	$currentstring = $token->[4];
+    } elsif ($target eq 'tex') {
+	$currentstring = " \\begin{figure} ";  
+    } 
+    return $currentstring;
+}
         sub end_embed {
 	    my ($target,$token) = @_;
             my $currentstring = '';
@@ -1503,6 +1516,23 @@
 	       $currentstring .= $token->[2];
 	    } elsif ($target eq 'tex') {
 		$currentstring .= '\end{verbatim}';
+	    }
+           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;
 	}