[LON-CAPA-cvs] cvs: loncom /xml lontexconvert.pm
raeburn
raeburn at source.lon-capa.org
Mon Apr 23 14:59:29 EDT 2018
raeburn Mon Apr 23 18:59:29 2018 EDT
Modified files:
/loncom/xml lontexconvert.pm
Log:
- Bug 6881.
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.120 loncom/xml/lontexconvert.pm:1.121
--- loncom/xml/lontexconvert.pm:1.120 Sat Oct 7 00:50:57 2017
+++ loncom/xml/lontexconvert.pm Mon Apr 23 18:59:28 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# TeX Conversion Module
#
-# $Id: lontexconvert.pm,v 1.120 2017/10/07 00:50:57 raeburn Exp $
+# $Id: lontexconvert.pm,v 1.121 2018/04/23 18:59:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -271,11 +271,19 @@
sub MathJax_converted {
my $texstring=shift;
- my $tag='math/tex;';
- if (&displaystyle($texstring)) { $tag='math/tex; mode=display'; }
+ my ($tag,$startspan,$endspan);
+ $tag='math/tex;';
+ if (&displaystyle($texstring)) {
+ $tag='math/tex; mode=display';
+ $startspan='';
+ $endspan='';
+ } else {
+ $startspan='<span style="display:inline-block;">';
+ $endspan='</span>';
+ }
&clean_out_math_mode($texstring);
- return &MathJax_header().
- '<script type="'.$tag.'">'.$$texstring.'</script>';
+ return &MathJax_header().$startspan.
+ '<script type="'.$tag.'">'.$$texstring.'</script>'.$endspan;
}
{
More information about the LON-CAPA-cvs
mailing list