MMD Footnote syntax issues in Scrivener

I’ve changed my Scrivener workflow recently to use MMD rather than RTF and while I’m happy to have made the change, I’m coming up against a couple limitations. Particularly, footnote syntax seems to create some issues when compiling from MMD in Scrivener. The text I’m working on is a multi-author volume, so each chapter is meant to start footnote numbering at 1, however, it seems to be the case that if I repeat the syntax for a footnote identifier from one chapter to the next, compiles done through LaTeX repeat the footnotes from the previous chapter. Here’s a visual example of what I mean:

When I compile this to PDF or TEX, the resulting output presents the following:

Every single chapter repeats the footnotes from the first scrivening, at least the first one with a batch of MMD footnotes, and here is where I’ve begun to get the impression that this may be a bug in Scrivener. If I convert those MMD footnotes to Scrivener footnotes, the problem resolves and chapter 2 suddenly has its own proper footnotes, at least for all the ones that I’ve replaced in the previous chapter (i.e. if I make footnotes 1-7 scrivener style footnotes, footnote 8 in chs. 2-14 repeat from ch 1, but footnotes 1-7 are unique). The second strange behaviour is when I export to HTML, I don’t have the same problem, even if all the footnotes are presented in MMD. This time, however, the footnotes stop at 99 and then just repeat.

Has anyone else run into this before? Is there an option or a switch somewhere that will address this? I’d be very grateful for assistance!

Well first, to be clear about where the problem sits, I don’t think it is with Scrivener if I understand correctly. It looks like you’re typing in all of your footnotes by hand, rather than using Scrivener’s footnote feature. It’s not going to mess with what you type in unless you tell it to in the Replacements compile option pane. It doesn’t do anything with MMD syntax at that level. It does generate some syntax: footnotes, images, annotations, headings and code blocks. The latter two come from the Formatting pane in the compiler, and Preserve Formatting, respectively.

These features just print out MMD code though, so they needn’t be used if one wishes to do all of their document design in the text editor, and they won’t interfere with stuff you’ve typed in manually. Like I say though, if you take that path we aren’t providing any automation outside of the end-format file production so you don’t have to use the command line.

As you noted, if you let Scrivener handle this task for you, you should be getting proper results. If you compile to plain MultiMarkdown and examine the result in a text editor, you’ll see that you get automatic numbering this way. Personally, I never mess with custom footnotes myself, except in weird situations I’ll add one manually amidst a bunch of normal ones. That’s up to taste though.

But, if you do intend to use MMD footnote syntax yourself, you should use a unique identifier for each footnote. Fletcher demonstrates, in the MMD user guide, using human-friendly identifiers instead of numbers. So something like [^batFluSource].

One other thing worth mentioning: I don’t know if this is your intention, but what you number these things has no bearing on the output. If you want footnotes to restart at a chapter break or something, that’s something you’ll need to handle in the end product—messing with the LaTeX preamble, basically.

Given that, you might expect different formats to handle this differently. How footnotes are handled in LaTeX isn’t going to be like ODT, or HTML which doesn’t even have a concept of footnotes. That is as well all MMD stuff, not directly related to Scrivener.