2

How can I disable the [n] being linked to a footnote and highlighted? [n] can be many things, like any index of an array. So, I want my footnotes to be[fn:n]and only[fn:n]`.

2 Answers 2

1

An old post to an emacs-orgmode mailing list I found suggests one of the two following solutions (I have not tested these) should work:

  1. Add #+DISABLE_PLAIN_FOOTNOTES: some arbitrary text to your org-mode file.

  2. Add to your .emacs file:

    (defun jb/disable-plain-footnotes-hack ()
       (if (plist-get opt-plist :no-plain-footnotes)
          (save-excursion
            (goto-char 1)
            (replace-regexp "\\[\\([0-9]+\\)\\]" "[\u200B\\1]"))))
    
    (add-to-list 'org-export-inbuffer-options-extra
    '("DISABLE_PLAIN_FOOTNOTES" :no-plain-footnotes))
    
    (add-hook 'org-export-preprocess-hook
    'jb/disable-plain-footnotes-hack)
    

Given the age of the post I found this in, any recent version of emacs org-mode should work with the first solution.

1
  • That won't work in general, it won't export the footnotes, but still treat [n] as one during editing. Mar 4, 2014 at 2:04
0

I ran into this as well, so I asked on emacs.SE. Overriding the regular expression functions as in this answer works nicely. Reproducing this here:

Override the org-footnote-re and org-footnote-definition-re functions by using this in your .emacs file:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.