Footnotes do not get exported to LaTeX file

When I compile my draft the footnotes don’t get exported to LaTeX. In the .tex file I get empty \footnote{} tags.

The footnotes do get compiled correctly in export to Word, however.

Any clues? Many thanks in advance.

First to get the obvious out of the way, do ensure you have “Include footnotes” enabled in the Text Options tab. I know you said it worked in Doc, but maybe something got switched around without your realising.

When you export the document to plain MMD (first option), what do your footnotes look like? You should see, scattered throughout the manuscript, references like [b][fn181][/b], and then at the very end of the document, a long list of lines like:

[fn181]: Content of the footnote.

If you do not see either or both of those parts, then for some reason Scrivener is not correctly generating footnotes. I’ve never heard of that happening, so it could be a bug, but we’ll investigate it further depending on what you see.

Dear Amber,
Thanks for your reply.

The footnotes do get exported properly in the MultiMarkdown .txt file, strangely enough. In the .tex file they \foonote{} tags are empty…

I use this as a method to convert a thesis in Word to LaTeX (Word > rft > Scrivener > MMD > LaTeX) and all works well except the footnotes.
Test.txt (9.13 KB)

Well that is certainly very interesting. I got the same result with your file, though there is nothing strange about the formatting of it; it looks like a perfectly valid MMD file. So I made a really simple test file with a single footnote in it and got the same empty footnote result. This issue has popped up before in the MMD Google group, and in those cases it was because individuals had installed their own copy of xsltproc using MacPorts. Once the custom version was uninstalled, footnotes would work again.

I don’t have xsltproc updated on my system using MacPorts, but I wonder if this might be a Snow Leopard thing? Perhaps Apple updated the version and it doesn’t like what is going on in the XSLT files.

That’s frustrating :slight_smile:

I actually don’t know anything about the xsltproc. It’s the converting system, I suppose? If it’s something Snow Leopard related, then more and more people should start having this issue…

If you have suggestions as to possible solutions (which updates I could try or something), would be great.

That is correct, xsltproc is the engine which parses the XSLT files; it is a separate UNIX component that MMD relies upon. Updating it would clear up a few bugs that existed in the Leopard version, but it also caused this footnote bug if it was updated. Now, I’m guessing Snow Leopard includes the new version and so we are stuck with the footnote bug; I have replicated it on a second Snow Leopard machine which I’m positive hasn’t been manually updated as well. I will post this issue to the MMD Google group and see if Fletcher knows anything about it. You are right though, if it is a Snow Leopard thing, more and more people will be getting it so the good news there is that a fix should be quick.

I’m running Snow Leopard and my footnotes are fine. :confused:

$ xsltproc --version Using libxml 20703, libxslt 10124 and libexslt 813 xsltproc was compiled against libxml 20703, libxslt 10124 and libexslt 813 libxslt 10124 was compiled against libxml 20703 libexslt 813 was compiled against libxml 20703

Curious, we have the same version numbers. Okay, what about MMD? Are you using 2.0b6?

# MultiMarkdown Version 2.0.b6

Curiouser and curiouser!

I downloaded Test.txt from above, and it worked fine for me running on 10.5.8.

Be sure that you have downloaded latest MMD release from Github (version numbers aren’t helpful in between “official” releases)

F-

Thanks for stopping by Fletcher. I’m running b6 and have tested the condition with a completely vanilla installation of it (downloaded just the other day from github; the change listed was for using T1 fonts), as well as the one I’ve hacked up that is slightly older. Neither works. But just to clarify, I don’t think you’ll be able to replicate this on a 10.5.x machine. I think this is a Snow Leopard issue (even though we have one person here with contrary evidence). The xsltproc version numbers are significantly different on a 10.6.x machine. You might have more luck replicating it if you upgrade xsltproc on your 10.5.x machine using MacPorts, and then see where the fault is.

Update: I have posted much more detailed information over in the MMD group. I did some more cross-testing and produced some xsltproc log excerpts as well as some test XSLT examples.

I just uploaded a fix to github that should take care of this.

Thanks for pointing it out!

F-

Fletcher, thanks a lot! Fixed it!
Amber, many thanks for your follow-up, it is very much appreciated!

Thanks for posting the solution! I was having the same problem.
Magnus

I had the same problem, too! Upgrading worked fine, and I was even able to incorporate the changes I made to the xslts.