emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] adding attributes to tables in results


From: Vikas Rawal
Subject: Re: [O] adding attributes to tables in results
Date: Sat, 21 Nov 2015 23:39:26 +0530

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 <address@hidden> wrote:
> 
> Thanks. That gets me pretty close to what I want.
> 
> Charles C. Berry writes:
> 
>> On Sat, 21 Nov 2015, John Kitchin wrote:
>> 
>>> Hi everyone,
>>> 
>>> I am trying to figure out a way to automatically add some attributes to
>>> tables generated from code blocks.
>>> 
>> 
>> With ob-org loaded:
>> 
>> #+BEGIN_SRC emacs-lisp
>> (require 'ob-org)
>> #+END_SRC
>> 
>> 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)
>> 
>> --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---
>> 
>> exports as
>> 
>> --8<---------------cut here---------------start------------->8---
>> 
>> \begin{longtable}{rrr}
>> 6 & 4 & 5\\
>> \end{longtable}
>> \end{document}
>> 
>> --8<---------------cut here---------------end--------------->8---
>> 
>> 
>> HTH,
>> 
>> Chuck
> 
> --
> 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
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]