--- loncom/xml/lontexconvert.pm 2019/02/15 17:52:54 1.112.2.8
+++ loncom/xml/lontexconvert.pm 2016/04/09 14:48:13 1.119
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# TeX Conversion Module
#
-# $Id: lontexconvert.pm,v 1.112.2.8 2019/02/15 17:52:54 raeburn Exp $
+# $Id: lontexconvert.pm,v 1.119 2016/04/09 14:48:13 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -178,6 +178,7 @@ sub convert_real {
$xmlstring=~s/^\s*\
';
- $endspan='';
- }
+ my $tag='math/tex;';
+ if (&displaystyle($texstring)) { $tag='math/tex; mode=display'; }
&clean_out_math_mode($texstring);
- return &MathJax_header().$startspan.
- ''.$endspan;
+ return &MathJax_header().
+ '';
}
{
@@ -304,13 +297,23 @@ sub MathJax_converted {
return
''."\n";
}
+ #sub MathJax_process {
+ # my $state = pop(@MathJax_sent_header);
+ # return '' if !$state;
+ # return "\n".
+ # ''."\n";
+ #}
+ #sub MathJax_state {
+ # my ($level) = @_;
+ # return $MathJax_sent_header[$level];
+ #}
}
sub tex_engine {
if (exists($env{'form.texengine'})) {
if ($env{'form.texengine'} ne '') {
if (lc($env{'form.texengine'}) eq 'jsmath') {
- return 'MathJax';
+ return 'MathJax';
}
return $env{'form.texengine'};
}
@@ -328,11 +331,6 @@ sub tex_engine {
}
return $env{'environment.texengine'};
}
- my $dom = $env{'request.role.domain'} || $env{'user.domain'};
- my %domdefaults = &Apache::lonnet::get_domain_defaults($dom);
- if ($domdefaults{'texengine'} ne '') {
- return $domdefaults{'texengine'};
- }
return 'tth';
}
@@ -401,9 +399,9 @@ sub converted {
if ($mode =~ /tth/i) {
return &tth_converted($string);
} elsif ($mode =~ /jsmath/i) {
- return &MathJax_converted($string);
- } elsif ($mode =~ /mathjax/i) {
return &MathJax_converted($string);
+ } elsif ($mode =~ /mathjax/i) {
+ return &MathJax_converted($string);
} elsif ($mode =~ /mimetex/i) {
return &mimetex_converted($string);
} elsif ($mode =~ /raw/i) {