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

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 17 Feb 2003 20:10:09 -0000


sakharuk		Mon Feb 17 15:10:09 2003 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
   Added a few LaTeX special symbols to latex_special_symbols subroutine
  which have to be cleaned up in the header of document.
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.234 loncom/xml/lonxml.pm:1.235
--- loncom/xml/lonxml.pm:1.234	Fri Feb 14 14:35:55 2003
+++ loncom/xml/lonxml.pm	Mon Feb 17 15:10:08 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.234 2003/02/14 19:35:55 www Exp $
+# $Id: lonxml.pm,v 1.235 2003/02/17 20:10:08 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -457,10 +457,16 @@
 
 sub latex_special_symbols {
     my ($current_token,$stack,$parstack,$where)=@_;
-    if ($where=='header') {
+    if ($where eq 'header') {
+      $current_token =~ s/\\/ /g;
+      $current_token =~ s/\{/\\\{/g;
+      $current_token =~ s/\}/\\\}/g;
       $current_token =~ s/_/ /g;
       $current_token =~ s/\^/ /g;
       $current_token =~ s/&/\\&/g;
+      $current_token =~ s/\#/\\\#/g;
+      $current_token =~ s/%/\\%/g;
+      $current_token =~ s/\$/\\\$/g;
     } else {
      $current_token=~s/\\ /\\char92 /g;
      $current_token=~s/\^/\\char94 /g;