michal-h21 / make4ht

Build system for tex4ht
132 stars 15 forks source link

ODT Refresh table of contents? #60

Open ThiloteE opened 2 years ago

ThiloteE commented 2 years ago

make4ht version v0.3j

This is how my table of contents looks like in odt after having been compiled by make4ht (less correct): image

When i refresh/update it by right-clicking on it it will look like this (more correct):

image

Maybe triggering a refresh of the table of contents by ODT should now be done automatically at one point as it leads to better results? Doing so might lead to worse results if headers cannot be detected by ODT properly though. So ... what do you think?

I know you have made great progress with the table of contents! Refreshing was not possible at all with the old files from Miktex, as back then my headers were not detected.

michal-h21 commented 2 years ago

Hi, sorry for the late reply, I had to take some rest, now I am slowly reacting to the older conversations.

The problem with TOC is, that TeX4ht doesn't know page numbers in the ODT file. These depend on the rendering by the Word processor. So I think the refresh in LO will be always necessary, in order to get page numbers.

Moreover, I don't think it is possible to request TOC rebuild from the document itself, of from the command line. Maybe using some embed scripting, but I don't know anything about it. I also doubt, that it would work both in LO and in MS Word at the same time. But if it is possible, I can try to add a support.

ThiloteE commented 2 years ago

This is a low priority issue with low amount of urgency as the workaround is to do two mouse clicks, but if you ever have an heureca moment and find a solution, you would be welcome :)

It is a matter of consistency: When there are 50 small issues, taken together they amount to a big issue.