[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm /xml londefdef.pm

foxr lon-capa-cvs@mail.lon-capa.org
Mon, 19 Dec 2005 23:27:33 -0000


foxr		Mon Dec 19 18:27:33 2005 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
    /loncom/xml	londefdef.pm 
  Log:
  Make some furtive first steps at getting table rowspan/colspan attributes
  to work.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.409 loncom/interface/lonprintout.pm:1.410
--- loncom/interface/lonprintout.pm:1.409	Mon Dec 19 17:30:01 2005
+++ loncom/interface/lonprintout.pm	Mon Dec 19 18:27:28 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.409 2005/12/19 22:30:01 foxr Exp $
+# $Id: lonprintout.pm,v 1.410 2005/12/19 23:27:28 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -821,6 +821,7 @@
 	$output.='\batchmode';
     }
     $output.='\newcommand{\keephidden}[1]{}\renewcommand{\deg}{$^{\circ}$}'."\n".
+   	    '\usepackage{multirow}'."\n".
 	     '\usepackage{longtable}\usepackage{textcomp}\usepackage{makeidx}'."\n".
 	     '\usepackage[dvips]{graphicx}\usepackage{epsfig}'."\n".
 	     '\usepackage{wrapfig}'.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.302 loncom/xml/londefdef.pm:1.303
--- loncom/xml/londefdef.pm:1.302	Tue Dec  6 17:55:31 2005
+++ loncom/xml/londefdef.pm	Mon Dec 19 18:27:33 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.302 2005/12/06 22:55:31 foxr Exp $
+# $Id: londefdef.pm,v 1.303 2005/12/19 23:27:33 foxr Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -2347,7 +2347,15 @@
 sub end_td_tex {
     my ($parstack,$parser,$safeeval) = @_;
     my $current_row = $Apache::londefdef::table[-1]{'row_number'};
-    my $data=&Apache::lonxml::endredirection();
+    my $data = &Apache::lonxml::endredirection();
+
+    # Get the column and row spans.
+    # Colspan can be done via \multicolumn if I can figure out the data structs.
+    # Rowspan, can be done using the multirow package which adds similar stuff to rowspanning.
+
+    my $colspan = &Apache::lonxml::get_param('colspan', $parstack, $safeeval, undef, 0);
+    my $rowspan = &Apache::lonxml::get_param('rowspan', $parstack, $safeeval, undef, 0);
+    
     my $TeXwidth=&Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0);
     if (defined $TeXwidth) {		
 	push @ {$Apache::londefdef::table[-1]{'objectlen'}[$Apache::londefdef::table[-1]{'row_number'}] },'0';