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 <r.m.k...@gmail.com> 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 _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode