--- loncom/interface/loncommon.pm 2006/04/18 19:18:17 1.339 +++ loncom/interface/loncommon.pm 2006/04/18 20:55:14 1.341 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.339 2006/04/18 19:18:17 albertel Exp $ +# $Id: loncommon.pm,v 1.341 2006/04/18 20:55:14 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3076,7 +3076,7 @@ sub headtag { my $result = ''. - &Apache::lonxml::fontsettings(). + &font_settings(). &Apache::lonhtmlcommon::htmlareaheaders(); if ($args->{'force_register'}) { @@ -3104,6 +3104,65 @@ ADDMETA =over 4 +=item * &font_settings() + +Returns neccessary to set the proper encoding + +Inputs: none + +=back + +=cut + +sub font_settings { + my $headerstring=''; + if (($env{'browser.os'} eq 'mac') && (!$env{'browser.mathml'})) { + $headerstring.= + ''; + } elsif (!$env{'browser.mathml'} && $env{'browser.unicode'}) { + $headerstring.= + ''; + } + return $headerstring; +} + +=pod + +=over 4 + +=item * &xml_begin() + +Returns the needed doctype and + +Inputs: none + +=back + +=cut + +sub xml_begin { + my $output=''; + + @Apache::lonxml::htmlareafields=(); + if ($env{'browser.mathml'}) { + $output='' + #.''."\n" +# .'] >' + .'' + .''; + } else { + $output=''; + } + return $output; +} + +=pod + +=over 4 + =item * &endheadtag() Returns a uniform for LON-CAPA web pages. @@ -3192,7 +3251,7 @@ sub start_page { my $result; if (! exists($args->{'skip_phases'}{'head'}) ) { $result.= - &Apache::lonxml::xmlbegin(). + &xml_begin(). &headtag($title,$head_extra,\%head_args).&endheadtag(); }