On Footnotes and References

I’m super glad to have footnotes in Bear!

First, on the syntax: I’m not sure what flavor of Markdown the current implementation is based off of; I don’t see anything on footnotes in the CommonMark spec, but there’s a slight difference between Bear’s current implementation and the MultiMarkdown footnotes syntax.

Whereas a footnote in the current version of Panda is
In-line text^[footnote]
in MMD, it’s defined as
In-line text[^footnote]

A subtle difference, and I can see from a design perspective where it’s desirable for flexibility and your current goals of concurrent styles for the caret not to trigger a footnote.

I also recognize that Commonmark is the stated goal to align to and not Multimarkdown. I would encourage, though, that a large portion of the community of power-users of Apple software (which make up a substantial portion of your userbase) are using either strict MMD or strict GFM (rather than CommonMark) and where CommonMark does not have a contrasting definition, working for compatibility with MMD or GFM would be a beneficial priority.


Additionally, perhaps this redesign is a reasonable time to allow for reference-style behavior settings for links and footnotes alike. Perhaps this is deserving of its own thread, but the suggested implementation would look something like this:

  1. Reference-style mode only applies to copied Markdown, not impacting the behavior of how links or footnotes are displayed within the actual Bear app itself
  2. Triggered by a preference pane
  3. With it off, it would look like
A collection of [links](www.url.com) that are [in-line](www.link.com), with some footnotes[^footnote] that are in-line as well[^other footnote]
  1. Whereas reference mode would look like
A collection of [links][] that are [reference mode][], with some footnotes[^1] that are reference mode as well[^2]

[^1]: footnote
[^2]: other footnote

[links]: www.url.com
[reference mode]: www.link.com

2 Likes

Hello again!

We’re trying to stay true to the standards as much as possible, in fact those are two different syntaxs for inline and reference footnotes:

Inline^[footnote]

[^reference]

[^reference]: footnote

We’re going to support both! The inline is currently working while the reference is half done (there is basic highlight)

And for references, they are already working and we’ve also added small facilities for creating those:

You can use inlines or references (or both!) depending on what you preference is.

Thanks for your detailed feedback!

2 Likes

After a bit of digging, it looks like Inline^[footnote] is standard in GFM, whereas Inline[^footnote] is standard in MMD. Difference I was unaware of. Not sure how you want to use that feedback; I’d love support for the MMD syntax in addition to the current GFM syntax personally, but I understand decisions have to be made, and chasing the white rabbit of playing nice with different Markdown specs can get…bad.

I hadn’t really thought about this. I really notice it based on the MD used by Marked 2 and have yet to find the use for Inline^[footnote]. When I change Marked to use GFM - “Discount processor” it does not properly convert the footnote. Further review so far has shown that GFM doesn’t support footnotes but could rather be tricked when using Unicode.

I look at how convenient it is to have MD files for bear notes but then worry about markdown compatibility across various apps. I love using bear when writing my markdown but then would use Marked to almost “publish” the results for end-user consumption. If the markdown doesn’t properly render then that would be a problem.

The reference is however something I am very familiar with and tend to use in free writing, so will need to ensure I stick personal styles.

Ah, after checking the official spec documentation, looks like there is not native footnote support within GFM.

I’d then suggest to Bear to format them as Inline[^footnote] instead. Might create some compatibility issues with a regular link that contains a caret in its title, but it probably should create those issues.

2 Likes

I want to add my support for the syntax of [^footnote], as well as the reference style with [^footnote]: text of footnote at the end of the document. I also use MMD rather than GFM for most of my writing, and I believe markdown-it, which is mostly following CommonMark, has a footnote parser that works in these two styles (or at least one of them). Either way, the caret goes inside the brackets for me.

1 Like

Very happy camper with the latest Panda release to see the awesome behavior of [^footnotes]. I did note that ^[footnotes] don’t seem to be rendering (as in the original example text), but I personally don’t miss those one bit.

I kind of do miss the behavior for them collapsing when you were done being inside of one (much like links do in Bear and continue to work in Panda), but I’ll still get great use of footnotes in this form, even if the collapsable nature of them never returns.

Yes, we opted to support only one kind of footnotes to avoid confusion, so the old format was removed.

I can understand that, but after reading all the feedback we opted for leaving those searchable/readable without needing a click.

Thanks for the feedback :slight_smile:

1 Like

I’m so excited about footnotes! I just want to say a HUGE thanks to the team!

1 Like