像文本一样转义org-mode脚注

Kur*_*ehr 5 org-mode

我在组织模式文件中有"[16]",这是你在ipython shell中看到的文本.如何转义该文本以使其不生成组织模式脚注?它在一个示例块中很好,但在一般文本中没有.第一个[16]是麻烦,到目前为止我尝试过的所有内容都没有在导出文件时在html输出中产生直接的正常"[16]".

#+BEGIN_SRC python
def setfrequency():
    print 'Setting frequency'
    # Write code here to set the frequency

setfrequency()
#+END_SRC

# This next line is the footnote problem
Run it again and you should see this, but the command number [16]
will be different for you:

#+BEGIN_EXAMPLE 
In [16]: run sonar  # This does not export as a footnote.
Setting frequency
#+END_EXAMPLE
Run Code Online (Sandbox Code Playgroud)

谢谢!

Jon*_*pin 4

您可以使用 =[1]=(代码)或 ~[1]~(逐字)块转义语法。请参阅组织手册中有关“强调”和“等宽字体”的部分。

* This will export the footnote style brackets verbatim
  [1] by itself will fail
  =[1]= and ~[1]~ will export as is.
Run Code Online (Sandbox Code Playgroud)

HTML 导出的相关部分是

<p class="footnote"><sup><a class="footnum" name="fn.1" href="#fnr.1">1</a>
</sup> by itself will fail
  <code>[1]</code> and <code>[1]</code> will export as is.
</p>

<p class="footnote"><sup><a class="footnum" name="fn.1" href="#fnr.1">1</a>
</sup> DEFINITION NOT FOUND: 1
Run Code Online (Sandbox Code Playgroud)