--- loncom/xml/londefdef.pm 2003/06/26 15:23:06 1.144 +++ loncom/xml/londefdef.pm 2003/06/30 14:09:03 1.147 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.144 2003/06/26 15:23:06 sakharuk Exp $ +# $Id: londefdef.pm,v 1.147 2003/06/30 14:09:03 sakharuk Exp $ # # # Copyright Michigan State University Board of Trustees @@ -158,7 +158,7 @@ sub start_html { } elsif ($target eq 'tex') { @Apache::londefdef::table = (); $currentstring .= '\documentclass[letterpaper]{article}'. - '\batchmode'. + #'\batchmode'. '\newcommand{\keephidden}[1]{} \renewcommand{\deg}{$^{\circ}$} \usepackage{textcomp} @@ -1357,40 +1357,33 @@ sub start_a { } sub end_a { - my ($target,$token,$tagstack,$stackref) = @_; + my ($target,$token,$tagstack,$parstack,$safeeval) = @_; my $currentstring = ''; if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { - my $tempor_var = $stackref->[$#$stackref]; - if (index($tempor_var,'name') != -1 ) { - $tempor_var =~ s/name=([^,]*),/$1/g; - } elsif (index($tempor_var,'href') != -1 ) { - $tempor_var =~ s/href=([^,]*),/$1/g; - $currentstring .= " \\ref{$tempor_var}"; - } + my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); + $currentstring .= '\ref{'.$href.'}'; } return $currentstring; } #--