How to include footnotes (as footnotes) into exported text

Is there any way to turn Tbx footnotes into markdown footnotes using export code? I went through the forum but found no example of this and I can’t really see how to include the footnote as a markdown/html footnote into the exported text.

Not at present. More broadly, if we were to adopt a Markdown variant other than orthodox Gruber (which as no footnotes), what should it be? GitHub? CommonMark?

Thanks, Mark. I thought this could be achieved now through some form of action/export/html code wizardry.

When it comes to markdown flavors, I don’t have any preferences. Anything compatible with Pandoc (and with footnote support) would make me happy. Just being able to export linked notes as html end/footnotes would be really interesting.

Oh, it probably can, but it would be painful. I think we can probably make Markdown export somewhat easier.

2 Likes

That would be great and certainly very welcome!

1 Like

Dear Mark,
I second this, something compatible with pandoc would be fantastic.

Inline footnotes of the style ^[…] are a particularly useful extension to pandoc markdown.

see the Pandoc User’s Guide:

Extension: inline_notes

Inline footnotes are also allowed (though, unlike regular notes, they cannot contain multiple paragraphs). The syntax is as follows:

Here is an inline note.^[Inlines notes are easier to write, since
you don't have to pick an identifier and move down to type the
note.]

Yours,
Maurice

2 Likes

I actually had a go last night but for some reason I can’t get notes with the MD prototype to evaluate export code either in the note $Text or in a template. Using include, with a footnote capable version of Markdown, this should be possible.

However, there may be a problem due to the order in which things are assembled and Markdown-parsed. I think the user will need to manually place and number the footnote markers at the end of (after) the existing footnote anchor text. The footnotes, if stored in a discrete container and in order of occurrence in the source note, can use $SiblingOrder to set their number, e.g. [^^^value$SiblingOrder)^]:.

What is not clear is whether the Markdown script needs both the footnote calling mark and the footnote in scope to create the relevant HTML link. Or, does Markdown process [^1] generate an in-page link to footnote #1 even if it doesn’t exist in the current text. I suspect the latter but my only real Markdown expertise is using it here in forum posts and I can’t find any detailed documentation on the ordering/scope of export code evaluation when used with Markdown, noting the potential difference between exporting raw Markdown vs using internally previewed Markdown.

†. It appears the bundled version doesn’t. As @eastgate rightly points out, Markdown has been modified from Gruber’s original version. Thus people first come to Markdown that offer different feature support but assume the one they use is canonical. No error, but it does cause unintended false assumptions.

‡. As we need a literal ^ for Markdown processing it must be escaped, by doubling it, thus ^^.

1 Like

Thanks for taking a crack at it, Mark.

And thanks for pointing this out. Knowing this before would have saved me some hair :stuck_out_tongue: .

No, thank you. Hats off for trying! We easily forget that in such a large toolbox, the combinations are many. Not all feature combinations are used to the same degree.

I’d agree though that it helps if someone passing by looks down into the hole and tells us to stop digging! :slight_smile:

1 Like