Diff for /loncom/xml/londefdef.pm between versions 1.148 and 1.153

version 1.148, 2003/06/30 15:05:54 version 1.153, 2003/07/14 14:29:26
Line 157  sub start_html { Line 157  sub start_html {
     &Apache::lonxml::fontsettings();           &Apache::lonxml::fontsettings();     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  @Apache::londefdef::table = ();   @Apache::londefdef::table = ();
  $currentstring .= '\documentclass[letterpaper]{article}'.   $currentstring .= '\documentclass[letterpaper]{article}';
                            #'\batchmode'.   if ($ENV{'form.latex_type'}=~'batchmode') {$currentstring .='\batchmode';} 
                            '\newcommand{\keephidden}[1]{}   $currentstring .= '\newcommand{\keephidden}[1]{}
                            \renewcommand{\deg}{$^{\circ}$}                             \renewcommand{\deg}{$^{\circ}$}
                              \usepackage{longtable}
                            \usepackage{textcomp}                             \usepackage{textcomp}
                            \usepackage[dvips]{graphicx}                             \usepackage[dvips]{graphicx}
                            \usepackage{epsfig}\usepackage{calc}                             \usepackage{epsfig}\usepackage{calc}
Line 370  sub start_meta { Line 371  sub start_meta {
     }      }
  }   }
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  &Apache::lonxml::startredirection();   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;      return $currentstring;
 }  }
Line 1292  sub start_hr { Line 1297  sub start_hr {
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring .= $token->[4];   $currentstring .= $token->[4];
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  my $LaTeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,0);   my $LaTeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0);
  if (defined $LaTeXwidth) {   if (defined $LaTeXwidth) {
     if ($LaTeXwidth=~/^%/) {      if ($LaTeXwidth=~/^%/) {
  substr($LaTeXwidth,0,1)='';   substr($LaTeXwidth,0,1)='';
Line 1346  sub end_div { Line 1351  sub end_div {
   
 #-- <a> tag  #-- <a> tag
 sub start_a {  sub start_a {
     my ($target,$token) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';      my $currentstring = '';
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring .= $token->[4];   $currentstring .= $token->[4];
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
    my $a=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1);
    $a=~s/([^\\])%/$1\\\%/g;
    $currentstring .= '\ref{'.$a.'}';
     }      }
     return $currentstring;      return $currentstring;
 }  }
Line 1360  sub end_a { Line 1368  sub end_a {
     my $currentstring = '';      my $currentstring = '';
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring .= $token->[2];   $currentstring .= $token->[2];
     } elsif ($target eq 'tex') {  
  my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1);  
  $currentstring .= '\ref{'.$href.'}';  
     }      }
     return $currentstring;      return $currentstring;
 }  }
Line 1620  sub start_dd { Line 1625  sub start_dd {
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  if ($$tagstack[-2] eq 'dl') {   if ($$tagstack[-2] eq 'dl') {
     $currentstring = ' \item [] ';        $currentstring = ' \item [] ';  
    } elsif ($$tagstack[-2] eq 'dt') {
       $currentstring = ']'; 
  }   }
     }       } 
     return $currentstring;      return $currentstring;

Removed from v.1.148  
changed lines
  Added in v.1.153


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>