--- loncom/xml/scripttag.pm 2001/06/26 21:45:58 1.41 +++ loncom/xml/scripttag.pm 2001/07/09 04:10:30 1.44 @@ -6,11 +6,13 @@ package Apache::scripttag; use strict; use Apache::lonnet; +use Apache::style; sub BEGIN { &Apache::lonxml::register('Apache::scripttag',('script','scriptlib', 'parserlib','import', - 'window','display')); + 'window','display', + 'storetc','physnet')); } sub start_script { @@ -169,7 +171,7 @@ sub start_window { if ($target eq 'web') { &Apache::lonxml::startredirection; } elsif ($target eq 'tex') { - $result = '\footnote{'; + $result = '\unskip\footnote{'; } return $result; } @@ -232,5 +234,35 @@ sub start_meta { sub end_meta { } +sub start_storetc { + my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; + my $result = ''; + &Apache::lonxml::startredirection; + return $result; +} + +sub end_storetc { + my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; + my $result; + my $output=&Apache::lonxml::endredirection; + $output =~ s/\"/\"\;/g; + $result = "{\bf $output.}}\write\tcfile{\protect\tcpc{ $output.}{\the\value{relpage}}}"; + return $result; +} + + +sub start_physnet { + + my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; + my $cbistylefile = &Apache::lonnet::getfile('/home/httpd/res/msu/physnet/cbi.sty'); + %$style = (%$style,&Apache::style::styleparser($target,$cbistylefile)); + if ( defined($$style{'physnet'}) ) { + &Apache::lonxml::newparser($parser,$$style{'physnet'}); + } + + return ''; +} + + 1; __END__