[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
foxr
lon-capa-cvs@mail.lon-capa.org
Thu, 12 Jan 2006 23:48:00 -0000
foxr Thu Jan 12 18:48:00 2006 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
bug 4545 - If in a table, <p> closing text generated \strut \\ \strut and the
\\ is a bad thing to have in a table cell as it signals end of the table row.
Therefore, if in table, I've substituted an explicit \vskip 12pt to get
the effect I think the user wants.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.312 loncom/xml/londefdef.pm:1.313
--- loncom/xml/londefdef.pm:1.312 Wed Jan 11 06:58:06 2006
+++ loncom/xml/londefdef.pm Thu Jan 12 18:48:00 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.312 2006/01/11 11:58:06 foxr Exp $
+# $Id: londefdef.pm,v 1.313 2006/01/12 23:48:00 foxr Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -1187,6 +1187,7 @@
$closing_string = '</p>'; # Deal correctly with <p /> e.g.
}
} elsif ($target eq 'tex' && !$para_disabled) {
+
$currentstring .= &end_p(); # close off prior para if in progress.
my $align=&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1);
if ($align eq 'center') {
@@ -1204,7 +1205,11 @@
$closing_string = '}\hfill}';
} else {
$currentstring.='\par ';
- $closing_string = '\strut\\\\\strut ';
+ if (&is_inside_of($tagstack, 'table')) {
+ $closing_string = '\vskip 12pt'; # Safer in tables.
+ } else {
+ $closing_string = '\strut\\\\\strut ';
+ }
}
}