emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] [babel] FEATURE REQUEST: send results into file


From: Eric Schulte
Subject: Re: [Orgmode] [babel] FEATURE REQUEST: send results into file
Date: Wed, 29 Sep 2010 09:53:28 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Hi Rainer,

I'm not sure that code blocks are the solution for this particular
problem.  The following simple function should do what you want.

--8<---------------cut here---------------start------------->8---
(defun schulte/current-table-to-tex (file)
  "Export the current table as latex to FILE."
  (interactive "F")
  ((lambda (tex-table) (with-temp-file file (insert tex-table)))
   (org-export-region-as-latex (org-table-begin) (org-table-end) t 'string)))
--8<---------------cut here---------------end--------------->8---

Best -- Eric

Rainer M Krug <address@hidden> writes:

> Hi
>
> Based on a discussion in the thread "Problem with PROPERTIES :OPTIONS: when
> exporting subtree", The idea came ub by Mathew Lundin to be able to "send
> the results or a source code block (either executed code or exported org
> snippets) via babel to a target in an external file.".
>
> The scenario or context in which the idea came up:
>
> I am using org babel for literate programming and I document my parameters
> for simulations in a table in org. Now when writing a paper, for which I use
> a different program (I use LyX), but I still would like to include the
> tables from my original org file in them. Therefore I was looking for a
> possibility to export ONLY the table into a .tex file, so that it can be
> included in the LyX / LaTeX via \input{theTable.tex} . Therefore I would
> need an export of the table in LaTeX format, but no preamble or anything. As
> far as I was told, this possibility does not exist in org.
>
> So Mathew's / my question is if it would be possible to include a
> functionality to "send the results or a source code block (either executed
> code or exported org snippets) via babel to a target in an external file.".
>
>
> Cheers,
>
> Rainer



reply via email to

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