From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Richmond Subject: INCLUDE heading Date: Wed, 17 Sep 2014 16:04:21 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0160c1566e146405034ae3bd Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUOH0-0001oo-QZ for emacs-orgmode@gnu.org; Wed, 17 Sep 2014 19:04:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUOGz-00017K-Fb for emacs-orgmode@gnu.org; Wed, 17 Sep 2014 19:04:30 -0400 Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:65241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUOGz-000162-4O for emacs-orgmode@gnu.org; Wed, 17 Sep 2014 19:04:29 -0400 Received: by mail-la0-f48.google.com with SMTP id ty20so60782lab.21 for ; Wed, 17 Sep 2014 16:04:21 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --089e0160c1566e146405034ae3bd Content-Type: text/plain; charset=UTF-8 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. --089e0160c1566e146405034ae3bd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi all,=

I use org-mode to wr= ite both papers and slides. The code to generate tables and figures is plac= ed 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 ta= bles. I'd like to put the generation of these tables in its own org-mod= e file and just be able to include certain headings in the paper or slide d= ocument. For example, I would have an org-mode document called mytables.org:

=C2=A0 =C2=A0 * Heading 1

=C2=A0 =C2=A0 ** Regressi= ons

=C2=A0 =C2=A0 #+B= EGIN_SRC R

=C2= =A0 =C2=A0 cat("hello world")

=C2=A0 =C2=A0 #+END_SRC R

=C2=A0 =C2=A0 * Heading 2


And another document mypaper.org:

=C2=A0 =C2=A0 * Section 1

=C2=A0 =C2=A0 #+INCLUDE: "mytables.org" :heading "Heading 1/Re= gressions"

=C2=A0 =C2=A0 * 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 fa= cilities for these includes, but does not allow for headings ( http://orgmode.org/manual/Incl= ude-files.html ). Obviously org does not have the :heading parameter, b= ut any suggestions for a solution to make this work are greatly appreciated= . It looks like=C2=A0org-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.=

--089e0160c1566e146405034ae3bd--