You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a large (200+ pages) document using python-docx, and I need to create an index of all names in the document. I understand that Word marks index entries a using special XE (Index Entry) field that includes the marked main entry, e.g. { XE indexed-name }. Is it possible to do this using python-docx? I would be happy to create the actual index manually at the end, as long as the index entries are generated automatically.
Hi Walter, not presently unfortunately. This is part of the fields capability if I'm not mistaken and hasn't been implemented yet. I'll leave this issue open as a feature request for it.
This discussion is very valuable, thank you!
i am wondering, how to refer in the document back to the figure that was referenced by the method described above. So, if you define
Figure 1: [some figure caption],
how can you refer back to this figure in the text, such as
Activity
[-]Creating index entries[/-][+]feature: index entries[/+]scanny commentedon Feb 5, 2015
Hi Walter, not presently unfortunately. This is part of the fields capability if I'm not mistaken and hasn't been implemented yet. I'll leave this issue open as a feature request for it.
wfb commentedon Feb 7, 2015
With Steve's excellent help, I got it all working. Here is the relevant piece of code for marking index entries:
Thank you so much, Steve!
Walter
scanny commentedon Feb 9, 2015
Glad to hear you got it working Walter :)
hannesharms commentedon Feb 17, 2015
Would be great if you could explain how to use the function for images or tables for a newbie.
The followingg has no effect on my document:
scanny commentedon Feb 17, 2015
@hannesharms Please use the mailing list for support questions:
https://groups.google.com/forum/#!forum/python-docx.
mlateb commentedon Jun 3, 2018
Thank you so much for sharing the code @wfb
TerryDSydney commentedon Oct 7, 2019
I copied your code into my python program and it worked first time. Thanks very much, @wfb
42scientific commentedon Feb 20, 2024
This discussion is very valuable, thank you!
i am wondering, how to refer in the document back to the figure that was referenced by the method described above. So, if you define
Figure 1: [some figure caption],
how can you refer back to this figure in the text, such as
"Figure 1 states that..."?