我用org-mode写论文和幻灯片.生成表格和图形的代码放在源块中.大多数时候我在幻灯片中使用与我的论文中相同的表格,但是生成表格需要大量的预处理代码.我想将这些表的生成放在自己的组织模式文件中,并且只能在纸张或幻灯片文档中包含某些标题.例如,我将有一个名为mytables.org的组织模式文档:
* Heading 1
** Regressions
#+BEGIN_SRC R
cat("hello world")
#+END_SRC R
* Heading 2
Run Code Online (Sandbox Code Playgroud)
另一份文件mypaper.org:
* Section 1
#+INCLUDE: "mytables.org" :heading "Heading 1/Regressions"
* Section 2
Run Code Online (Sandbox Code Playgroud)
mytables.org中**回归标题下方的内容将包含在mypaper.org的导出中.能够使用Cc'跟随INCLUDE到文件也很棒.Org为这些包括提供了一些设施,但不允许标题(http://orgmode.org/manual/Include-files.html).显然org没有:heading参数,但是非常感谢任何有关解决方案的建议.
谢谢.
组织模式8.3 支持这个(我正在使用8.3beta).
例如:
#+INCLUDE: "./paper.org::*conclusion" :lines 1-20
Run Code Online (Sandbox Code Playgroud)
将包括标题结尾的前20行.
此外,要包含其CUSTOM_ID属性的标题(假设它是Sec: Introduction):
#+INCLUDE: "./paper.org::#Sec: Introduction"
Run Code Online (Sandbox Code Playgroud)
我发现:only-contents t我的应用程序运行良好(我在另一个org文件中包含了一个用于beamer演示的子树):
#+INCLUDE: "./paper.org::*conclusion" :only-contents t
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
803 次 |
| 最近记录: |