我将 Emacs 23 与 Org 7.8.04 一起使用。我的代码结构如下:
#+TITLE: hello, world!
#+BEGIN_SRC python :tangle yes :noweb yes
<<go_function>>
if __name__ == "__main__":
go()
#+END_SRC
Define =go_function= as follows.
#+name:go_function
#+BEGIN_SRC python
def go:
print "hello, world!"
#+END_SRC
当我尝试编织文档时,
<<go_function>>
在第一个代码块中也导出为 html,因此我有两个 <<go_function>>
的 html 导出.我想要 <<go_function>>
导出为指向文档末尾实际定义的链接。我该怎么做?
最佳答案
尝试更改 :noweb yes
至:noweb tangle
.该手册在这种情况下非常有用(参见 http://orgmode.org/manual/noweb.html)。
关于emacs - org-babel 中的 noweb 样式编织,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10373368/