From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: adding attributes to tables in results Date: Sat, 21 Nov 2015 08:55:13 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a08dL-00016m-Mb for emacs-orgmode@gnu.org; Sat, 21 Nov 2015 08:55:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a08dI-0000I8-EI for emacs-orgmode@gnu.org; Sat, 21 Nov 2015 08:55:19 -0500 Received: from mail-qg0-x236.google.com ([2607:f8b0:400d:c04::236]:35181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a08dI-0000I4-9Z for emacs-orgmode@gnu.org; Sat, 21 Nov 2015 08:55:16 -0500 Received: by qgec40 with SMTP id c40so90208069qge.2 for ; Sat, 21 Nov 2015 05:55:15 -0800 (PST) Received: from Johns-MacBook-Air.local (c-71-206-238-169.hsd1.pa.comcast.net. [71.206.238.169]) by smtp.gmail.com with ESMTPSA id w75sm980075qka.25.2015.11.21.05.55.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Nov 2015 05:55:14 -0800 (PST) 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: Org Mode Hi everyone, I am trying to figure out a way to automatically add some attributes to tables generated from code blocks. These aren't the same all the time, but some typical things I would want to do is specify some tables to be longtable, or set the placements, alignments, etc... I know of http://orgmode.org/manual/post.html#post which works for non-table output well, but with tables, adding the text makes the output not render as a table anymore. For example: #+name: attr_wrap #+begin_src sh :var data="" :results output echo "#+ATTR_LATEX: :environment longtable" echo $data #+end_src #+BEGIN_SRC emacs-lisp :post attr_wrap(*this*) (list (+ 2 4) 4 5) #+END_SRC #+RESULTS: : #+ATTR_LATEX: :environment longtable : 6 4 5 Does anyone know a way to have a code block output a table with attributes (besides printing them as strings with raw output)? -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu