[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
faziophi
faziophi@source.lon-capa.org
Tue, 04 May 2010 19:40:47 -0000
faziophi Tue May 4 19:40:47 2010 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
Add support for <del> tag in tex output, via strikethrough like
output in web mode.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.415 loncom/xml/londefdef.pm:1.416
--- loncom/xml/londefdef.pm:1.415 Mon Feb 1 12:03:19 2010
+++ loncom/xml/londefdef.pm Tue May 4 19:40:47 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.415 2010/02/01 12:03:19 foxr Exp $
+# $Id: londefdef.pm,v 1.416 2010/05/04 19:40:47 faziophi Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -3897,12 +3897,16 @@
return $currentstring;
}
+
#-- <del> tag (end tag required)
sub start_del {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web' || $target eq 'webgrade') {
$currentstring = $token->[4];
+ } elsif ($target eq 'tex') {
+ &disable_para();
+ $currentstring .= '\st{';
}
return $currentstring;
}
@@ -3911,7 +3915,10 @@
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web' || $target eq 'webgrade') {
- $currentstring = $token->[2];
+ $currentstring = $token->[2];
+ } elsif ($target eq 'tex') {
+ &enable_para();
+ $currentstring = '}';
}
return $currentstring;
}
@@ -4847,6 +4854,7 @@
"\\usepackage{xcolor}\n".
'\usepackage{calc}'.
'\usepackage{amsmath}'.
+ '\usepackage{soul}',
'\usepackage{amssymb}'.
'\usepackage{amsfonts}'.
'\usepackage{amsthm}'.