--- loncom/xml/londefdef.pm 2008/02/14 22:37:46 1.381 +++ loncom/xml/londefdef.pm 2008/04/28 10:52:33 1.385 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.381 2008/02/14 22:37:46 www Exp $ +# $Id: londefdef.pm,v 1.385 2008/04/28 10:52:33 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -200,6 +200,9 @@ sub start_html { '\usepackage[dvips]{graphicx}'. '\usepackage{wrapfig}'. '\usepackage{picins}'. + '\usepackage[utf8]{inputenc}'."\n". + '\usepackage[T1]{fontenc}'."\n". + '\usepackage{latexsym}'."\n". '\usepackage{epsfig}'. '\usepackage{calc}'. '\usepackage{amsmath}'. @@ -1654,14 +1657,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.=''; @@ -2096,6 +2103,10 @@ sub end_table { my $WARNING=''; #width of columns from TeXwidth attributes + # Protect against unbalanced tag. + + if (scalar(@Apache::londefdef::table) > 0) { + for (my $in=0;$in<=$Apache::londefdef::table[-1]{'row_number'};$in++) { for (my $jn=0;$jn<=$Apache::londefdef::table[-1]{'counter_columns'};$jn++) { if ($Apache::londefdef::table[-1]{'TeXlen'}[0][$jn]<$Apache::londefdef::table[-1]{'TeXlen'}[$in][$jn]) { @@ -2499,6 +2510,7 @@ sub end_table { undef @Apache::londefdef::table; } } + } return $currentstring; }