From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neuwirth Erich Subject: Re: Multicolumn Date: Wed, 29 Aug 2012 09:44:58 +0200 Message-ID: <0B256A56-D434-4B08-AA03-47EB34218932@univie.ac.at> References: <1DB0A90A-0891-46BF-A110-C8EB85175B5B@univie.ac.at> <503D6242.2040708@grierwhite.com> <6016052F-A436-4E4A-860A-3D0F1FD80B88@univie.ac.at> Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6d5K-0006LK-GE for emacs-orgmode@gnu.org; Wed, 29 Aug 2012 03:53:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6d5E-000305-D6 for emacs-orgmode@gnu.org; Wed, 29 Aug 2012 03:53:10 -0400 Received: from grace.univie.ac.at ([131.130.3.115]:51640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6d5E-0002zE-0N for emacs-orgmode@gnu.org; Wed, 29 Aug 2012 03:53:04 -0400 In-Reply-To: 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: "Thomas S. Dye" Cc: orgmode@grierwhite.com, emacs-orgmode@gnu.org That is probably what I will have to do. But since I want both html and LaTeX output, I have to two write = separate output routines in R which I had hoped to be able to avoid. On Aug 29, 2012, at 4:39 AM, tsd@tsdye.com (Thomas S. Dye) wrote: > Neuwirth Erich writes: >=20 >> My problem is that the tables are produce by R code snippets. >> The code snippets produce plain org tables, bracketed by attributes = identifying=20 >> the text as ORG code. >>=20 >>=20 >>=20 >> #+RESULTS: >> #+BEGIN_ORG >> | Jahr | Region | m | w | pWert | m.se | w.se | >> |------+--------+-----+-----+-------+-------+-------| >> | 2000 | Sonst | 508 | 507 | 0.85 | 4.91 | 4.93 | >> #+END_ORG >>=20 >>=20 >> I am able to insert additional lines before and after the text = produce >> by the R commands with the following technique (in R): >>=20 >>=20 >> print(as.table(NULL),quote=3DFALSE,type=3D"org") >> cat("|-------|\n") >> print(res,type=3D"org") >> cat("|-------|\n") >>=20 >>=20 >> So I could write a line with my multicol headers. >> But for that to work, org mode would have to honor multicol = indicators >> in the text. >=20 > Alternatively, compose latex or html tables in R and then have the = source > code block :results output latex or :results output html >=20 > That should wrap the output in #+BEGIN_LATEX ... #+END_LATEX, which = org > will export directly to LaTeX, or #+BEGIN_HTML ... #+END_HTML, which = org > will export directly to HTML. >=20 > hth, > Tom >=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> On Aug 29, 2012, at 2:28 AM, "Christopher J. White" >> wrote: >>=20 >>> Hi Erich, >>>=20 >>> I have a hack for multicolumn support that may help... It's not >>> great, but serves my purpose. >>>=20 >>> I implemented a TWiki mode that uses orgtbl-minor-mode. TWiki pages >>> support multicolumn cells by adding vertical bars with no >>> separators: >>>=20 >>> Display: >>>=20 >>> | Multicol | >>> | C1 | C2 | >>>=20 >>> TWiki format: >>> | Multicol || >>> | C1 | C2 | >>>=20 >>> Notice the double vertical bars after Multicol. The number of >>> vertical bars on every row must be the same. You can join as many >>> cells as you want that way. I basically wanted to be able to still >>> use orgtbl-minor-mode to edit such tables. So I hacked my >>> twiki-import/export code to convert "||" to "| << |" and vice-versa. >>>=20 >>> So the orgtbl version of the above looks like this in the buffer: >>>=20 >>> | Multicol | << | >>> | C1 | C2 | >>>=20 >>> The down side is that the text "Multicol" will expand the display >>> size of C1, so if it gets long, the table grows: >>>=20 >>> | This is a long multicol cell | << | >>> | C1 | C2 | >>>=20 >>> So it gets me what I want, which is orgtbl editing, and >>> import/export support to twiki format. Seems a similar technique >>> could be backed in to any org export engine. >>>=20 >>> ...cj >>>=20 >>> On 8/28/12 5:10 PM, Neuwirth Erich wrote: >>>> After some googling it seems that multicolumn support is not yet >>>> implemented in org tables. >>>> I would need multicolumn headers quite urgently, >>>> but I have not yet found a way to make this possible. >>>>=20 >>>> I think that tables with headers like this: >>>>=20 >>>> | | mean | s.e. | >>>> | gender | varA | varB | varA | varB | >>>>=20 >>>> are quite common, so I really want to put this feature on the wish = list. >>>> I am not able to implement this myself. >>>>=20 >>>> Erich >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>=20 >>>=20 >>=20 >>=20 >>=20 >=20 > --=20 > Thomas S. Dye > http://www.tsdye.com