Footnotes rendered different for .org files, compared to markdown source

Tried it with different themes, same behavior. While footnotes are rendered alright from markdown source (first pic), when switching to .org files (same content), the footnotes are having an extra line between their number and the actual content of the footnote (second pic), which… isn’t quite alright.

Does anyone knows what’s causing this and how can I make my footnotes look the same for org-mode files and markdown? Or a trick to remove that extra line from org-mode footnotes render? I’m using the latest Hugo release (v0.57.2).

Hi!

Different parsers render footnotes differently—also different markdown parsers (Mmark, Blackfriday, Pandoc …), mainly because footnotes are not part of the original markdown.

There are some solutions:

  1. You can style your footnotes using CSS. If you have

    <div class="footnotes">
    <hr>
    …
    

    You can hide the line using

    .footnotes hr {
      display: none;
    }
    

    Something similar applies when numbers and footnote texts are not in line.

  2. You could use the replaceRE function to search and replace parts of the footnote HTML code. This can be tricky, of course.


In addition:

There are some footnote related settings:

  • footnoteAnchorPrefix
  • footnoteReturnLinkContents
1 Like

I wasn’t able to implement any of the above solutions.

But the good news is that I’m starting to explore ox-hugo package for Emacs and that would probably be a better way of handling the whole website.

In case anyone else searches for an answer, this is the best that I’ve done in CSS so far:

.footnote-definition {
  display: block;
}

.footnote-body {
  display: inline-block;
}