Live Preview: Add support for footnotes

@lab another advantage of inline footnotes is that if you need to excise part of a note and paste it into another note, you don’t have to go scouting to the bottom of the original note to locate the right footnote and risking a excising the wrong footnote.

3 Likes

I’d like to come back to the bug-report of @Chairmander, which is still unresolved for Live-Preview.

Issue: If cm-links are used within footnotes, they are not rendered correctly in Live-Preview. For me this is a big issue since I have many footnotes with Pandoc-Citations inside.

Partial workaround: With css-snippets it is possible to partially work around the issue like this (however, there is no chance to edit the second citation, since it is rendered with the same class as the neighboring text).

Here’s the css-snippet (based on @litotitus 's answer)

/* F O O T N O T E S */

/* beginning and end of footnote */
.cm-inline-footnote-start,
.cm-inline-footnote-end {
    opacity: 0.5;
}

/* styling the footnote */
.cm-inline-footnote-start,
.cm-inline-footnote-end,
.cm-inline-footnote{
    color: #92926d;
    font-size: 75%;
}

/* workaround for Pandoc-references in footnotes */
.cm-formatting.cm-formatting-link.cm-link {
    opacity: 0.5;
}
.cm-link:not(.cm-hmd-barelink) {
    color: #92926d !important;
    font-size: 75%;
}
.cm-inline-footnote.cm-link {
    color: #D08770 !important;
}

As others, I note that footnotes do not work as documented when in Live Preview.
(*Just commenting to this thread to add another vote to underscore that this is a meaningful nuisance.)

3 Likes

Should the CSS provided in this post also alter the appearance of Markdown links? Right now, any link in the form of [alias](underlying link) is appearing with the modified size/color/etc. that I would like to have applicable only to inline footnotes.

The plugin footnote pop Hover work great on preview (only for desktop). I will love to see something some for footnote. More over, the plugin reference success to create pop-over so i think it can be possible to port this plugin to live preview.