Org-mode incorrectly interprets square brackets as a footnote

I want to insert the following text into org-mode

:

I'll tell you, a[0] contains the number, ...

      

But org-mode

misinterprets [0]

as a footnote.

This is not a code, so I cannot use a block SRC

. How can I avoid this behavior?

+3


source to share


2 answers


There are two ways:



  • use verbatim markup :=a[0]=

  • use escape character: a\[0\]

+2


source


Unfortunately, you cannot customize what counts as a footnote.

But you can override the behavior. If you never use "simple" footnotes like [1], you can set up two variables:

(setq org-footnote-re
      (concat "\\[\\(?:"
          ;; Match inline footnotes.
          (org-re "fn:\\([-_[:word:]]+\\)?:\\|")
          ;; Match other footnotes.
          ;; "\\(?:\\([0-9]+\\)\\]\\)\\|"
          (org-re "\\(fn:[-_[:word:]]+\\)")
          "\\)"))

(setq org-footnote-definition-re
      (org-re "^\\[\\(fn:[-_[:word:]]+\\)\\]"))

      



This should do the trick.

If you want to use footnotes in your org file then use style [fn:1]

or other styles at http://orgmode.org/manual/Footnotes.html instead of just [1]

.

+4


source







All Articles