--- loncom/xml/londefdef.pm 2007/01/08 19:09:23 1.350 +++ loncom/xml/londefdef.pm 2007/01/17 10:09:26 1.351 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.350 2007/01/08 19:09:23 albertel Exp $ +# $Id: londefdef.pm,v 1.351 2007/01/17 10:09:26 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1559,17 +1559,6 @@ sub start_a { my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval, undef,1); $currentstring=&Apache::lonenc::encrypt_ref($token,{'href'=>$href}); - } elsif ($target eq 'tex') { - my $a=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); - my $b=&Apache::lonxml::get_param('name',$parstack,$safeeval,undef,1); - if ($a=~/\S/) { - $a=~s/([^\\])%/$1\\\%/g; - $currentstring .= '\ref{URI: '.$a.'}'; - } elsif ($b=~/\S/) { - $currentstring .= '\ref{Anchor: '.$b.'}'; - } else { - $currentstring.=''; - } } return $currentstring; } @@ -1580,6 +1569,18 @@ sub end_a { if ($target eq 'web' || $target eq 'webgrade') { $currentstring .= $token->[2]; } + if ($target eq 'tex') { + my $a=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); + my $b=&Apache::lonxml::get_param('name',$parstack,$safeeval,undef,1); + if ($a=~/\S/) { + $a=~s/([^\\])%/$1\\\%/g; + $currentstring .= ' ({\tt URI:'.&Apache::lonxml::latex_special_symbols($a).'})'; + } elsif ($b=~/\S/) { + $currentstring .= ' ({\tt Anchor:'.&Apache::lonxml::latex_special_symbols($b).'})'; + } else { + $currentstring.=''; + } + } return $currentstring; }