--- loncom/xml/londefdef.pm	2003/02/07 22:03:21	1.112
+++ loncom/xml/londefdef.pm	2003/02/14 20:57:09	1.114
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.112 2003/02/07 22:03:21 albertel Exp $
+# $Id: londefdef.pm,v 1.114 2003/02/14 20:57:09 sakharuk Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -49,6 +49,7 @@ use strict;
 use Apache::lonxml;
 use Apache::File();
 use Image::Magick;
+use Apache::lonmenu;
 
 BEGIN {
 
@@ -154,11 +155,12 @@ sub start_html {
     } elsif ($target eq 'tex') {
 	@Apache::londefdef::table = ();
 	$currentstring .= '\documentclass[letterpaper]{article}
-                                 \newcommand{\keephidden}[1]{}
-                                 \renewcommand{\deg}{$^{\circ}$}
-                                 \usepackage[dvips]{graphicx}
-                                 \usepackage{epsfig}\usepackage{calc}
-                                 \newenvironment{choicelist}{\begin{enumerate}}{\end{enumerate}}';
+                           \newcommand{\keephidden}[1]{}
+                           \renewcommand{\deg}{$^{\circ}$}
+                           \usepackage{textcomp}
+                           \usepackage[dvips]{graphicx}
+                           \usepackage{epsfig}\usepackage{calc}
+\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}}';
     }
     return $currentstring;
 }
@@ -183,7 +185,7 @@ sub start_html {
 	    my ($target,$token) = @_;
             my $currentstring = '';
             if ($target eq 'web') {
-              $currentstring = &Apache::lonxml::registerurl(undef,$target).
+              $currentstring = &Apache::lonmenu::registerurl(undef,$target).
                                $token->[2];    
             } 
 	   return $currentstring;
@@ -365,7 +367,7 @@ sub start_html {
             if ($target eq 'web') {
 	      if (!$Apache::lonxml::registered) {
 		$currentstring.='<head>'.
-		    &Apache::lonxml::registerurl(undef,$target).'</head>';
+		    &Apache::lonmenu::registerurl(undef,$target).'</head>';
 	      }
 	      my $onLoad='';
 	      foreach my $key (keys(%{$token->[2]})) {
@@ -374,7 +376,7 @@ sub start_html {
 		  delete($token->[2]->{$key});
 		}
 	      }
-	      $token->[2]->{'onload'}=&Apache::lonxml::loadevents().
+	      $token->[2]->{'onload'}=&Apache::lonmenu::loadevents().
 		                       ';'.$onLoad;
 	      my $onUnload='';
 	      foreach my $key (keys(%{$token->[2]})) {
@@ -383,7 +385,7 @@ sub start_html {
 		  delete($token->[2]->{$key});
 		}
 	      }
-	      $token->[2]->{'onunload'}=&Apache::lonxml::unloadevents().
+	      $token->[2]->{'onunload'}=&Apache::lonmenu::unloadevents().
 		                         ';'.$onUnload;
 
 	      $currentstring .= '<'.$token->[1];
@@ -397,7 +399,9 @@ sub start_html {
 		<input type="submit" name="editmode" value="Edit" />
 		</form>
 EDITBUTTON
-	      }
+              } else {
+		$currentstring.=&Apache::lonmenu::menubuttons(undef,$target);
+              }
        	    } elsif ($target eq 'tex') {
               $currentstring = '\begin{document}';  
 	    } 
@@ -1789,7 +1793,7 @@ sub end_allow {
 	  if ($target eq 'web') { 
 	    if (!$Apache::lonxml::registered) {
 	      $currentstring.='<head>'.
-		  &Apache::lonxml::registerurl(undef,$target).'</head>';
+		  &Apache::lonmenu::registerurl(undef,$target).'</head>';
 	    }
 	    $currentstring .= $token->[4];
 	  }