From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Multicolumn Date: Tue, 28 Aug 2012 20:47:18 -0500 Message-ID: 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6XNI-0000ou-9y for emacs-orgmode@gnu.org; Tue, 28 Aug 2012 21:47:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6XNH-00080k-3F for emacs-orgmode@gnu.org; Tue, 28 Aug 2012 21:47:20 -0400 Received: from mail-vb0-f41.google.com ([209.85.212.41]:55740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6XNG-00080f-VP for emacs-orgmode@gnu.org; Tue, 28 Aug 2012 21:47:19 -0400 Received: by vbkv13 with SMTP id v13so48518vbk.0 for ; Tue, 28 Aug 2012 18:47:18 -0700 (PDT) In-Reply-To: <6016052F-A436-4E4A-860A-3D0F1FD80B88@univie.ac.at> 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: Neuwirth Erich Cc: orgmode@grierwhite.com, emacs-orgmode@gnu.org On Tue, Aug 28, 2012 at 8:05 PM, Neuwirth Erich wrote: > My problem is that the tables are produce by R code snippets. > The code snippets produce plain org tables, bracketed by attributes ident= ifying > the text as ORG code. > > > > #+RESULTS: > #+BEGIN_ORG > | Jahr | Region | m | w | pWert | m.se | w.se | > |------+--------+-----+-----+-------+-------+-------| > | 2000 | Sonst | 508 | 507 | 0.85 | 4.91 | 4.93 | > #+END_ORG > > > I am able to insert additional lines before and after the text produce by= the R commands with the following technique (in R): > > > print(as.table(NULL),quote=3DFALSE,type=3D"org") > cat("|-------|\n") > print(res,type=3D"org") > cat("|-------|\n") > Not ideal, but could your R code just write the LaTeX syntax? cat() the align statement and then cat() the "&" and "\\" stuff manually? John > > 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. > > > > > > On Aug 29, 2012, at 2:28 AM, "Christopher J. White" wrote: > >> Hi Erich, >> >> I have a hack for multicolumn support that may help... It's not great, b= ut serves my purpose. >> >> I implemented a TWiki mode that uses orgtbl-minor-mode. TWiki pages sup= port multicolumn cells by adding vertical bars with no separators: >> >> Display: >> >> | Multicol | >> | C1 | C2 | >> >> TWiki format: >> | Multicol || >> | C1 | C2 | >> >> 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. >> >> So the orgtbl version of the above looks like this in the buffer: >> >> | Multicol | << | >> | C1 | C2 | >> >> The down side is that the text "Multicol" will expand the display size o= f C1, so if it gets long, the table grows: >> >> | This is a long multicol cell | << | >> | C1 | C2 | >> >> So it gets me what I want, which is orgtbl editing, and import/export su= pport to twiki format. Seems a similar technique could be backed in to any= org export engine. >> >> ...cj >> >> On 8/28/12 5:10 PM, Neuwirth Erich wrote: >>> After some googling it seems that multicolumn support is not yet implem= ented in org tables. >>> I would need multicolumn headers quite urgently, >>> but I have not yet found a way to make this possible. >>> >>> I think that tables with headers like this: >>> >>> | | mean | s.e. | >>> | gender | varA | varB | varA | varB | >>> >>> are quite common, so I really want to put this feature on the wish list= . >>> I am not able to implement this myself. >>> >>> Erich >>> >>> >>> >>> >> >> > >