--- loncom/xml/londefdef.pm 2008/04/29 10:16:37 1.386
+++ loncom/xml/londefdef.pm 2008/08/18 10:19:59 1.390
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.386 2008/04/29 10:16:37 foxr Exp $
+# $Id: londefdef.pm,v 1.390 2008/08/18 10:19:59 foxr Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -46,6 +46,7 @@ use Apache::File();
use Image::Magick;
use Apache::lonmenu();
use Apache::lonmeta();
+use Apache::lonlocal;
use Apache::Constants qw(:common);
use File::Basename;
use LONCAPA();
@@ -201,8 +202,9 @@ sub start_html {
'\usepackage{wrapfig}'.
'\usepackage{picins}'.
'\usepackage[T1]{fontenc}'."\n".
- '\usepacakge{ucs}'."\n".
- '\usepackage[utf8]{inputenc}'."\n".
+ '\usepackage[postscript]{ucs}'."\n".
+ '\usepackage[utf8x]{inputenc}'."\n".
+ '\usepackage{pifont}' ."\n".
'\usepackage{latexsym}'."\n".
'\usepackage{epsfig}'.
'\usepackage{calc}'.
@@ -593,12 +595,16 @@ sub start_body {
}
sub edit_controls {
- my $result .= (<
+
+
-
-EDITBUTTON
+
';
return $result;
}
@@ -3010,7 +3016,7 @@ sub start_img {
# &Apache::lonxml::debug("LaTeX rendering = $latex_rendering image file: $src");
- #if original gif/jpg/png file exist do following:
+ #if original bmp/gif/jpg/png file exist do following:
my $origsrc=$src;
my ($path,$file) = &get_eps_image($src);
# &Apache::lonnet::logthis("Image source: $src result: $path $file");
@@ -4411,8 +4417,8 @@ sub get_eps_image {
&Apache::lonnet::repcopy($orig_src); # Failure is not completely fatal.
}
&Apache::lonxml::debug("get_eps_image: Original image: $orig_src");
- my ($spath, $sname, $sext) = &fileparse($src, qr/\.(gif|png|jpg|jpeg)/i);
- $src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i;
+ my ($spath, $sname, $sext) = &fileparse($src, qr/\.(bmp|gif|png|jpg|jpeg)/i);
+ $src=~s/\.(bmp|gif|png|jpg|jpeg)$/\.eps/i;
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
&Apache::lonxml::debug("Filelocation gives: $src");
if (! -e $src) {
@@ -4473,7 +4479,7 @@ sub eps_generation {
my $temp_file = Apache::File->new('>>'.$filename);
print $temp_file "$src\n";
my $newsrc = $src;
- $newsrc =~ s/(\.gif|\.jpg|\.jpeg)$/\.eps/i;
+ $newsrc =~ s/(\.bmp|\.gif|\.jpg|\.jpeg)$/\.eps/i;
$newsrc=~s{/home/httpd/html/res}{};
$newsrc=~s{/home/($LONCAPA::username_re)/public_html/}{/$1/};
$newsrc=~s{/\./}{/};