[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] #+CALL get the first row of output table lost when using latex e
From: |
iemacs |
Subject: |
Re: [O] #+CALL get the first row of output table lost when using latex export |
Date: |
Wed, 19 Nov 2014 09:48:51 -0500 |
#+NAME: t2
#+CALL: t1() :exports results :hlines yes
will give the right latex output, thank you!
Kind regards,
Tian Qiu
On Mon, Nov 17, 2014 at 11:08 AM, Charles C. Berry <address@hidden> wrote:
> On Mon, 17 Nov 2014, address@hidden wrote:
>
>> Thank you, Charles. And =:colnames yes= does work here. But the
>> results are the same when I evaluate t1 and t2 with
>> `org-babel-execute-maybe'.
>>
>> When I take another try, new problem seems to occur.
>>
>> The test file is:
>> #+BEGIN_EXAMPLE
>> #+NAME: t1
>> #+BEGIN_SRC python :exports results
>> return [['A'],None,[2],None,[3]]
>> #+END_SRC
>>
>> #+CAPTION: T1
>> #+RESULTS: t1
>>
>> #+NAME: t2
>> #+CALL: t1() :exports results
>>
>> #+CAPTION: T2
>> #+RESULTS: t2
>> #+END_EXAMPLE
>>
>> The results of `org-babel-execute-maybe' on t1 and t2 are identical:
>> #+BEGIN_SRC org
>> | A |
>> |---|
>> | 2 |
>> |---|
>> | 3 |
>> #+END_SRC
>
>
> Not in my world (unless you add `:hlines').
>
> ,----
> | #+NAME: t1
> | #+BEGIN_SRC python :exports results
> | return [['A'],None,[2],None,[3]]
> | #+END_SRC
> |
> | #+CAPTION: T1
> | #+RESULTS: t1
> | | A |
> | |---|
> | | 2 |
> | |---|
> | | 3 |
> |
> | #+NAME: t2
> | #+CALL: t1() :exports results
> |
> | #+CAPTION: T2
> | #+RESULTS: t2
> | | A |
> | | 2 |
> | | 3 |
> `----
>
>
> ob-python.el seems to be doing its own thing here.
>
> What you see in the second instance is the usual Babel output for a table.
>
> In my view this is a bug in ob-python.el.
>
> See: (info "(org) hlines") for the proper idiom.
>
> HTH,
>
> Chuck