From ce02a1b986f03cd6bd90b0eb48767252de7dd959 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Fri, 26 Aug 2011 02:32:08 +0530 Subject: [PATCH] org-odt: Force columns of tables to have the same width * contrib/lisp/org-odt.el (org-odt-end-table): Associate table columns with `OrgTableColumn' style. (org-odt-format-source-code-or-example): Delete trailing whitespace. * contrib/odt/styles/OrgOdtAutomaticStyles.xml: Modify `OrgTable' style to use a relative width of 90%. Effective table width is now increased so that tables are not congested. There could be a reverse problem of they being too big. This is OK. Introduced `OrgTableColumn' style and force the columns to use the same width. Fixes the following symptoms - congested table and uneven columns - seen with the below report.. http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01053.html Table cookies can specify default column width. These could be used for finer control of column widths on per-table basis. However this introduces the need to create automatic column styles for each and every column that is explicitly sized. The exporter has so far avoided creating of automatic styles `on the go' and instead relied on a custom styles for formatting. If column-widths are made user-controllable then this has to change and the exporter could become a bit inelegant. Is the overhead worth it? --- contrib/lisp/org-odt.el | 6 ++++-- contrib/odt/styles/OrgOdtAutomaticStyles.xml | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el index 5c44c6c44..46e678e69 100644 --- a/contrib/lisp/org-odt.el +++ b/contrib/lisp/org-odt.el @@ -648,7 +648,9 @@ PUB-DIR is set, use this as the publishing directory." (defun org-odt-end-table () (goto-char org-lparse-table-begin-marker) (loop for level from 0 below org-lparse-table-ncols - do (insert (org-odt-format-tags "" ""))) + do (insert + (org-odt-format-tags + "" ""))) ;; fill style attributes for table cells (when org-lparse-table-is-styled @@ -995,7 +997,7 @@ Use `org-odt-format-source-code-or-example-plain' or value of `org-export-odt-use-htmlfontify." (funcall (if (and org-export-odt-use-htmlfontify - (or (featurep 'htmlfontify) (require 'htmlfontify)) + (or (featurep 'htmlfontify) (require 'htmlfontify)) (fboundp 'htmlfontify-string)) 'org-odt-format-source-code-or-example-colored 'org-odt-format-source-code-or-example-plain) diff --git a/contrib/odt/styles/OrgOdtAutomaticStyles.xml b/contrib/odt/styles/OrgOdtAutomaticStyles.xml index 0cc7b1ed6..c4116c0f3 100644 --- a/contrib/odt/styles/OrgOdtAutomaticStyles.xml +++ b/contrib/odt/styles/OrgOdtAutomaticStyles.xml @@ -17,8 +17,13 @@ - + + + + + + -- 2.11.4.GIT