[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: |
Mon, 17 Nov 2014 09:43:28 -0500 |
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
The relevant part of the latex output is:
#+BEGIN_SRC latex
\begin{table}[htb]
\caption{T1}
\centering
\begin{tabular}{r}
A\\
\hline
2\\
\hline
3\\
\end{tabular}
\end{table}
\begin{table}[htb]
\caption{T2}
\centering
\begin{tabular}{r}
A\\
2\\
3\\
\end{tabular}
\end{table}
#+END_SRC
Both \hlines in Table T2 are missing.
Kind regards,
Tian Qiu
On Sun, Nov 16, 2014 at 1:37 PM, Charles Berry <address@hidden> wrote:
> <iemacs <at> gmail.com> writes:
>
>>
>> Hi,
>>
>> I encounter a problem when I use #+CALL to create a table with latex
>> export. The problem is that the first row of the table is missing, if
>> the table is created with #+CALL.
>>
> [deleted - setup info]
>
>> The minimal table example is
>>
>> #+BEGIN_EXAMPLE
>> #+NAME: t1
>> #+BEGIN_SRC python :exports results
>> return [['A'],None,[2]]
>> #+END_SRC
>>
>> #+CAPTION: T1
>> #+RESULTS: t1
>>
>> #+NAME: t2
>> #+CALL: t1() :exports results
>>
>> #+CAPTION: T2
>> #+RESULTS: t2
>> #+END_EXAMPLE
>>
>
> This is not a latex issue per se. If you evaluate t2 with
>
> `org-babel-execute-maybe'
>
> the same thing will happen.
>
> org-babel-execute:python does its own formatting. #+CALL: OTOH passes
> the results to babel.
>
> The workaround is to use
>
> #+CALL: t1() :colnames yes
>
> HTH,
>
> Chuck
>
>
>