我用org-mode写论文和幻灯片。 生成表格和图形的代码放在源块中。 大多数时候我在幻灯片中使用与我的论文中相同的表格,但是生成表格需要大量的预处理代码。 我想将这些表的生成放在自己的组织模式文件中,并且只能在纸张或幻灯片文档中包含某些标题。 例如,我将有一个名为mytables.org的组织模式文档:
* Heading 1 ** Regressions #+BEGIN_SRC R cat("hello world") #+END_SRC R * Heading 2另一份文件mypaper.org:
* Section 1 #+INCLUDE: "mytables.org" :heading "Heading 1/Regressions" * Section 2mytables.org中**回归标题下方的内容将包含在mypaper.org的导出中。 能够使用Cc'跟随INCLUDE到文件也很棒。 Org为这些包括提供了一些设施,但不允许标题( http://orgmode.org/manual/Include-files.html )。 显然org没有:heading参数,但是非常感谢任何有关解决方案的建议。
谢谢。
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 2And another document mypaper.org:
* Section 1 #+INCLUDE: "mytables.org" :heading "Heading 1/Regressions" * Section 2The 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.
Thanks.
最满意答案
Org模式8.3 支持这个(我使用的是8.3beta )。
例如:
#+INCLUDE: "./paper.org::*conclusion" :lines 1-20将包括标题结尾的前20行。
此外,要通过其CUSTOM_ID属性包含标题(假设它是Sec: Introduction ):
#+INCLUDE: "./paper.org::#Sec: Introduction"我发现:only-contents t适用于我的应用程序(我在另一个org文件中包含了一个用于beamer演示的子树):
#+INCLUDE: "./paper.org::*conclusion" :only-contents tOrg mode 8.3 supports this (I'm using 8.3beta).
For example:
#+INCLUDE: "./paper.org::*conclusion" :lines 1-20will include the first 20 lines of the headline named conclusion.
Also, to include a heading by its CUSTOM_ID property (suppose it is Sec: Introduction):
#+INCLUDE: "./paper.org::#Sec: Introduction"I found :only-contents t works well for my application (I'm including a subtree from another org file for a beamer presentation):
#+INCLUDE: "./paper.org::*conclusion" :only-contents t更多推荐
发布评论