Diff for /loncom/xml/londefdef.pm between versions 1.377 and 1.381

version 1.377, 2007/09/10 20:09:13 version 1.381, 2008/02/14 22:37:46
Line 578  sub start_body { Line 578  sub start_body {
     'force_register' => 1});      'force_register' => 1});
   
  if ($env{'request.state'} ne 'published') {   if ($env{'request.state'} ne 'published') {
       $currentstring.=&Apache::lonmenu::constspaceform();
       $currentstring.=&Apache::londefdef::edit_controls();
  }   }
  $currentstring.=&Apache::lonxml::message_location();   $currentstring.=&Apache::lonxml::message_location();
  $currentstring.=&Apache::lonmenu::constspaceform();  
  $currentstring.=&Apache::londefdef::edit_controls();  
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $currentstring = '\begin{document}';     $currentstring = '\begin{document}';  
     }       } 
Line 1586  sub start_div { Line 1585  sub start_div {
     }       } 
     if ($target eq 'tex') {      if ($target eq 'tex') {
  # 4 possible alignments: left, right, center, and -missing-.   # 4 possible alignments: left, right, center, and -missing-.
           # If inside a table row, we must let the table logic
    # do the alignment, however.
    # 
   
  my $endstring = '';   my $endstring = '';
   
Line 1596  sub start_div { Line 1598  sub start_div {
     $endstring      = '\end{center}';      $endstring      = '\end{center}';
     if (&is_inside_of($tagstack, "table")) {      if (&is_inside_of($tagstack, "table")) {
  $currentstring = &center_correction().$currentstring;   $currentstring = &center_correction().$currentstring;
    $endstring    .= &center_end_correction(); 
     }      }
  }   }
  elsif ($align eq 'right') {   elsif ($align eq 'right') {
Line 3060  sub start_img { Line 3063  sub start_img {
  my $width=  &Apache::lonxml::get_param('width',$parstack,$safeeval);   my $width=  &Apache::lonxml::get_param('width',$parstack,$safeeval);
  my $height= &Apache::lonxml::get_param('height',$parstack,$safeeval);   my $height= &Apache::lonxml::get_param('height',$parstack,$safeeval);
   
           if ($token->[2]{'src'}=~/\$/) {
  $currentstring .= '<img src="'.$src.'" alt="'.$alt.'" ';             $currentstring.='Variable image source';
  if ($width) { $currentstring.=' width="'.$width.'" '; }          } else {
  if ($height) { $currentstring.=' height="'.$height.'" '; }     $currentstring .= '<img src="'.$src.'" alt="'.$alt.'" ';
  $currentstring .= ' />';     if ($width) { $currentstring.=' width="'.$width.'" '; }
      if ($height) { $currentstring.=' height="'.$height.'" '; }
      $currentstring .= ' />';
           }
     } elsif ($target eq 'modified') {      } elsif ($target eq 'modified') {
  my ($osrc,$owidth,$oheight)=   my ($osrc,$owidth,$oheight)=
     ($token->[2]{'src'},$token->[2]{'width'},$token->[2]{'height'});      ($token->[2]{'src'},$token->[2]{'width'},$token->[2]{'height'});
Line 4544  sub align_latex_image { Line 4550  sub align_latex_image {
     my ($align, $latex_rendering, $image, $width, $height) = @_;      my ($align, $latex_rendering, $image, $width, $height) = @_;
     my $currentstring;        # The 1/2 wrapped image.      my $currentstring;        # The 1/2 wrapped image.
     my $closure;              # The closure of the wrappage.      my $closure;              # The closure of the wrappage.
   
       # if it's none just return it back
       if ($latex_rendering eq 'none') {
    return ($image,'');
       }
   
     #    If there's an alignment specification we need to honor it here.      #    If there's an alignment specification we need to honor it here.
     #    For the horizontal alignments, we will also honor the      #    For the horizontal alignments, we will also honor the
     #    value of the latex specfication.  The default is parbox,      #    value of the latex specfication.  The default is parbox,

Removed from v.1.377  
changed lines
  Added in v.1.381


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