[gnumeric] Enable hyphenation of multirow content in LaTeX export



commit 4d549305206b31196e38237a4097ae57620dca0d
Author: Andreas J. Guelzow <aguelzow math concordia ab ca>
Date:   Wed Mar 3 11:20:12 2010 -0700

    Enable hyphenation of multirow content in LaTeX export
    
    2010-03-03  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* latex.c (latex2e_write_multicolumn_cell): wrap multirows into
    	  \parbox to allow for hyphenation

 plugins/html/ChangeLog |    5 +++++
 plugins/html/latex.c   |    7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plugins/html/ChangeLog b/plugins/html/ChangeLog
index 2b5fbbf..f20aad7 100644
--- a/plugins/html/ChangeLog
+++ b/plugins/html/ChangeLog
@@ -1,5 +1,10 @@
 2010-03-03  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* latex.c (latex2e_write_multicolumn_cell): wrap multirows into
+	  \parbox to allow for hyphenation
+
+2010-03-03  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* latex.c (latex2e_write_file_header): add new length
 	(latex2e_write_blank_multicolumn_cell): use different setup 
 	  for multirow cells
diff --git a/plugins/html/latex.c b/plugins/html/latex.c
index 0eb59f3..2bc04d0 100644
--- a/plugins/html/latex.c
+++ b/plugins/html/latex.c
@@ -919,7 +919,10 @@ latex2e_write_multicolumn_cell (GsfOutput *output, GnmCell *cell, int start_col,
 			if (i>0)
 				gsf_output_printf (output, "\t \\addtolength{\\gnumericMultiRowLength}{\\tabcolsep}%%\n");
 		}
-		gsf_output_printf (output, "\t \\multirow{%i}[%i]{\\gnumericMultiRowLength}{%%\n\t ", num_merged_rows, num_merged_rows/2);
+		gsf_output_printf (output, 
+				   "\t \\multirow{%i}[%i]{\\gnumericMultiRowLength}"
+				   "{\\parbox{\\gnumericMultiRowLength}{%%\n\t ", 
+				   num_merged_rows, num_merged_rows/2);
 	}
 
 
@@ -1050,7 +1053,7 @@ latex2e_write_multicolumn_cell (GsfOutput *output, GnmCell *cell, int start_col,
 
 	/* Close the multirowtext. */
 	if (num_merged_rows > 1)
-		gsf_output_printf (output, "}");
+		gsf_output_printf (output, "}}");
 
 	/* Close the multicolumn text bracket. */
 	if (num_merged_cols > 1 || left_border != GNM_STYLE_BORDER_NONE



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]