--- loncom/xml/londefdef.pm 2003/08/20 15:22:03 1.162 +++ loncom/xml/londefdef.pm 2003/10/01 21:13:50 1.178 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.162 2003/08/20 15:22:03 sakharuk Exp $ +# $Id: londefdef.pm,v 1.178 2003/10/01 21:13:50 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -92,9 +92,15 @@ sub start_m { $Apache::lontexconvert::errorstring=''; } #&Apache::lonxml::debug("M is ends with:$currentstring:"); + $Apache::lonxml::post_evaluate=0; } elsif ($target eq 'tex') { $currentstring = &Apache::lonxml::get_all_text_unbalanced("/m",$parser); + my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval); + if ($eval eq 'on') { + $currentstring=&Apache::run::evaluate($currentstring,$safeeval,$$parstack[-1]); + } if ($currentstring=~/^(\s*\\\\\s*)*$/) {$currentstring = ' \vskip 0 mm ';} + $Apache::lonxml::post_evaluate=0; } else { my $inside = &Apache::lonxml::get_all_text_unbalanced("/m",$parser); } @@ -323,7 +329,7 @@ sub start_title { if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { - $currentstring .= '\keephidden{' + $currentstring .= '\keephidden{Title of the document: ' } if ($target eq 'meta') { $currentstring='
sub start_pre { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; @@ -3105,7 +3173,7 @@ sub end_tbody { return $currentstring; } -#-- tag +#-- tag (end tag optional) sub start_tfoot { my ($target,$token) = @_; my $currentstring = ''; @@ -3124,7 +3192,7 @@ sub end_tfoot { return $currentstring; } -#-- tag +#-- tag (end tag optional) sub start_thead { my ($target,$token) = @_; my $currentstring = ''; @@ -3149,7 +3217,9 @@ sub start_var { my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[4]; - } + } elsif ($target eq 'tex') { + $currentstring = '\textit{'; + } return $currentstring; } @@ -3157,12 +3227,14 @@ sub end_var { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { - $currentstring = $token->[2]; + $currentstring = $token->[2]; + } elsif ($target eq 'tex') { + $currentstring = '}'; } return $currentstring; } -#--tag +#-- tag (end tag forbidden) sub start_wbr { my ($target,$token) = @_; my $currentstring = '';