From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: org->odt/html table export: adjusting default behaviour? Date: Fri, 26 Aug 2011 03:10:05 +0530 Message-ID: <81pqjtqife.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qwhfe-0004BL-8o for emacs-orgmode@gnu.org; Thu, 25 Aug 2011 17:41:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qwhfd-0008UE-38 for emacs-orgmode@gnu.org; Thu, 25 Aug 2011 17:41:06 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:44207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qwhfc-0008U1-RP for emacs-orgmode@gnu.org; Thu, 25 Aug 2011 17:41:05 -0400 Received: by pzk36 with SMTP id 36so3725401pzk.17 for ; Thu, 25 Aug 2011 14:41:03 -0700 (PDT) In-Reply-To: (Matt Price's message of "Thu, 25 Aug 2011 11:12:16 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Price Cc: Org Mode Matt Price writes: > The attached test file shows an org file with tables whose columns > include substantial amounts of text. The default export to odt is > pretty ugly in this case, and even in html (where things work to some > extent) I would rather be able to control to some extent the way that > long fields wrap. is there a recommended way to do set values like > table and column width for these two exports? I guess I am > particularly concerned with the odt export -- can I e.g. adjust a > default value somewhere in the styles.xml file? I doubt the problem > will be easily solved but if someone can point me in the right > direction I'd really appreciate it. The issue is not that fields don't wrap well but that the table is big for the width of the paper and columns are as a result getting congested. I have pushed a fix whereby tables now occupy bigger space [1]. I also noticed that columns are unevenly spaced. Now I have updated the styles so that columns are equally spaced [2]. Orgmode exporters can never be layout engines. They are also typically useful for personal (as opposed to professional) production. In some sense they are good for handouts, pamphlets and drafts etc. So some amount of hand fixing and finer adjustments would always be required. You choose a smaller font for text in the table with: F11->Paragraph Styles->OrgTableContents->Choose a smaller (say 10 pt) font. This will affect the text in all the tables. For the sake of documentation, Vertical and horizontal grid lines in the exported table correspond to colgroups (specified in table cookie lines) and by horizontal rulers in the org table [3]. You can use these grid lines in the Org file and automatically the exporter will create the grid lines for you. If you need really prettier tables you can rely on Table->Autoformat. Footnotes: [1] So there is now a reverse problem of tables with less number of columns and not having copious text looking too big. But big is better even if it is ugly. The workaround is to rely on Table Properties->Table->Width [2] Pre-processor in org-exp.el groks l, r, c cookies but ignores the colwidth directives. With some changes these colwidth directives could be used for controlling the relative width of columns on a per-table basis. This has to wait. If there is sufficient demand I can consider adding this support. The workaround is to rely on Table Properties->Columns->Column Width [3] The exporter wouldn't still create vertical lines on the extreme ends. I believe the default style of tables is so selected based on some standard styling manual. --