From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: How can I write side by side code comparison table Date: Thu, 11 Jul 2013 14:17:38 -0400 Message-ID: <5f495f03a8d53a846a68f4463b72c988@mail.rickster.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxLQy-0007aM-Qk for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 14:17:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxLQw-0003kV-9i for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 14:17:40 -0400 Received: from [204.62.15.78] (port=37966 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxLQw-0003kI-6O for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 14:17:38 -0400 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: Jisang Yoo Cc: emacs-orgmode On 2013-07-10 18:00, Jisang Yoo wrote: > I can write a table: ... > but I don't know how to combine the two-column table with the two > source code blocks in a way that exports to code tables like in > Emergency Elisp how about for scalars as example blocks: #+name: emacs-scalar #+BEGIN_SRC emacs-lisp "emacs-lisp" #+END_SRC #+name: perl-scalar #+BEGIN_SRC perl :results value return "perl"; #+END_SRC #+HEADER: :colnames '(emacs perl) #+BEGIN_SRC emacs-lisp :var a=emacs-scalar b=perl-scalar `((,a ,b)) #+END_SRC #+RESULTS: | emacs | perl | |------------+------| | emacs-lisp | perl | and generalized for lists: #+name: list1 #+BEGIN_SRC emacs-lisp '(a1 a2) #+END_SRC #+name: list2 #+BEGIN_SRC emacs-lisp '(b1 b2) #+END_SRC #+HEADER: :colname-names '((nil list1 list2)) #+BEGIN_SRC emacs-lisp :var l1=list1 l2=list2 (require 'cl) (mapcar* 'list l1 l2) #+END_SRC #+RESULTS: | list1 | list2 | |-------+-------| | a1 | b1 | | a2 | b2 | rick