--- loncom/interface/lonpreferences.pm 2016/01/27 01:43:01 1.196.4.17 +++ loncom/interface/lonpreferences.pm 2016/08/05 20:47:30 1.196.4.18 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.196.4.17 2016/01/27 01:43:01 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.196.4.18 2016/08/05 20:47:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -160,11 +160,13 @@ sub texenginechanger { my $domain = $env{'user.domain'}; my %userenv = &Apache::lonnet::get('environment',['texengine']); my $texengine=$userenv{'texengine'}; + if (lc($texengine) eq 'jsmath') { + $texengine = 'MathJax'; + } my %mathchoices=('' => 'Default', 'tth' => 'tth (TeX to HTML)', #'ttm' => 'TeX to MathML', - 'jsMath' => 'jsMath', 'MathJax' => 'MathJax', 'mimetex' => 'mimetex (Convert to Images)', 'raw' => 'Raw (Screen Reader)' @@ -176,7 +178,6 @@ sub texenginechanger { 'texengine', \%mathchoices); my $MathJax_start=&Apache::lontexconvert::MathJax_header(); - my $jsMath_start=&Apache::lontexconvert::jsMath_header(); my %lt=&Apache::lonlocal::texthash( 'headline' => 'Change how math is displayed', 'preftxt' => 'Preferred method to display math', @@ -184,26 +185,10 @@ sub texenginechanger { 'exmpl' => 'Examples', 'mathjax' => 'MathJax:', 'mathjaxinfo' => 'MathJax provides rendered equations whose source code can be extracted in TeX and MathML formats by right clicking the equation.', - 'jsmath' => 'jsMath:', 'tth' => 'tth (TeX to HTML):', 'mimetex' => 'mimetex (Convert to Images):', ); - my $jsMathWarning='

' - .'

' - .&mt("It looks like you don't have the TeX math fonts installed.") - .'
' - .'
' - .&mt('The jsMath example on this page may not look right without them. ' - .'The [_1]jsMath Home Page[_2] has information on how to download the ' - .'needed fonts. In the meantime, jsMath will do the best it can ' - .'with the fonts you have, but it may not be pretty and some equations ' - .'may not be rendered correctly.' - ,'' - ,'') - .'
' - .'

'; - $r->print(<$lt{'headline'}
@@ -226,18 +211,6 @@ $lt{'exmpl'} $lt{'mathjaxinfo'}

-

$lt{'jsmath'}

-

-$jsMath_start - - -

-

$lt{'mimetex'}

@@ -248,9 +221,6 @@ if (jsMath.nofonts == 1) {

ENDLSCREEN - if ($env{'environment.texengine'} ne 'jsMath') { - $r->print(''); - } } @@ -261,6 +231,9 @@ sub verify_and_change_texengine { # Screenname my $newtexengine = $env{'form.texengine'}; $newtexengine=~s/[^\-\w]//g; + if (lc($newtexengine) eq 'jsmath') { + $newtexengine = 'MathJax'; + } if ($newtexengine eq 'ttm') { &Apache::lonnet::appenv({'browser.mathml' => 1}); } else {