[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /xml lontexconvert.pm
raeburn
raeburn at source.lon-capa.org
Mon Apr 23 15:33:17 EDT 2018
raeburn Mon Apr 23 19:33:17 2018 EDT
Modified files: (Branch: version_2_11_X)
/loncom/xml lontexconvert.pm
Log:
- For 2.11
- Backport 1.121.
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.112.2.6 loncom/xml/lontexconvert.pm:1.112.2.7
--- loncom/xml/lontexconvert.pm:1.112.2.6 Fri Aug 5 21:24:01 2016
+++ loncom/xml/lontexconvert.pm Mon Apr 23 19:33:17 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# TeX Conversion Module
#
-# $Id: lontexconvert.pm,v 1.112.2.6 2016/08/05 21:24:01 raeburn Exp $
+# $Id: lontexconvert.pm,v 1.112.2.7 2018/04/23 19:33:17 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -270,11 +270,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