From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: Re: #+CALL get the first row of output table lost when using latex export Date: Mon, 17 Nov 2014 09:43:28 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqNWm-0003Fp-Jb for emacs-orgmode@gnu.org; Mon, 17 Nov 2014 09:43:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqNWd-0003Tw-0S for emacs-orgmode@gnu.org; Mon, 17 Nov 2014 09:43:40 -0500 Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:62481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqNWc-0003T8-Qu for emacs-orgmode@gnu.org; Mon, 17 Nov 2014 09:43:30 -0500 Received: by mail-ob0-f173.google.com with SMTP id uy5so3276290obc.4 for ; Mon, 17 Nov 2014 06:43:28 -0800 (PST) In-Reply-To: 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: Charles Berry Cc: org-mode mailing list 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 wrote: > 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 > > >