Diff for /loncom/xml/londefdef.pm between versions 1.401 and 1.412

version 1.401, 2009/04/13 20:42:32 version 1.412, 2009/10/15 22:39:58
Line 538  sub start_body { Line 538  sub start_body {
   
  my $extra_head = &generate_css_links();   my $extra_head = &generate_css_links();
   
       # Breadcrumbs
       &Apache::lonhtmlcommon::clear_breadcrumbs();
       if ($env{'request.state'} eq 'construct') {
           &Apache::lonhtmlcommon::add_breadcrumb({
               'text'  => 'Construction Space',
               'href'  => &Apache::loncommon::authorspace(),
           });
           &Apache::lonhtmlcommon::add_breadcrumb({
               'text'  => 'HTML Editor',
               'href'  => '',
           });
       } else {
           # FIXME Where are we?
       }
   
  $currentstring =    $currentstring = 
     &Apache::loncommon::start_page($Apache::londefdef::title,      &Apache::loncommon::start_page($Apache::londefdef::title,
    $Apache::londefdef::head     $Apache::londefdef::head
       .$extra_head,        .$extra_head,
    {'add_entries'    => $token->[2],     {'add_entries'    => $token->[2],
     'no_title'       => 1,  #    'no_title'       => 1,
     'force_register' => 1});      'force_register' => 1});
   
  if ($env{'request.state'} ne 'published') {          if ($env{'request.state'} eq 'construct') {
     $currentstring.=&Apache::lonmenu::constspaceform();              $currentstring .= &Apache::lonhtmlcommon::breadcrumbs();
     $currentstring.=&Apache::londefdef::edit_controls();          }
  }  
  $currentstring.=&Apache::lonxml::message_location();          my $header = '';
           if ($env{'request.state'} ne 'published' &&
               $env{'request.state'} ne 'construct') {
               $header=&Apache::lonmenu::constspaceform();
           }
           if ($env{'request.state'} ne 'published') {
               $header.=&Apache::londefdef::edit_controls();
           }
           if ($env{'request.state'} eq 'construct') {
               $currentstring.=&Apache::loncommon::head_subbox(
                                   &Apache::loncommon::CSTR_pageheader()
                                  .$header);
           } elsif ($env{'request.state'} eq 'edit') {
               $currentstring.=&Apache::loncommon::head_subbox($header);
           }
           $currentstring.=&Apache::lonxml::message_location();
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $currentstring = '\begin{document}';            $currentstring = '';   #  '\begin{document}' is in header.
     }       }
   
     return $currentstring;      return $currentstring;
 }  }
   
Line 570  sub edit_controls { Line 601  sub edit_controls {
 </div>';  </div>';
     }      }
     $result .= '      $result .= '
 <div class="LC_edit_problem_header_edit_row"><input type="submit" name="editmode" accesskey="e" value="'.&mt('Edit').'" /></div></div>  <div><input type="submit" name="editmode" accesskey="e" value="'.&mt('Edit').'" />';
       if (($env{'request.course.id'}) && ($env{'form.forceedit'})) {
           $result .= ('&nbsp;' x 3).'<input type="button" value="'.&mt('Course View').'" onclick="javascript:location.href=currentURL" />';
       }
       $result .= '</div>
   </div>
 </form>  </form>
 <br />';  ';
     return $result;      return $result;
 }  }
   
Line 1349  sub start_font { Line 1385  sub start_font {
     my $currentstring = '';      my $currentstring = '';
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  my $face=&Apache::lonxml::get_param('face',$parstack,$safeeval);   my $face=&Apache::lonxml::get_param('face',$parstack,$safeeval);
  if ($face!~/symbol/i) {  
     if (($env{'browser.fontenhance'} eq 'on') ||   
  ($env{'browser.blackwhite'} eq 'on')) { return ''; }  
  }  
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     }  elsif ($target eq 'tex') {      }  elsif ($target eq 'tex') {
  my $fontsize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval);   my $fontsize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval);
Line 3508  sub start_frameset { Line 3540  sub start_frameset {
     &Apache::loncommon::start_page($Apache::londefdef::title,      &Apache::loncommon::start_page($Apache::londefdef::title,
    $Apache::londefdef::head,     $Apache::londefdef::head,
    {'add_entries'    => $token->[2],     {'add_entries'    => $token->[2],
     'no_title'       => 1,  #    'no_title'       => 1,
     'force_register' => 1,      'force_register' => 1,
     'frameset'       => 1,});      'frameset'       => 1,});
   
Line 4787  sub is_inside_of { Line 4819  sub is_inside_of {
 #  #
 sub latex_header  sub latex_header
 {  {
       my ($mode) = @_;
     my $currentstring = '';      my $currentstring = '';
   
     $currentstring .=       $currentstring .= 
    "\n% &Apache::lonxml::londefdef \n" .
  '\documentclass[letterpaper,twoside]{article}\raggedbottom';   '\documentclass[letterpaper,twoside]{article}\raggedbottom';
     if (($env{'form.latex_type'}=~'batchmode') ||      if (($env{'form.latex_type'}=~'batchmode') ||
  (!$env{'request.role.adv'})) {$currentstring .='\batchmode';}    (!$env{'request.role.adv'}) || 
    ($mode eq 'batchmode')) {$currentstring .='\batchmode';} 
     $currentstring .= '\newcommand{\keephidden}[1]{}'.      $currentstring .= '\newcommand{\keephidden}[1]{}'.
  '\renewcommand{\deg}{$^{\circ}$}'.   '\renewcommand{\deg}{$^{\circ}$}'.
  '\usepackage{multirow}'.   '\usepackage{multirow}'.
Line 4820  sub latex_header Line 4855  sub latex_header
  '\usepackage{amssymb}'.   '\usepackage{amssymb}'.
  '\usepackage{amsfonts}'.   '\usepackage{amsfonts}'.
  '\usepackage{amsthm}'.   '\usepackage{amsthm}'.
  '\usepackage{amscd}';   '\usepackage{amscd}'
               .'\usepackage{picins}\usepackage{calc}'."\n". # From lonprintout.pm
    '\usepackage[T1]{fontenc}'."\n".
    '\usepackage{lmodern}'."\n".
    '\usepackage[postscript]{ucs}'."\n".
    '\usepackage[utf8x]{inputenc}'."\n".
    '\usepackage{pifont}'  . "\n";
   
     if($env{'form.pdfFormFields'} eq 'yes') {      if($env{'form.pdfFormFields'} eq 'yes') {
  $currentstring .= '\usepackage{hyperref}'.   $currentstring .= '\usepackage{hyperref}'.
     '\usepackage{eforms}'.      '\usepackage{eforms}'.
Line 4830  sub latex_header Line 4871  sub latex_header
           
         $currentstring .= '\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}}'.          $currentstring .= '\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}}';                            '\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}}';
       $currentstring .= '\begin{document}';
           
     return $currentstring;      return $currentstring;
   

Removed from v.1.401  
changed lines
  Added in v.1.412


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