--- loncom/xml/londefdef.pm 2003/08/20 15:22:03 1.162 +++ loncom/xml/londefdef.pm 2003/10/10 19:05:31 1.179 @@ -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.179 2003/10/10 19:05:31 sakharuk 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) = @_; @@ -2858,8 +2926,8 @@ sub end_marquee { return $currentstring; } -#--tag -sub start_malticol { +#-- tag (end tag required) +sub start_multicol { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { @@ -2868,7 +2936,7 @@ sub start_malticol { return $currentstring; } -sub end_malticol { +sub end_multicol { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { @@ -2877,13 +2945,15 @@ sub end_malticol { return $currentstring; } -#-- tag +#-- tag (end tag required) sub start_nobr { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[4]; - } + } elsif ($target eq 'tex') { + $currentstring='\mbox{'; + } return $currentstring; } @@ -2892,11 +2962,13 @@ sub end_nobr { my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[2]; - } + } elsif ($target eq 'tex') { + $currentstring='}'; + } return $currentstring; } -#-- tag +#-- tag (end tag required) sub start_noembed { my ($target,$token) = @_; my $currentstring = ''; @@ -2915,7 +2987,7 @@ sub end_noembed { return $currentstring; } -#-- tag +#-- tag (end tag required) sub start_noframes { my ($target,$token) = @_; my $currentstring = ''; @@ -2934,7 +3006,7 @@ sub end_noframes { return $currentstring; } -#-- tag +#-- tag (end tag required) sub start_nolayer { my ($target,$token) = @_; my $currentstring = ''; @@ -2953,7 +3025,7 @@ sub end_nolayer { return $currentstring; } -#--