Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endnotes instead of footnotes (docx) #43

Open
bokamm opened this issue May 20, 2021 · 4 comments
Open

Endnotes instead of footnotes (docx) #43

bokamm opened this issue May 20, 2021 · 4 comments
Labels

Comments

@bokamm
Copy link

bokamm commented May 20, 2021

I fear this is an absolute newb question but how do I compile in a way that linked footnotes are turned into endnotes automatically using docx?
I found nothing in the Scrivener Format or in how to set up the pandocomatic yaml or template docx-files.

The Scrivener user manual speaks of the possibility of using inline and linked footnotes as separate streams, turning one into footnotes, the other into endnotes (page 536). How/where do I enable that "[^cf1]:" linked footnotes will be turned into endnotes when compiled for docx?

Thank you!

@iandol
Copy link
Owner

iandol commented Jun 4, 2021

To be honest, I've never used endnotes and don't really know where Word identifies this? If this is somehow a style or setting that gets preserved in the DOCX template, then perhaps editing the custom.docx file would be sufficient? Try making two otherwise blank DOCX files only changing the placement, then use them as templates to compile a simple test document.

@iandol iandol added the question label Jun 4, 2021
@bokamm
Copy link
Author

bokamm commented Jun 4, 2021

Thank you for getting back on this!
I tried what you suggested (edited my docx template) but on compile the Scrivener footnotes still turn into footnotes, not endnotes in the result.

I usually do not use endnotes either but the publisher asks for them. I can switch from footnotes to endnotes within Word (via Draft view) but would have to do it again and again should I need to re-compile. Thus, I was wondering if there is a way to do this somehow via the Scrivener format or your scrivomatic script (as I have no idea how to target the "streams" mentioned in the Scrivener manual).

If that cannot be done, I will manage manually. Thank you for your time! (and a fantastic script!)

@iandol
Copy link
Owner

iandol commented Jun 4, 2021

If the custom.docx template doesn't transfer this information, then I think there is no easy way to automate this. An involved solution is to make a script that would edit the XML in the DOCX file (DOCX file is basically a ZIP file containing lots of XML files) to manually trigger this, but that still requires us understanding how and where this information is stored...

The "streams" in Scrivener cannot yet be targeted for selective output as Pandoc itself doesn't support more than one note stream. For LaTeX or HTML, I think it would be possible to make a switch that would change the template variables to change the formatting and use Pandoc filters that can tag the "streams", but that doesn't solve the DOCX problem...

Formal support for endnotes vs. footnotes are on the Pandoc roadmap:

https://github.com/jgm/pandoc/wiki/Roadmap

…but implementation details are not yet settled upon: jgm/pandoc#1425

@bokamm
Copy link
Author

bokamm commented Jun 4, 2021

Thank you for the follow-up and explanation!

If it's on the Pandoc roadmap and no easy way to implement it right now, I will stick to the current manual solution of converting the notes in Word after compile. Maybe the implementation details get settled until I have to finally submit, so I will keep an eye on that discussion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants