- sub start_bubble {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
- my $currentstring = '';
- my $sign = &Apache::lonxml::get_param('symbol',$parstack,$safeeval);
- if ($target eq 'web') {
- $currentstring .= ''.$sign.')';
- } elsif ($target eq 'tex') {
- $currentstring .= '{\small\mbox{'.$sign.')\hskip 1mm ';
- }
- return $currentstring;
- }
- sub end_bubble {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
- my $currentstring = '';
- if ($target eq 'web') {
- $currentstring .= ' | ';
- } elsif ($target eq 'tex') {
- $currentstring .= '}} &';
- }
- return $currentstring;
- }
-#--
- sub start_bubbles {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
- my $currentstring = '';
- if ($target eq 'web') {
- $currentstring .= '';
- } elsif ($target eq 'tex') {
- my $howmuch = &Apache::lonxml::get_param('num',$parstack,$safeeval);
- $currentstring .= '\noindent\fbox{\begin{tabular}{' ;
- for (my $id=0;$id<$howmuch;$id++) {$currentstring .= 'l ';}
- $currentstring .= '}';
- }
- return $currentstring;
- }
- sub end_bubbles {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
- my $currentstring = '';
- if ($target eq 'web') {
- $currentstring .= '
';
- } elsif ($target eq 'tex') {
- $currentstring .= '\end{tabular}}\vskip 5mm';
- }
- return $currentstring;
- }
-#--
- sub start_bubbleline {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
- my $currentstring = '';
- if ($target eq 'web') {
- $currentstring .= '';
- } elsif ($target eq 'tex') {
- &Apache::lonxml::startredirection();
- }
- return $currentstring;
- }
- sub end_bubbleline {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
- my $currentstring = '';
- if ($target eq 'web') {
- $currentstring .= '
';
- } elsif ($target eq 'tex') {
- my $data = &Apache::lonxml::endredirection();
- $data =~ s/&\s*$//;
- $currentstring .= $data.'\\\\ ';
- }
- return $currentstring;
- }
+
1;
__END__