emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [new exporter] Captions for tables made by source blocks


From: Nicolas Goaziou
Subject: Re: [O] [new exporter] Captions for tables made by source blocks
Date: Thu, 07 Mar 2013 09:20:36 +0100

Hello,

Mike McLean <address@hidden> writes:

> On Wed, Mar 6, 2013 at 7:28 AM, Nicolas Goaziou <address@hidden> wrote:
>
>> Vikas Rawal <address@hidden> writes:
>>
>> >> CAPTION keyword above a source block applies to the source block only.
>> >> If the source block generates a table, you have to put a CAPTION above
>> >> it, as it will not inherit the caption of the source block.
>> >>
>> >> It also implies that you need to name the results. Otherwise, source
>> >> block will not recognize its own production, due to the CAPTION keyword
>> >> above it.
>> >>
>> >
>> > Thank you once again Nicolas.
>> >
>> > I understand from this that the variable org-babel-results-keyword has
>> > to be changed to NAME. I did this and it works.
>> >
>> > Is there a way that this could be file-specific?
>>
>> I wasn't clear. By "naming the results", I mean that you must provide
>> your source block a "#+NAME: something" attribute, so the generated
>> table gets a "#+RESULTS: something" attribute.
>>
>
> Interesting that this topic comes up today just as I noticed it. I'm still
> unclear about how to put the CAPTION keyword in when using a dynamic block
> via org-collector.el.
>
> I have the lines below and I do not get a table caption like I used to in
> the old exporter.
>
> #+NAME: tbl-coi
> #+CAPTION: COI Table
> #+BEGIN: propview :colnames ( "Area" "Shorthand" "COI" ) :cols ( AREA
> CATEGORY ITEM ) :match "+COI+LEVEL=2-ARCHIVE" :noquote t :scope agenda
> :inherit (AREA)

For the same reason, caption here applies to the dynamic block, not to
its contents.

The usual way to handle it is to provide a :caption argument in the
header, which will in turn create a "#+CAPTION" keyword above the table
upon updating.

However, I don't think that org-collector handles it. You may want to
patch it (you can look at `org-clocktable-write-default' for an
example).


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]