--- loncom/xml/londefdef.pm 2009/04/13 20:42:32 1.401 +++ loncom/xml/londefdef.pm 2009/05/28 12:39:12 1.408 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.401 2009/04/13 20:42:32 raeburn Exp $ +# $Id: londefdef.pm,v 1.408 2009/05/28 12:39:12 bisitz Exp $ # # # Copyright Michigan State University Board of Trustees @@ -538,22 +538,40 @@ sub start_body { my $extra_head = &generate_css_links(); + # Breadcrumbs + &Apache::lonhtmlcommon::clear_breadcrumbs(); + &Apache::lonhtmlcommon::add_breadcrumb({ + 'text' => 'Construction Space', + 'href' => '', # FIXME Add link to /priv/[user] + }); + &Apache::lonhtmlcommon::add_breadcrumb({ + 'text' => 'HTML Editor', + 'href' => '', + }); + $currentstring = &Apache::loncommon::start_page($Apache::londefdef::title, $Apache::londefdef::head .$extra_head, {'add_entries' => $token->[2], - 'no_title' => 1, +# 'no_title' => 1, 'force_register' => 1}); - if ($env{'request.state'} ne 'published') { - $currentstring.=&Apache::lonmenu::constspaceform(); - $currentstring.=&Apache::londefdef::edit_controls(); - } - $currentstring.=&Apache::lonxml::message_location(); + $currentstring .= &Apache::lonhtmlcommon::breadcrumbs(); + + my $header = ''; + if ($env{'request.state'} ne 'published') { + $header=&Apache::lonmenu::constspaceform() + .&Apache::londefdef::edit_controls(); + } + $currentstring.=&Apache::loncommon::head_subbox( + &Apache::loncommon::CSTR_pageheader() + .$header); + $currentstring.=&Apache::lonxml::message_location(); } elsif ($target eq 'tex') { - $currentstring = '\begin{document}'; - } + $currentstring = ''; # '\begin{document}' is in header. + } + return $currentstring; } @@ -570,9 +588,10 @@ sub edit_controls { '; } $result .= ' -
+
+ -
'; +'; return $result; } @@ -1349,10 +1368,6 @@ sub start_font { my $currentstring = ''; if ($target eq 'web' || $target eq 'webgrade') { 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]; } elsif ($target eq 'tex') { my $fontsize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval); @@ -3508,7 +3523,7 @@ sub start_frameset { &Apache::loncommon::start_page($Apache::londefdef::title, $Apache::londefdef::head, {'add_entries' => $token->[2], - 'no_title' => 1, +# 'no_title' => 1, 'force_register' => 1, 'frameset' => 1,}); @@ -4787,12 +4802,15 @@ sub is_inside_of { # sub latex_header { + my ($mode) = @_; my $currentstring = ''; $currentstring .= + "\n% &Apache::lonxml::londefdef \n" . '\documentclass[letterpaper,twoside]{article}\raggedbottom'; 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]{}'. '\renewcommand{\deg}{$^{\circ}$}'. '\usepackage{multirow}'. @@ -4820,8 +4838,14 @@ sub latex_header '\usepackage{amssymb}'. '\usepackage{amsfonts}'. '\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') { $currentstring .= '\usepackage{hyperref}'. '\usepackage{eforms}'. @@ -4830,6 +4854,7 @@ 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}}'. '\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;