Markdown footnotes

Markdown footnotes[^footnote] works in the preview window but not when I print/save to pdf and open this in (the OS X application) Preview.

However, copying, saving the HTML to a separate file and then opening it in Safari yields functioning footnotes—even when I print/save THIS document to pdf.

Is this a bug or am I doing something wrong with the preview window?

[^footnot]: Such as this one.

If you are just using File > Print to print from the Drafts main window, you are just printing as plain text. To print as HTML (converted from the Markdown), you need to use an output method that is using your formatting. If you use File > Print while the preview window is to the front with the formatting you desire, you will get the formatted output.

Thanks for taking the time,

However, this is what I’ve tried in Drafts:

  1. Show Peview
  2. Print
  3. Save as PDF
  4. Open in Preview

My result (with Drafts 17.2.5 and macOS Mojave 10.14.6, MBP (Retina 15", late 2013):

  • External links such as this and even this works but not
  • internal links such as this footnote[^fn].

I can get a working pdf by

  1. Copy HTML
  2. Save HTML in a file
  3. Open the file in Safari
  4. Print…
  5. Save as PDF.
  6. Open the pdf in Preview.

So it is possible to get a fully functioning pdf and the process can even be automized but I assume it would be easier if it could be generated directly from the Drafts preview window.

[^fn]: This footnote works fine in the Drafts preview window but not in the pdf generated from it in Preview.

maybe check the “Markdown Options” in the settings on both devices, maybe they are different (there is a switch for Footnotes)

Interesting tip!

Clicking Random footnotes in the Markdown tab of Drafts preferences yields a preview window where the back link :leftwards_arrow_with_hook: works(! as not before) but not the actual footnote. Printing and saving this document to pdf none of these works.

On further inspection the footnote points to this resource:

file:///Applications/Drafts.app/Contents/Resources/#fn:7997

This got me thinking that it could possibly be some kind of a bug that doesn’t seem too impossible to fix.

(BTW the Footnote option has been selected all the time and unmark it doesn’t help either.)

Is anybody able to create a pdf from Drafts with clickable footnotes?

I’ve opened a bug on this to do more research. I don’t see an obvious workaround at the moment, but will see what I can figure out.

Thanks a lot,

Hope I was able to describe the problem clearly.

Since the link information i perfectly all right in the HTML and works in the Drafts preview window it seems to me the problem could be isolated to printing the preview to pdf.

(Maybe this has nothing to do with this issue but it reminds me that links in Word documents never works when saved as pdf. I’ve had to open them with Pages and exporting in order for links the work. Could it be a printing issue?)