emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* INCLUDE heading
@ 2014-09-17 23:04 Rob Richmond
  2015-04-01 18:44 ` Joon Ro
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Richmond @ 2014-09-17 23:04 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1340 bytes --]

Hi all,

I use org-mode to write both papers and slides. The code to generate tables
and figures is placed in source blocks. Most of the time I use the same
tables in my slides as in my papers, but a lot of preprocessing code is
needed to generate the tables. I'd like to put the generation of these
tables in its own org-mode file and just be able to include certain
headings in the paper or slide document. For example, I would have an
org-mode document called mytables.org:

    * Heading 1

    ** Regressions

    #+BEGIN_SRC R

    cat("hello world")

    #+END_SRC R

    * Heading 2


And another document mypaper.org:

    * Section 1

    #+INCLUDE: "mytables.org" :heading "Heading 1/Regressions"

    * Section 2

The content from below the ** Regression headline in mytables.org would be
included on export in mypaper.org. It would also be great to be able to
follow the INCLUDE to the file with C-c '. Org provides some facilities for
these includes, but does not allow for headings (
http://orgmode.org/manual/Include-files.html ). Obviously org does not have
the :heading parameter, but any suggestions for a solution to make this
work are greatly appreciated. It looks like org-export-expand-include-keyword
is doing a lot of the magic of including the files, but I'm not sure where
to go from there.

Thanks for any help.

[-- Attachment #2: Type: text/html, Size: 5958 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: INCLUDE heading
  2014-09-17 23:04 INCLUDE heading Rob Richmond
@ 2015-04-01 18:44 ` Joon Ro
  2015-04-01 19:42   ` Rasmus
  0 siblings, 1 reply; 5+ messages in thread
From: Joon Ro @ 2015-04-01 18:44 UTC (permalink / raw)
  To: emacs-orgmode

Rob Richmond <robbyr <at> gmail.com> writes:

> 
> 
> Hi all,
> I use org-mode to write both papers and slides. The code to generate tables 
and figures is placed in source blocks. Most of the time I use the same 
tables in my slides as in my papers, but a lot of preprocessing code is 
needed to generate the tables. I'd like to put the generation of these tables 
in its own org-mode file and just be able to include certain headings in the 
paper or slide document. For example, I would have an org-mode document 
called mytables.org:
>     * Heading 1
>     ** Regressions
>     #+BEGIN_SRC R
>     cat("hello world")
>     #+END_SRC R
>     * Heading 2
> 
> And another document mypaper.org:
>     * Section 1
>     #+INCLUDE: "mytables.org" :heading "Heading 1/Regressions"
>     * Section 2
> The content from below the ** Regression headline in mytables.org would be 
included on export in mypaper.org. It would also be great to be able to 
follow the INCLUDE to the file with C-c '. Org provides some facilities for 
these includes, but does not allow for headings ( 
http://orgmode.org/manual/Include-files.html ). Obviously org does not have 
the :heading parameter, but any suggestions for a solution to make this work 
are greatly appreciated. It looks like org-export-expand-include-keyword is 
doing a lot of the magic of including the files, but I'm not sure where to go 
from there.
> 

I would love to have this feature (include only a subtree from another org 
file) as well.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: INCLUDE heading
  2015-04-01 18:44 ` Joon Ro
@ 2015-04-01 19:42   ` Rasmus
  2015-04-01 19:53     ` Joon Ro
  0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2015-04-01 19:42 UTC (permalink / raw)
  To: emacs-orgmode

Joon Ro <joon.ro@outlook.com> writes:

> I would love to have this feature (include only a subtree from another org 
> file) as well.

You can do this in Org v8.3.

-- 
Vote for proprietary math!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: INCLUDE heading
  2015-04-01 19:42   ` Rasmus
@ 2015-04-01 19:53     ` Joon Ro
  2015-04-01 20:14       ` Rasmus
  0 siblings, 1 reply; 5+ messages in thread
From: Joon Ro @ 2015-04-01 19:53 UTC (permalink / raw)
  To: Rasmus, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

> From: rasmus@gmx.us
> Date: Wed, 1 Apr 2015 21:42:43 +0200
> Subject: Re: [O] INCLUDE heading
> 
> Joon Ro <joon.ro@outlook.com> writes:
> 
> > I would love to have this feature (include only a subtree from another org 
> > file) as well.
> 
> You can do this in Org v8.3.
> 

Thanks - I'm glad to hear that - in fact I just installed 8.3beta yesterday so I'm good to go. I couldn't find  the relevant documentation though - could you please refer me to it? 
-Joon 		 	   		  

[-- Attachment #2: Type: text/html, Size: 1006 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: INCLUDE heading
  2015-04-01 19:53     ` Joon Ro
@ 2015-04-01 20:14       ` Rasmus
  0 siblings, 0 replies; 5+ messages in thread
From: Rasmus @ 2015-04-01 20:14 UTC (permalink / raw)
  To: joon.ro; +Cc: emacs-orgmode

Joon Ro <joon.ro@outlook.com> writes:

>> From: rasmus@gmx.us
>> Date: Wed, 1 Apr 2015 21:42:43 +0200
>
>> Subject: Re: [O] INCLUDE heading
>> 
>> Joon Ro <joon.ro@outlook.com> writes:
>> 
>> > I would love to have this feature (include only a subtree from another org 
>> > file) as well.
>> 
>> You can do this in Org v8.3.
>> 
>
> Thanks - I'm glad to hear that - in fact I just installed 8.3beta
> yesterday so I'm good to go. I couldn't find the relevant
> documentation though - could you please refer me to it?

Try:

        (info "(org) Include Files")

Be sure to check the 8.3 manual and not the 8.2 manual.


-- 
There are known knowns; there are things we know that we know

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-01 20:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 23:04 INCLUDE heading Rob Richmond
2015-04-01 18:44 ` Joon Ro
2015-04-01 19:42   ` Rasmus
2015-04-01 19:53     ` Joon Ro
2015-04-01 20:14       ` Rasmus

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).