emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vikas Rawal <vikaslists@agrarianresearch.org>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>,
	"Charles C. Berry" <ccberry@ucsd.edu>
Subject: Re: adding attributes to tables in results
Date: Sat, 21 Nov 2015 23:39:26 +0530	[thread overview]
Message-ID: <FD38A251-94CB-4D19-9417-26FA29571AB7@agrarianresearch.org> (raw)
In-Reply-To: <m2oaendya9.fsf@andrew.cmu.edu>

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 <jkitchin@andrew.cmu.edu> 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	other threads:[~2015-11-21 18:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-21 13:55 adding attributes to tables in results John Kitchin
2015-11-21 17:40 ` Charles C. Berry
2015-11-21 18:04   ` John Kitchin
2015-11-21 18:09     ` Vikas Rawal [this message]
2015-11-21 18:52       ` John Kitchin
2015-11-21 20:04         ` Charles C. Berry
2015-11-21 21:45           ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FD38A251-94CB-4D19-9417-26FA29571AB7@agrarianresearch.org \
    --to=vikaslists@agrarianresearch.org \
    --cc=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).