* [babel] FEATURE REQUEST: send results into file
@ 2010-09-29 8:58 Rainer M Krug
2010-09-29 9:21 ` Sébastien Vauban
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Rainer M Krug @ 2010-09-29 8:58 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1655 bytes --]
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
--
NEW GERMAN FAX NUMBER!!!
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa
Cell: +27 - (0)83 9479 042
Fax: +27 - (0)86 516 2782
Fax: +49 - (0)321 2125 2244
email: Rainer@krugs.de
Skype: RMkrug
Google: R.M.Krug@gmail.com
[-- Attachment #1.2: Type: text/html, Size: 2146 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [babel] FEATURE REQUEST: send results into file
2010-09-29 8:58 [babel] FEATURE REQUEST: send results into file Rainer M Krug
@ 2010-09-29 9:21 ` Sébastien Vauban
2010-09-29 10:24 ` Rainer M Krug
2010-09-29 15:53 ` Eric Schulte
2010-09-29 16:02 ` Thomas S. Dye
2 siblings, 1 reply; 8+ messages in thread
From: Sébastien Vauban @ 2010-09-29 9:21 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Rainer,
Rainer M Krug wrote:
> 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.
*Side question*, because this is quite important, I think: why are you still
using LyX directly?
For my literate programming needs, I've been able to completely forget about
my past ways to do:
- Nuweb (in MS Windows) extensions to LaTeX
- Noweb (in Linux) extensions to LaTeX
and switch, with much more benefits, to Org-only files. What is stopping you
from being able to do so? That root cause should be fixed, IMHO -- if doable,
of course...
> As far as I was told, this possibility does not exist in org.
If I understand correctly, this is, indeed, the difficulty Eric exposed us,
when I was working on the isodoc letter (trying to convert Org blocks to
LaTeX, and get everything assembled upon exporting).
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: [babel] FEATURE REQUEST: send results into file
2010-09-29 9:21 ` Sébastien Vauban
@ 2010-09-29 10:24 ` Rainer M Krug
2010-09-29 10:59 ` Sébastien Vauban
0 siblings, 1 reply; 8+ messages in thread
From: Rainer M Krug @ 2010-09-29 10:24 UTC (permalink / raw)
To: Sébastien Vauban; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 3751 bytes --]
2010/9/29 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
> Hi Rainer,
>
> Rainer M Krug wrote:
> > 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.
>
> *Side question*, because this is quite important, I think: why are you
> still
> using LyX directly?
>
Because it is easier for me? Don't get me wrong - I really like org mode and
org babel - I can not imagine working without them (wait - I did that until
about a year ago...). But for writing papers for publication, other tools
are more suitable FOR ME: These papers do not include any literate
programming and no to be executed code, and I really like the interface of
LyX for writing. More even then a text editor for LaTeX (however advanced or
not it may be), it does what it is supposed to be doing: to let me
concentrate on the contents of the paper. But as I said, that is my personal
opinion, and others might prefer other approaches.
>
> For my literate programming needs, I've been able to completely forget
> about
> my past ways to do:
>
> - Nuweb (in MS Windows) extensions to LaTeX
> - Noweb (in Linux) extensions to LaTeX
>
> and switch, with much more benefits, to Org-only files.
Yes - concerning programming, literate programming, documenting the source
code, etc., org mode with org-babel is PERFECT.
> What is stopping you from being able to do so?
As I said - org is getting close to being a swiss army knife, but I tried to
open a bottle with it and my screen broke - so I still use a bottle opener
for that...
> That root cause should be fixed, IMHO -- if doable, of course...
>
>
> > As far as I was told, this possibility does not exist in org.
>
> If I understand correctly, this is, indeed, the difficulty Eric exposed us,
> when I was working on the isodoc letter (trying to convert Org blocks to
> LaTeX, and get everything assembled upon exporting).
>
Effectively, yes - except that the org block converted to LaTeX should be
available in files, which can be used from other programs as well.
Cheers,
Rainer
> Best regards,
> Seb
>
> --
> Sébastien Vauban
>
>
> _______________________________________________
> 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
>
--
NEW GERMAN FAX NUMBER!!!
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa
Cell: +27 - (0)83 9479 042
Fax: +27 - (0)86 516 2782
Fax: +49 - (0)321 2125 2244
email: Rainer@krugs.de
Skype: RMkrug
Google: R.M.Krug@gmail.com
[-- Attachment #1.2: Type: text/html, Size: 5083 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [babel] FEATURE REQUEST: send results into file
2010-09-29 10:24 ` Rainer M Krug
@ 2010-09-29 10:59 ` Sébastien Vauban
2010-09-29 11:54 ` Rainer M Krug
0 siblings, 1 reply; 8+ messages in thread
From: Sébastien Vauban @ 2010-09-29 10:59 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Rainer,
Rainer M Krug wrote:
> 2010/9/29 Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
>> Rainer M Krug wrote:
>> *Side question*, because this is quite important, I think: why are you
>> still using LyX directly?
>
> Because it is easier for me? Don't get me wrong - I really like org mode and
> org babel - I can not imagine working without them (wait - I did that until
> about a year ago...). But for writing papers for publication, other tools
> are more suitable FOR ME: These papers do not include any literate
> programming and no to be executed code, and I really like the interface of
> LyX for writing. More even then a text editor for LaTeX (however advanced or
> not it may be), it does what it is supposed to be doing: to let me
> concentrate on the contents of the paper.
On concentrating on the contents, I find it easier to (as someone to) read:
--8<---------------cut here---------------start------------->8---
Because:
- reason 1
- and reason 2
--8<---------------cut here---------------end--------------->8---
than:
--8<---------------cut here---------------start------------->8---
Because:
\begin{itemize}
\item reason 1
\item and reason 2
\end{itemize}
--8<---------------cut here---------------end--------------->8---
Same for tables...
That's why I now hate going back to LaTeX. But, I know, habits can be hard to
change.
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: [babel] FEATURE REQUEST: send results into file
2010-09-29 10:59 ` Sébastien Vauban
@ 2010-09-29 11:54 ` Rainer M Krug
0 siblings, 0 replies; 8+ messages in thread
From: Rainer M Krug @ 2010-09-29 11:54 UTC (permalink / raw)
To: Sébastien Vauban; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 2567 bytes --]
2010/9/29 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
> Rainer,
>
> Rainer M Krug wrote:
> > 2010/9/29 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
> >> Rainer M Krug wrote:
> >> *Side question*, because this is quite important, I think: why are you
> >> still using LyX directly?
> >
> > Because it is easier for me? Don't get me wrong - I really like org mode
> and
> > org babel - I can not imagine working without them (wait - I did that
> until
> > about a year ago...). But for writing papers for publication, other tools
> > are more suitable FOR ME: These papers do not include any literate
> > programming and no to be executed code, and I really like the interface
> of
> > LyX for writing. More even then a text editor for LaTeX (however advanced
> or
> > not it may be), it does what it is supposed to be doing: to let me
> > concentrate on the contents of the paper.
>
> On concentrating on the contents, I find it easier to (as someone to) read:
>
> --8<---------------cut here---------------start------------->8---
> Because:
> - reason 1
> - and reason 2
> --8<---------------cut here---------------end--------------->8---
>
> than:
>
> --8<---------------cut here---------------start------------->8---
> Because:
> \begin{itemize}
> \item reason 1
> \item and reason 2
> \end{itemize}
> --8<---------------cut here---------------end--------------->8---
>
Absolutely - and that is why I am using LyX and not LaTeX: in these regards
a LITTLE bit like WYSIWYG, but within the complete LaTeX power and not with
"painting" layouts like in word.
Cheers,
Rainer
>
> Same for tables...
>
> That's why I now hate going back to LaTeX. But, I know, habits can be hard
> to
> change.
>
> Best regards,
> Seb
>
> --
> Sébastien Vauban
>
>
> _______________________________________________
> 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
>
--
NEW GERMAN FAX NUMBER!!!
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa
Cell: +27 - (0)83 9479 042
Fax: +27 - (0)86 516 2782
Fax: +49 - (0)321 2125 2244
email: Rainer@krugs.de
Skype: RMkrug
Google: R.M.Krug@gmail.com
[-- Attachment #1.2: Type: text/html, Size: 3555 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [babel] FEATURE REQUEST: send results into file
2010-09-29 8:58 [babel] FEATURE REQUEST: send results into file Rainer M Krug
2010-09-29 9:21 ` Sébastien Vauban
@ 2010-09-29 15:53 ` Eric Schulte
2010-09-29 16:02 ` Thomas S. Dye
2 siblings, 0 replies; 8+ messages in thread
From: Eric Schulte @ 2010-09-29 15:53 UTC (permalink / raw)
To: Rainer M Krug; +Cc: emacs-orgmode
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.krug@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [babel] FEATURE REQUEST: send results into file
2010-09-29 8:58 [babel] FEATURE REQUEST: send results into file Rainer M Krug
2010-09-29 9:21 ` Sébastien Vauban
2010-09-29 15:53 ` Eric Schulte
@ 2010-09-29 16:02 ` Thomas S. Dye
2010-09-29 16:22 ` Eric Schulte
2 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2010-09-29 16:02 UTC (permalink / raw)
To: Rainer M Krug; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 4712 bytes --]
Aloha Rainer,
Perhaps this will work? Eric Schulte wrote a function to make a LaTeX
table out of an Org-mode table. You should be able to call it from
within a LaTeX source block that tangles to a suitably named file.
There is an added benefit in the support for booktabs rules, so you'll
need to have the booktabs package installed.
hth,
Tom
> --8<---------------cut here---------------start------------->8---
> *** booktabs
> This block can be used to wrap a table in the latex =booktabs=
> environment, it takes the following arguments -- all but the first two
> are optional.
> | arg | description |
> |-------+--------------------------------------------|
> | table | a reference to the table |
> | align | optional alignment string |
> | env | optional environment, default to "tabular" |
> | width | optional width specification string |
>
> #+srcname: booktabs
> #+begin_src emacs-lisp :var table='((:head) hline (:body)) :var
> align='() :var env="tabular" :var width='() :noweb yes :results latex
> (flet ((to-tab (tab)
> (orgtbl-to-generic
> (mapcar (lambda (lis)
> (if (listp lis)
> (mapcar (lambda (el)
> (if (stringp el)
> el
> (format "%S" el))) lis)
> lis)) tab)
> (list :lend " \\\\" :sep " & " :hline "\\hline"))))
> (org-fill-template
> "
> \\begin{%env}%width%align
> \\toprule
> %table
> \\bottomrule
> \\end{%env}\n"
> (list
> (cons "env" (or env "table"))
> (cons "width" (if width (format "{%s}" width) ""))
> (cons "align" (if align (format "{%s}" align) ""))
> (cons "table"
> ;; only use \midrule if it looks like there are column
> headers
> (if (equal 'hline (second table))
> (concat (to-tab (list (first table)))
> "\n\\midrule\n"
> (to-tab (cddr table)))
> (to-tab table))))))
> #+end_src
> --8<---------------cut here---------------end--------------->8---
>
> once loaded it can be applied as here
>
> --8<---------------cut here---------------start------------->8---
> ** booktabs
> #+tblname: months
> | num | Abbrev. |
> |-----+---------|
> | 1 | Jan. |
> | 2 | Feb. |
> | 3 | Mar. |
>
> #+call: booktabs(table=months, align="r|l") :results latex :exports
> results
> --8<---------------cut here---------------end--------------->8---
On Sep 28, 2010, at 10:58 PM, Rainer M Krug wrote:
> 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
>
>
> --
> NEW GERMAN FAX NUMBER!!!
>
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Natural Sciences Building
> Office Suite 2039
> Stellenbosch University
> Main Campus, Merriman Avenue
> Stellenbosch
> South Africa
>
> Cell: +27 - (0)83 9479 042
> Fax: +27 - (0)86 516 2782
> Fax: +49 - (0)321 2125 2244
> email: Rainer@krugs.de
>
> Skype: RMkrug
> Google: R.M.Krug@gmail.com
>
> _______________________________________________
> 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
[-- Attachment #1.2: Type: text/html, Size: 10253 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [babel] FEATURE REQUEST: send results into file
2010-09-29 16:02 ` Thomas S. Dye
@ 2010-09-29 16:22 ` Eric Schulte
0 siblings, 0 replies; 8+ messages in thread
From: Eric Schulte @ 2010-09-29 16:22 UTC (permalink / raw)
To: Thomas S. Dye; +Cc: emacs-orgmode, Rainer M Krug
"Thomas S. Dye" <tsd@tsdye.com> writes:
> Aloha Rainer,
>
> Perhaps this will work? Eric Schulte wrote a function to make a LaTeX
> table out of an Org-mode table.
Ah, thanks for suggesting this Tom, I'd forgotten about that function.
If you'll indulge me, I'd like to expound upon the library of babel
(lob) as I sometimes feel that it is underutilized among Babel features.
The function below is distributed in the lob in the contrib directory of
Org-mode, and by putting something like
(org-babel-lob-ingest "~/src/org/contrib/babel/library-of-babel.org")
into your Emacs initialization all of the many library of Babel
functions -- I'd recommend browsing the file as there are some
interesting functions -- will be available from any Org-mode file to be
called using call lines
#+call: booktabs(table=...)
or executable noweb references in source blocks as Tom suggests below.
This file lives in the contrib directory to ease the process of adding
user-contributed functions without the authors having to go through the
Emacs assignment process.
Best -- Eric
> You should be able to call it from within a LaTeX source block that
> tangles to a suitably named file. There is an added benefit in the
> support for booktabs rules, so you'll need to have the booktabs
> package installed.
>
> hth,
> Tom
>
>> --8<---------------cut here---------------start------------->8---
>> *** booktabs
>> This block can be used to wrap a table in the latex =booktabs=
>> environment, it takes the following arguments -- all but the first two
>> are optional.
>> | arg | description |
>> |-------+--------------------------------------------|
>> | table | a reference to the table |
>> | align | optional alignment string |
>> | env | optional environment, default to "tabular" |
>> | width | optional width specification string |
>>
>> #+srcname: booktabs
>> #+begin_src emacs-lisp :var table='((:head) hline (:body)) :var
>> align='() :var env="tabular" :var width='() :noweb yes :results
>> latex
>> (flet ((to-tab (tab)
>> (orgtbl-to-generic
>> (mapcar (lambda (lis)
>> (if (listp lis)
>> (mapcar (lambda (el)
>> (if (stringp el)
>> el
>> (format "%S" el))) lis)
>> lis)) tab)
>> (list :lend " \\\\" :sep " & " :hline "\\hline"))))
>> (org-fill-template
>> "
>> \\begin{%env}%width%align
>> \\toprule
>> %table
>> \\bottomrule
>> \\end{%env}\n"
>> (list
>> (cons "env" (or env "table"))
>> (cons "width" (if width (format "{%s}" width) ""))
>> (cons "align" (if align (format "{%s}" align) ""))
>> (cons "table"
>> ;; only use \midrule if it looks like there are column
>> headers
>> (if (equal 'hline (second table))
>> (concat (to-tab (list (first table)))
>> "\n\\midrule\n"
>> (to-tab (cddr table)))
>> (to-tab table))))))
>> #+end_src
>> --8<---------------cut here---------------end--------------->8---
>>
>> once loaded it can be applied as here
>>
>> --8<---------------cut here---------------start------------->8---
>> ** booktabs
>> #+tblname: months
>> | num | Abbrev. |
>> |-----+---------|
>> | 1 | Jan. |
>> | 2 | Feb. |
>> | 3 | Mar. |
>>
>> #+call: booktabs(table=months, align="r|l") :results latex :exports
>> results
>> --8<---------------cut here---------------end--------------->8---
>
> On Sep 28, 2010, at 10:58 PM, Rainer M Krug wrote:
>
>> 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
>>
>>
>> --
>> NEW GERMAN FAX NUMBER!!!
>>
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
>> Biology, UCT), Dipl. Phys. (Germany)
>>
>> Centre of Excellence for Invasion Biology
>> Natural Sciences Building
>> Office Suite 2039
>> Stellenbosch University
>> Main Campus, Merriman Avenue
>> Stellenbosch
>> South Africa
>>
>> Cell: +27 - (0)83 9479 042
>> Fax: +27 - (0)86 516 2782
>> Fax: +49 - (0)321 2125 2244
>> email: Rainer@krugs.de
>>
>> Skype: RMkrug
>> Google: R.M.Krug@gmail.com
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-09-29 16:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 8:58 [babel] FEATURE REQUEST: send results into file Rainer M Krug
2010-09-29 9:21 ` Sébastien Vauban
2010-09-29 10:24 ` Rainer M Krug
2010-09-29 10:59 ` Sébastien Vauban
2010-09-29 11:54 ` Rainer M Krug
2010-09-29 15:53 ` Eric Schulte
2010-09-29 16:02 ` Thomas S. Dye
2010-09-29 16:22 ` Eric Schulte
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).