Created attachment 1184545 [details] An experimental pathc to make rst2odt generates unique draw:name attribute for each image elements Description of problem: It seems that rst2odt does not generate unique draw:name attribute for each images embedded with '.. image::' or '.. figure::' directives, and that causes strange problem that only 1st and 2nd images are shown in generated ODT document. I'll attach a simple test case found at [1] and an experimental fix for this issue. [1] http://stackoverflow.com/questions/36766905/rst2odt-not-showing-the-third-image [2] https://bugs.documentfoundation.org/show_bug.cgi?id=96245 Version-Release number of selected component (if applicable): python-docutils-0.12-0.6.20140510svn7747 How reproducible: Always Steps to Reproduce: 1. Create test.rst (or download test.rst I'll attach) 2. rst2odt test.rst test.odt (build ODT file) 3. libreoffice test.odt (check) Actual results: test.odt only show 1st and 2nd images. Expected results: test.odt should show 3rd image also. Additional info: I guess that root causes is that rst2odt generates static const draw:name attribute. I changed that and got expected results successfully.
Created attachment 1184546 [details] A test file
Related RPMs: libreoffice-writer-5.1.5.1-2.fc24.x86_64, unoconv-0.7-3.fc24.noarch Also https://bugs.documentfoundation.org/show_bug.cgi?id=96245 may be related.
It seems that this very annoying problem still exists in the latest one, python-docutils-0.12-0.7.20140510svn7747.fc25.noarch and also found in the upstream latest svn code. I attached another experimental patch looks resolving this later.
Created attachment 1248317 [details] Another experimental pathc to make rst2odt generates unique draw:name attribute for each image and figure elements
FYI. I reported this issue to the upstream also: https://sourceforge.net/p/docutils/bugs/306/
Created attachment 1249751 [details] Another experimental pathc to make rst2odt generates unique draw:name attribute for each image and figure elements (2) Almost same with the previous patch but made it applicable to python2-docutils-0.13.1-3.fc25.noarch.
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
Sorry this has languished so long. ;( I just build 0.14 in rawhide. I think it contains your patch. Do you need an update for stable releases? and can you confirm it's fixed in 0.14?
Sorry, I forgot to let you know about that. My patch was merged in the upstream, https://sourceforge.net/p/docutils/bugs/306/, so it's safe to close this.
Great. Let us know if you need any stable updates or the like.