I'm having problems with footnotes

peter2536's Avatar

peter2536

01 Jun, 2023 02:08 PM

I'm using BBEdit (latest version) to edit my Markdown documents. I am selecting "Markdown>Preview>Marked 2" to preview the file.

The document contains text with a footnote marker "[^1]" and a single footnote prefaced with "[^1]: " Both appear as text in the document with TWO blank footnotes at the end of the document.

This is part of the text I'm using (the actual file is attached as "Footnotes test.md":

Hai Hong Nguyen[^1], The Diplomat, 31 May 2023

Vietnam and Australia are preparing …

[^1]: Hai Hong Nguyen is an honorary research fellow at the Centre for Policy Futures, the University of Queensland.

You can see the preview in Marked 2 in the attached file grab0.jpg

Regards,
Peter

  1. Support Staff 1 Posted by Brett on 01 Jun, 2023 03:10 PM

    Brett's Avatar

    Something is happening between BBEdit and Marked. Using your test file directly opened in Marked, I get:

    The easiest way to see what is actually being sent is to Export the preview as Markdown and examine it. I'm guessing you see something going on with the footnote reference itself, which appears to be read as a second footnote rather than the reference to the first footnote.

    If you can't determine why BBEdit would be altering your file when using Markdown->Preview, it would be better to just open the file directly by dragging from the proxy icon (left of the title of the document in the title bar) to Marked when working on the file.

  2. 2 Posted by peter2536 on 01 Jun, 2023 05:10 PM

    peter2536's Avatar

    So I previewed the test file from BBEdit using Marked then exported the Marked preview to a new Markdown file ("Footnotes test - Exported.md") attached.

    The export from BBEdit is not including the links for [^1] to [^1]:

    When I drag the proxy icon into Marked the file is displayed correctly.

    Using BBEdit's inbuilt Previewer (very very basic preview) the file looks correct.

    So where does that leave us? Is it a BBEdit problem or is it a Marked problem?

    Thanks for your help so far :-)

  3. Support Staff 3 Posted by Brett on 01 Jun, 2023 06:25 PM

    Brett's Avatar

    It’s a BBEdit problem. Your markup is fine but it’s doing something to it before sending it. Is it too much trouble to just open the file directly? You only have to do it once, Marked will automatically update every time you save.

    - Brett
    On Jun 1, 2023 at 12:10 PM -0500, peter2536 <[email blocked]>, wrote:

  4. 4 Posted by peter2536 on 01 Jun, 2023 11:52 PM

    peter2536's Avatar

    Brett,

    Thanks for your support!

    Stay safe,
    Peter

    Peter Anderson

    HE HAD offices in Sydney, not so many years ago,
    And his shingle bore the legend 'Peter Anderson and Co.',
    But his real name was Careless, as the fellows understood-
    And his relatives decided that he wasn't any good.
    Henry Lawson, August, 1895

  5. 5 Posted by peter2536 on 02 Jun, 2023 04:36 AM

    peter2536's Avatar

    Brett,

    I think you are right about it being a BBEdit problem. Under the “Markup” main menu item there are several ways to preview your *.md file; one is to use BBEdit’s internal Previewer and another is to Preview using Marked 2 (when it’s installed).

    If I choose the internal previewer then there are many Markdown syntax elements that are not supported, it’s like the basic Grubber Markdown spec. BBEdit settings says the default Markdown processor is mark (“classic" and “custom" are the other options although it looks like other Markdown processors can be added but that might be a bit beyond my skill level).

    So I presume when the *.md file is passed to Marked via the preview mechanism then the links for the footnote are not passed, just plain text is passed. Then when Marked gets the *.md file it thinks there are TWO footnotes.

    So I think that opening *.md directly in Marked is the only solution.

    Thanks for your help.

    Are you able to recommend an alternative to BBEdit that handles the Markdown preview correctly?

    Regards,
    Peter

    Peter Anderson

    HE HAD offices in Sydney, not so many years ago,
    And his shingle bore the legend 'Peter Anderson and Co.',
    Henry Lawson, August, 1895

  6. Support Staff 6 Posted by Brett on 02 Jun, 2023 11:41 AM

    Brett's Avatar

    BBEdit is an amazing text editor, but for Markdown I prefer something
    like MultiMarkdown Composer, which has all kinds of nice features for
    composing Markdown and works with MultiMarkdown syntax. It has a
    built-in preview, with integration with Marked to take advantage of all
    of Marked's features.

    -Brett

    On 1 Jun 2023, at 23:36, peter2536 wrote:

  7. peter2536 closed this discussion on 02 Jun, 2023 02:08 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac