gpt4 book ai didi

emacs - org-babel 中的 noweb 样式编织

转载 作者:行者123 更新时间:2023-12-04 18:12:37 24 4
gpt4 key购买 nike

我将 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com