DOCX writer and reader: support for endnotes#11501
Conversation
Initial support for endnotes for openxml. You get an endnote embedding a Note in a Span that has an "endnote" class.
|
38 tests now fail because i needed to update the docx package contents in the
|
A new extension "endnotes" to enable endnotes in docx format
The "endnotes" extension for docx is working with the docx Writer. No tests for this feature yet, but old tests now pass.
|
There's a new extension for docx, "endnotes", which is disabled by default, so all the old tests now work, because they don't know about that extension and they don't enable it. To get endnotes in docx, now you need to specify There are a couple of styles to be added to definitions when the extension is enabled, in particular to have endnote markers in superscript, but the Writer side is done. |
The "endnotes" extension for docx is working with the docx Writer. No tests for this feature yet, but old tests now pass.
When "endnotes" extension is enabled, the Span of class "endnote" that embeds a Note may have an id or attributes for the Note to become an endnote. The only condition is that there is ONLY ONE class and that must be "endnote".
When the "endotes" extension is enabled, docx endnotes are converted to a Note embedded in a Span of class "endnote".
|
Endnote support is now both in the Writer and in the Reader for docx format. On the reader side, when you specify On the writer side, when you specify Before removing the draft state from this PR, I want to update the manual and provide some tests. If the resulting docx has the The problem is I must create a temporary |
An "endnote" class in a Span does not alter the usual behavior when its contents don't consist only of a Note.
Initial support for endnotes for openxml (docx).
You get an endnote just embedding a Note in a Span that has an "endnote" class:
No need to modify pandoc types, just a convention like the one about custom styles.
I did a small test and the docx writer works. Here's my plan:
in the future, once we know it does not mess anything, the extension could become enabled by defaultAbout the notation
In pundok-editor I'm supporting many types of notes, embedding the Note inside a Span with a
note-typeattribute, whose value can be "endnote", "marginnote", "translatornote" or whatever:But for docx endnotes support, I prefer the "endnote" class way, because