[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 'α') { $symbols.='<m>$\alpha$</m>'; }
+ if ($entity eq 'β') { $symbols.='<m>$\beta$</m>'; }
if ($entity eq 'μ') { $symbols.='<m>$\mu$</m>'; }
if ($entity eq 'σ') { $symbols.='<m>$\sigma$</m>'; }
if ($entity eq 'Σ') { $symbols.='<m>$\Sigma$</m>'; }