[LON-CAPA-cvs] cvs: modules /gerd translate.pl

www lon-capa-cvs@mail.lon-capa.org
Thu, 15 Feb 2007 18:28:54 -0000


www		Thu Feb 15 13:28:54 2007 EDT

  Modified files:              
    /modules/gerd	translate.pl 
  Log:
  More symbols
  
  
Index: modules/gerd/translate.pl
diff -u modules/gerd/translate.pl:1.2 modules/gerd/translate.pl:1.3
--- modules/gerd/translate.pl:1.2	Wed Feb 14 10:32:34 2007
+++ modules/gerd/translate.pl	Thu Feb 15 13:28:52 2007
@@ -44,7 +44,7 @@
    if ($token->[0] eq 'E') {
       if ($token->[1] eq 'text') {
          $text=$intermediate;
-         $text=~s/[^\w\.\;\:\,\\\&\$\?\!\(\)\<\>\=\"\'\+\-\*\/\n ]//gsi;
+         $text=~s/[^\w\.\;\:\,\\\&\$\?\!\(\)\<\>\=\"\'\+\-\*\/\%\n ]//gsi;
       } elsif ($token->[1]=~/^choice\-(\w+)$/) {
          $foils{$1}=$intermediate;
       } elsif ($token->[1] eq 'answer') {
@@ -56,6 +56,8 @@
       } elsif ($token->[1] eq 'equation') {
 	  my $symbols='';
 	  foreach my $entity ($intermediate=~/(\&\#[^\;]+\;)/) {
+              if ($entity eq '&#x03b1;') { $symbols.='<m>$\alpha$</m>'; }
+              if ($entity eq '&#x03b2;') { $symbols.='<m>$\beta$</m>'; }
 	      if ($entity eq '&#x03bc;') { $symbols.='<m>$\mu$</m>'; }
 	      if ($entity eq '&#x03c3;') { $symbols.='<m>$\sigma$</m>'; }
 	      if ($entity eq '&#x03a3;') { $symbols.='<m>$\Sigma$</m>'; }