fletcher / MultiMarkdown-4

This project is now deprecated. Please use MultiMarkdown-6 instead!
https://github.com/fletcher/MultiMarkdown-5
Other
306 stars 59 forks source link

Problems with spaces after footnotes in .FODT output #137

Closed iandol closed 8 years ago

iandol commented 9 years ago

Not sure if this is a bug in LibreOffice, but if I have the following MMD:

One striking feature of these networks is that the numbers of connections originating *from* the sense organs like the eyes are often matched or greatly exceeded by connections feeding-back from within the brain itself[^cf2]. This fact is in contrast to common naïve intuition and traditional reflex models which expect the brain to be responding mainly to inputs from the outside world to generate behavioural responses.

[^cf2]: {Felleman and Van Essen, 1991, #6227; Budd, 2004, #1069}

It generates this XML:

One striking feature of these networks is that the numbers of connections originating <text:span text:style-name="MMD-Italic">from</text:span> the sense organs like the eyes are often matched or greatly exceeded by connections feeding-back from within the brain itself<text:note text:id="" text:note-class="footnote"><text:note-body>
<text:p text:style-name="Footnote">{Felleman and Van Essen, 1991, #6227; Budd, 2004, #1069}</text:p>
</text:note-body>
</text:note>
. This fact is in contrast to common naïve intuition and traditional reflex models which expect the brain to be responding mainly to inputs from the outside world to generate behavioural responses.

But the display in LibreOffice adds a space between the footnote and the fullstop. screen shot 2015-09-08 at 12 37 30 I'm not an expert of the ODF format at whether newlines should be converted into spaces. Anyway not padding your FODT footnote elements with newlines fixes this issue.

iandol commented 9 years ago

This: http://books.evc-cit.info/odbook/ch03.html#whitespace-section suggest OpenDocument collapses successive whitespace into a single space, but the newline in the XML is singular not consecutive? Perhaps consecutive mean 1-n

fletcher commented 9 years ago

I'll look at this, but I believe footnotes are supposed to be used after periods, commas, etc. In this case, the spacing becomes irrelevant because it would be collapsed with the following space.

iandol commented 9 years ago

Ha, interesting. I'm using footnotes for scientific references, and for this the footnote normally precedes punctuation like periods and commas (screenshot from a Nature PDF):

screen shot 2015-09-08 at 13 45 03

This is how many major scientific journals like Nature, Science, PNAS etc. format display reference footnotes. Online example: http://www.nature.com/nature/journal/vaop/ncurrent/full/nature14900.html