[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Multicolumn
From: |
Neuwirth Erich |
Subject: |
Re: [O] Multicolumn |
Date: |
Wed, 29 Aug 2012 03:05:16 +0200 |
My problem is that the tables are produce by R code snippets.
The code snippets produce plain org tables, bracketed by attributes identifying
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=FALSE,type="org")
cat("|-------|\n")
print(res,type="org")
cat("|-------|\n")
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" <address@hidden> wrote:
> Hi Erich,
>
> I have a hack for multicolumn support that may help... It's not great, but
> serves my purpose.
>
> I implemented a TWiki mode that uses orgtbl-minor-mode. TWiki pages support
> 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 of 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 support
> 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 implemented
>> 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
>>
>>
>>
>>
>
>