--- loncom/interface/lonsyllabus.pm 2015/06/09 21:22:57 1.138 +++ loncom/interface/lonsyllabus.pm 2016/02/20 00:12:40 1.140 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.138 2015/06/09 21:22:57 damieng Exp $ +# $Id: lonsyllabus.pm,v 1.140 2016/02/20 00:12:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -125,8 +125,13 @@ sub handler { if ($target eq 'tex') { $r->print($filecontents); } else { - my $result = &Apache::lontexconvert::converted(\$filecontents, - $env{'form.texengine'}); + my $texengine = $env{'form.texengine'}; + if ($texengine eq '') { + $texengine = 'tth'; + } elsif (lc($texengine) eq 'jsmath') { + $texengine = 'MathJax'; + } + my $result = &Apache::lontexconvert::converted(\$filecontents,$texengine); my %args; &get_breadcrumbs($cdom,$cnum,$crstype,\%args); if ($env{'form.only_body'}) { @@ -164,7 +169,7 @@ sub handler { '\end{document}'); } else { $r->print(&Apache::lonwrapper::wrapper($item,undef,$env{'request.use_absolute'}, - undef,$is_pdf,&mt('Syllabus'))); + undef,$is_pdf,undef,&mt('Syllabus'))); } } return OK; @@ -183,7 +188,7 @@ sub handler { $is_pdf = 1; } $r->print(&Apache::lonwrapper::wrapper($external,undef,$env{'request.use_absolute'}, - $is_ext,$is_pdf,&mt('Syllabus'))); + $is_ext,$is_pdf,undef,&mt('Syllabus'))); } return OK; }