Links to a footnote automatically exports as superscript in LaTeX.


Lorem ipsum dolor sit amet, consectetur adipiscing elit. [fn:1685d75dd9ccdec5: This is a footnote.] In sed erat porta, sodales mauris congue, volutpat nisi. Integer in justo ac augue vehicula sodales ac quis enim. [fn:4194cf1977de9b2:Please refer to footnote [fn:1685d75dd9ccdec5].]


Please refer to footnote \textsuperscript{\ref{orge6f2964}}. 

Is there a setting that can turn off this feature so that this specific link is exported normally?

Please refer to footnote \text{\ref{orge6f2964}}. 

Expected Results:

I would like links in the main text to remain super-scripted. enter image description here

While those within footnotes to be in normal text. enter image description here i.e. Please refer to footnote 2.


You can redefine org-latex-footnote-defined-format. Its doc string says:

org-latex-footnote-defined-format is a variable defined in ‘ox-latex.el’. Its value is "\textsuperscript{\ref{%s}}"

You can customize this variable. This variable was introduced, or its default value was changed, in version 26.1 of Emacs.


Format string used to format reference to footnote already defined. %s will be replaced by the label of the referred footnote.

You can redefine it in your init file with

(eval-after-load 'ox-latex
   (setq org-latex-footnote-defined-format "\\text{\\ref{%s}}"))

or if you prefer using a file local variable by adding something like this at the end of your file:

* Local customizations                        :noexport:
# Local Variables:
# org-latex-footnote-defined-format: "\\text{\\ref{%s}}"
# End:
  • 1
    I don't know of any way to differentiate footnote links within a footnote from other footnote links in Org mode itself. There's probably ways to do it in LaTeX, that can be used in your Org mode file (at the price of making it exportable correctly only to LaTeX, but I gather that does not matter to you.) – NickD Sep 19 '20 at 13:17
  • How about using inline latex code to counteract the superscript in such cases? Would that be feasible? – Sati Sep 19 '20 at 13:19
  • Yes, I think so - as I just amended my earlier comment to say ;-) Real time communication over comments is ... difficult :-) – NickD Sep 19 '20 at 13:21
  • Edited to clarify the applicability of the answer. – NickD Sep 19 '20 at 13:27
  • I think you are right... The variable does make the change I want without affecting the superscript footnote link in the main text. Except that the required string is "\text{\ref{%s}}" rather than "\\text{\\ref{%s}}". – Sati Sep 19 '20 at 16:29

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.