-
Notifications
You must be signed in to change notification settings - Fork 391
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
How to use template in footnotes #379
Comments
Please provide a fully runnable example |
I have the same problem. This is my code: from docxtpl import DocxTemplate
doc = DocxTemplate("footnote.docx")
context = { 'what' : "Apples" }
doc.render(context)
doc.save("out.docx") The result is a word document where The footnote.docx template I'm using is available at https://github.com/staffanm/staffanm.github.io/raw/master/footnote.docx Edit: Looking deeper into this, it seems that the underlying python-docx package does not support reading or writing footnotes at all yet (python-openxml/python-docx#1). To support this, the dependency on python-docx may need to be changed to the https://github.com/BayooG/bayoo-docx fork of that library. |
I confirm, footnotes are not supported : adding request for enhancement label... One precision : footnotes are not the same as footers which are supported. |
I've encountered a similar issue, but my requirements are more challenging. I need to use footnote and footnote reference in a for loop. |
Describe your problem
I want to use template in footnotes, but it not work
More details about your problem
There are footnotes in my DOCX document, and I need to replace the text in the footnotes with templates. I added a footnote like {{var}}, but the final render docX does not replace var correctly, just shows {{var}} in the footnote
Provide a test case
Screenshots
The text was updated successfully, but these errors were encountered: