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

sakharuk lon-capa-cvs@mail.lon-capa.org
Wed, 20 Aug 2003 15:22:04 -0000


sakharuk		Wed Aug 20 11:22:04 2003 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  Added <xmp> tag to support older versions of HTML (HTML<4).
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.161 loncom/xml/londefdef.pm:1.162
--- loncom/xml/londefdef.pm:1.161	Thu Aug 14 10:46:06 2003
+++ loncom/xml/londefdef.pm	Wed Aug 20 11:22:03 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.161 2003/08/14 14:46:06 sakharuk Exp $
+# $Id: londefdef.pm,v 1.162 2003/08/20 15:22:03 sakharuk Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -168,7 +168,7 @@
                            \usepackage[dvips]{graphicx}
                            \usepackage{epsfig}\usepackage{calc}
 \newenvironment{choicelist}{\begin{list}{}{\setlength{\rightmargin}{0in}\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.05in}\setlength{\itemsep}{0.022in}\setlength{\parsep}{0in}\setlength{\belowdisplayskip}{0.04in}\setlength{\abovedisplayskip}{0.05in}\setlength{\abovedisplayshortskip}{-0.04in}\setlength{\belowdisplayshortskip}{0.04in}}}{\end{list}}
-\renewenvironment{theindex}{\begin{list}{}{{\vskip 1mm \noindent \large\textbf{Index}} \newline \setlength{\rightmargin}{0in}\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.01in}\setlength{\itemsep}{-0.1in}\setlength{\parsep}{-0.02in}\setlength{\belowdisplayskip}{0.01in}\setlength{\abovedisplayskip}{0.01in}\setlength{\abovedisplayshortskip}{-0.04in}\setlength{\belowdisplayshortskip}{0.01in}}}{\end{list}}';
+\renewenvironment{theindex}{\begin{list}{}{{\vskip 1mm \noindent \large\textbf{Index}} \newline \setlength{\rightmargin}{0in}\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.01in}\setlength{\itemsep}{0.1in}\setlength{\parsep}{-0.02in}\setlength{\belowdisplayskip}{0.01in}\setlength{\abovedisplayskip}{0.01in}\setlength{\abovedisplayshortskip}{-0.04in}\setlength{\belowdisplayshortskip}{0.01in}}}{\end{list}}';
     }
     return $currentstring;
 }
@@ -2294,6 +2294,30 @@
     }
     return $currentstring;
 }
+
+#-- <xmp>
+sub start_xmp {
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
+    my $currentstring = '';
+    if ($target eq 'web') {
+	$currentstring .= $token->[4];
+    } elsif ($target eq 'tex') {
+	$currentstring .= '\begin{verbatim}';
+    } 
+    return $currentstring;
+}
+
+sub end_xmp {
+    my ($target,$token) = @_;
+    my $currentstring = '';
+    if ($target eq 'web') {
+	$currentstring .= $token->[2];
+    } elsif ($target eq 'tex') {
+	$currentstring .= '\end{verbatim}';
+    }
+    return $currentstring;
+}
+
 
 #-- <pre>
 sub start_pre {