--- loncom/xml/londefdef.pm 2003/08/14 14:46:06 1.161 +++ 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.161 2003/08/14 14:46:06 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); } @@ -168,7 +174,7 @@ sub start_html { \usepackage[dvips]{graphicx} \usepackage{epsfig}\usepackage{calc} \newenvironment{choicelist}{\begin{list}{}{\setlength{\rightmargin}{0in}\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.05in}\setlength{\itemsep}{0.022in}\setlength{\parsep}{0in}\setlength{\belowdisplayskip}{0.04in}\setlength{\abovedisplayskip}{0.05in}\setlength{\abovedisplayshortskip}{-0.04in}\setlength{\belowdisplayshortskip}{0.04in}}}{\end{list}} -\renewenvironment{theindex}{\begin{list}{}{{\vskip 1mm \noindent \large\textbf{Index}} \newline \setlength{\rightmargin}{0in}\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.01in}\setlength{\itemsep}{-0.1in}\setlength{\parsep}{-0.02in}\setlength{\belowdisplayskip}{0.01in}\setlength{\abovedisplayskip}{0.01in}\setlength{\abovedisplayshortskip}{-0.04in}\setlength{\belowdisplayshortskip}{0.01in}}}{\end{list}}'; +\renewenvironment{theindex}{\begin{list}{}{{\vskip 1mm \noindent \large\textbf{Index}} \newline \setlength{\rightmargin}{0in}\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.01in}\setlength{\itemsep}{0.1in}\setlength{\parsep}{-0.02in}\setlength{\belowdisplayskip}{0.01in}\setlength{\abovedisplayskip}{0.01in}\setlength{\abovedisplayshortskip}{-0.04in}\setlength{\belowdisplayshortskip}{0.01in}}}{\end{list}}'; } return $currentstring; } @@ -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) = @_; @@ -2834,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') { @@ -2844,7 +2936,7 @@ sub start_malticol { return $currentstring; } -sub end_malticol { +sub end_multicol { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { @@ -2853,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; } @@ -2868,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 = ''; @@ -2891,7 +2987,7 @@ sub end_noembed { return $currentstring; } -#-- tag +#-- tag (end tag required) sub start_noframes { my ($target,$token) = @_; my $currentstring = ''; @@ -2910,7 +3006,7 @@ sub end_noframes { return $currentstring; } -#-- tag +#-- tag (end tag required) sub start_nolayer { my ($target,$token) = @_; my $currentstring = ''; @@ -2929,7 +3025,7 @@ sub end_nolayer { return $currentstring; } -#--