From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikas Rawal Subject: Re: adding attributes to tables in results Date: Sat, 21 Nov 2015 23:39:26 +0530 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0CbS-0002Ca-9U for emacs-orgmode@gnu.org; Sat, 21 Nov 2015 13:09:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0CbN-0004N3-HU for emacs-orgmode@gnu.org; Sat, 21 Nov 2015 13:09:38 -0500 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:36526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0CbN-0004Mx-7F for emacs-orgmode@gnu.org; Sat, 21 Nov 2015 13:09:33 -0500 Received: by pacdm15 with SMTP id dm15so148567818pac.3 for ; Sat, 21 Nov 2015 10:09:32 -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: John Kitchin Cc: org-mode mailing list , "Charles C. Berry" John, Just curious. What advantage do you see in adding these attributes to = the code block, and not directly to the result? Vikas > On 21-Nov-2015, at 11:34 pm, John Kitchin = wrote: >=20 > Thanks. That gets me pretty close to what I want. >=20 > Charles C. Berry writes: >=20 >> On Sat, 21 Nov 2015, John Kitchin wrote: >>=20 >>> Hi everyone, >>>=20 >>> I am trying to figure out a way to automatically add some attributes = to >>> tables generated from code blocks. >>>=20 >>=20 >> With ob-org loaded: >>=20 >> #+BEGIN_SRC emacs-lisp >> (require 'ob-org) >> #+END_SRC >>=20 >> this src block (n.b. there is a backslash escaped n in the #+HEADER = line >> just before the #+ATTR - I hope it doesn't linewrap in email or gnus >> readers) >>=20 >> --8<---------------cut here---------------start------------->8--- >> #+HEADER: :wrap "src org :exports results :results replace = \n#+ATTR_LATEX: :environment longtable" >> #+BEGIN_SRC emacs-lisp :exports results >> (list (+ 2 4) 4 5) >> #+END_SRC >> --8<---------------cut here---------------end--------------->8--- >>=20 >> exports as >>=20 >> --8<---------------cut here---------------start------------->8--- >>=20 >> \begin{longtable}{rrr} >> 6 & 4 & 5\\ >> \end{longtable} >> \end{document} >>=20 >> --8<---------------cut here---------------end--------------->8--- >>=20 >>=20 >> HTH, >>=20 >> Chuck >=20 > -- > 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 >=20