--- loncom/xml/londefdef.pm 2003/08/08 17:48:40 1.160 +++ loncom/xml/londefdef.pm 2003/08/22 16:44:47 1.165 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.160 2003/08/08 17:48:40 sakharuk Exp $ +# $Id: londefdef.pm,v 1.165 2003/08/22 16:44:47 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -164,9 +164,11 @@ sub start_html { \renewcommand{\deg}{$^{\circ}$} \usepackage{longtable} \usepackage{textcomp} + \usepackage{makeidx} \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}}'; +\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}}'; } return $currentstring; } @@ -396,7 +398,7 @@ sub start_meta { } sub end_meta { - my ($target,$token,$tagstack,$parstack,$parser) = @_; + my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; if ($target eq 'web') { my $args=''; @@ -405,8 +407,11 @@ sub end_meta { $currentstring = $token->[4]; } } elsif ($target eq 'tex') { - $currentstring=&Apache::lonxml::endredirection(); - $currentstring=''; + my $content=&Apache::lonxml::get_param('content',$parstack,$safeeval); + my $name=&Apache::lonxml::get_param('name',$parstack,$safeeval); + if ((not defined $content) && (not defined $name)) { + &Apache::lonxml::startredirection(); + } } return $currentstring; } @@ -1402,8 +1407,15 @@ sub start_a { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $a=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); - $a=~s/([^\\])%/$1\\\%/g; - $currentstring .= '\ref{'.$a.'}'; + 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; } @@ -2286,6 +2298,29 @@ sub end_frameset { return $currentstring; } +#--
sub start_pre { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; @@ -2432,7 +2467,7 @@ sub start_base { my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[4]; - } + } return $currentstring; } @@ -3116,7 +3151,9 @@ sub start_var { my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[4]; - } + } elsif ($target eq 'tex') { + $currentstring = '\textit{'; + } return $currentstring; } @@ -3124,12 +3161,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 = ''; @@ -3148,7 +3187,6 @@ sub end_wbr { return $currentstring; } - #-- tag sub start_hideweboutput { my ($target,$token) = @_;