--- loncom/xml/londefdef.pm	2009/10/01 15:31:24	1.411
+++ loncom/xml/londefdef.pm	2010/05/04 19:40:47	1.416
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.411 2009/10/01 15:31:24 bisitz Exp $
+# $Id: londefdef.pm,v 1.416 2010/05/04 19:40:47 faziophi Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -549,6 +549,8 @@ sub start_body {
             'text'  => 'HTML Editor',
             'href'  => '',
         });
+        # breadcrumbs (and tools) will be created 
+        # in start_page->bodytag->innerregister
     } else {
         # FIXME Where are we?
     }
@@ -561,8 +563,6 @@ sub start_body {
 #					    'no_title'       => 1,
 					    'force_register' => 1});
 
-    $currentstring .= &Apache::lonhtmlcommon::breadcrumbs();
-
         my $header = '';
         if ($env{'request.state'} ne 'published' &&
             $env{'request.state'} ne 'construct') {
@@ -575,6 +575,8 @@ sub start_body {
             $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') {
@@ -597,7 +599,11 @@ sub edit_controls {
 </div>';
     }
     $result .= '
-<div><input type="submit" name="editmode" accesskey="e" value="'.&mt('Edit').'" /></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>
 ';
@@ -3891,12 +3897,16 @@ sub end_colgroup {
     return $currentstring;
 }
 
+
 #-- <del> tag (end tag required)
 sub start_del {
     my ($target,$token) = @_;
     my $currentstring = '';
     if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
+    } elsif ($target eq 'tex') {
+	&disable_para();
+	$currentstring .= '\st{';  
     } 
     return $currentstring;
 }
@@ -3905,7 +3915,10 @@ sub end_del {
     my ($target,$token) = @_;
     my $currentstring = '';
     if ($target eq 'web' || $target eq 'webgrade') {
-	$currentstring = $token->[2];    
+	$currentstring = $token->[2];     
+    } elsif ($target eq 'tex') {
+	&enable_para();
+	$currentstring = '}';
     } 
     return $currentstring;
 }
@@ -4745,7 +4758,7 @@ sub align_latex_image {
     #    Even though we set a default alignment value, the user
     #    could have given us an illegal value.  In that case we
     #    just use the default alignment of bottom..
-    $currentstring = "\n% figurewrapping \n";
+    $currentstring = '';
     if      ($align eq "top")    {
 	$currentstring .= '\raisebox{-'.$height.'mm}{'.$image;
 	$closure = '}';
@@ -4788,8 +4801,6 @@ sub align_latex_image {
 	$currentstring .= "{$image";
 	$closure       = '}';
     }
-    $currentstring .= "\n% end wrappage\n";
-    $closure        = "\n% Begin closure\n".$closure."\n% End closure\n";
     return ($currentstring, $closure);
 }
 
@@ -4809,8 +4820,7 @@ sub is_inside_of {
 #
 #   This sub provides the typical LaTeX prefix matter for tex output:
 #
-sub latex_header
-{
+sub latex_header {
     my ($mode) = @_;
     my $currentstring = '';
 
@@ -4844,6 +4854,7 @@ sub latex_header
 	"\\usepackage{xcolor}\n".
 	'\usepackage{calc}'.
 	'\usepackage{amsmath}'.
+    '\usepackage{soul}',
 	'\usepackage{amssymb}'.
 	'\usepackage{amsfonts}'.
 	'\usepackage{amsthm}'.