--- loncom/xml/londefdef.pm 2007/12/06 11:22:37 1.380 +++ loncom/xml/londefdef.pm 2008/03/10 08:54:13 1.383 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.380 2007/12/06 11:22:37 foxr Exp $ +# $Id: londefdef.pm,v 1.383 2008/03/10 08:54:13 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -200,6 +200,7 @@ sub start_html { '\usepackage[dvips]{graphicx}'. '\usepackage{wrapfig}'. '\usepackage{picins}'. + '\usepackage[utf8]{inputenc}'."\n". '\usepackage{epsfig}'. '\usepackage{calc}'. '\usepackage{amsmath}'. @@ -1654,14 +1655,18 @@ sub end_a { &Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval,undef,1); - if ($href =~ /\S/) { + my $uriprint = + &Apache::lonxml::get_param('uriprint',$parstack,$safeeval,undef,1); + my $anchorprint = + &Apache::lonxml::get_param('anchorprint',$parstack,$safeeval,undef,1); + if (($href =~ /\S/) && ($uriprint=~/^on|uriprint|yes|1$/i)) { $href =~ s/([^\\])%/$1\\\%/g; # Substitute special symbols... and allow line breaks at each / # $href = &Apache::lonxml::latex_special_symbols($href); $href =~ s/\//\/\\-/g; # Map / to /\- to allow hyphenation. $currentstring .= ' ({\tt URI:'.$href.'})'; - } elsif ($name =~ /\S/) { + } elsif (($name =~ /\S/) && ($anchorprint=~/^on|anchorprint|yes|1$/i)) { $currentstring .= ' ({\tt Anchor:'.&Apache::lonxml::latex_special_symbols($name).'})'; } else { $currentstring.=''; @@ -3063,11 +3068,14 @@ sub start_img { my $width= &Apache::lonxml::get_param('width',$parstack,$safeeval); my $height= &Apache::lonxml::get_param('height',$parstack,$safeeval); - - $currentstring .= ''.$alt.'[2]{'src'}=~/\$/) { + $currentstring.='Variable image source'; + } else { + $currentstring .= ''.$alt.'[2]{'src'},$token->[2]{'width'},$token->[2]{'height'});