Docx writer: Optionally insert space or tab before footnote text #2527
conklech
commented
conklech
commented
I confirm that Pandoc-produced footnotes now have a space between reference and text. Thanks! It looks like we were already setting the xml:space="preserve"
attribute.
I plan to try implementing the alternative tab behavior as an option. I'll submit a pull request if I get there.
conklech
referenced
this issue
Closed
Add --docx-note-tab flag to replace the initial space in footnotes with a tab. #2536
conklech
referenced
this issue
Open
Add --docx-note-tab flag to replace the initial space in footnotes with a tab. #2621
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the docx writer produces footnotes that contain the footnote reference (i.e. superscript number) followed immediately by the text of the note. It appears like this:
By default, inserting a footnote in Word inserts the footnote reference and then a space, so most or many Word documents normally have a single space between reference and the text. The Pandoc reader I use (org-mode) discards whitespace at the beginning of the note, so it's not possible to simply type an extra space in the source document. A literal nonbreaking space in the input produces the desired effect, at the cost of having to remember to manually insert it in every footnote.
Better yet would be to have a tab character following the reference, so that the paragraph style may be used to align footnotes properly. I don't think there's a workaround for that—a literal tab character is ignored as simply whitespace.
The correct default behavior might be to insert a literal space between footnote reference and the body of the footnote. But this would change existing behavior, and would be even harder to work around.
So I propose a flag or other option to control whether nothing, a space, or a tab is inserted after the footnote reference.
Inserting spaces could be implemented as a filter, by prepending a space to each footnote. Would that work for tabs, too?