I am working python script that composes a document made out of multiple documents, which can be selected by the user.
This means that the composed document is flexible in content, based on the user input. However, this also creates a problem:
Sections may refer to different sections or tables, figures etc. in other sections which may or may not be within the same source document.
Example:
Document 1 - Contains section 1 through 3, with reference to Table 7.2 in section 3
Document 2 - Contains section 4 through 6, with Figure 3.1 and Table 4.1
Document 3 - Contains section 7 and 8, with Table 7.1 and Table 7.2
Document 4 - Contains Appendices
User decides to compile a new document from:
Document 1, 3 and 4 > In the new compiled document, Table 7.1, Table 7.2 become Table 4.1 and 4.2 respectively as the sections are renumbered. This means that the reference to Table 7.2 should be actually be Table 4.2. This can only be established after compiling the document.
I want to use bookmarks, which are already created in the word document itself. So, 'Table 7.2' in Document 3 would have a bookmark called 'Table 7.2' or other unique name. But, how do I include this bookmark at the location where it should go in section 3 and how do I get the new table number from it (e.g. Table 4.2), because the hyperlink text should be the name of the table.
Could somebody help me?
This means that the composed document is flexible in content, based on the user input. However, this also creates a problem:
Sections may refer to different sections or tables, figures etc. in other sections which may or may not be within the same source document.
Example:
Document 1 - Contains section 1 through 3, with reference to Table 7.2 in section 3
Document 2 - Contains section 4 through 6, with Figure 3.1 and Table 4.1
Document 3 - Contains section 7 and 8, with Table 7.1 and Table 7.2
Document 4 - Contains Appendices
User decides to compile a new document from:
Document 1, 3 and 4 > In the new compiled document, Table 7.1, Table 7.2 become Table 4.1 and 4.2 respectively as the sections are renumbered. This means that the reference to Table 7.2 should be actually be Table 4.2. This can only be established after compiling the document.
I want to use bookmarks, which are already created in the word document itself. So, 'Table 7.2' in Document 3 would have a bookmark called 'Table 7.2' or other unique name. But, how do I include this bookmark at the location where it should go in section 3 and how do I get the new table number from it (e.g. Table 4.2), because the hyperlink text should be the name of the table.
Could somebody help me?