https://bugs.documentfoundation.org/show_bug.cgi?id=142356
Christophe Strobbe <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #9 from Christophe Strobbe <[email protected]> --- I confirm that this bug applies to LibreOffice 7.1.4.2: Version: 7.1.4.2 / LibreOffice Community Build ID: 10(Build:2) CPU threads: 8; OS: Linux 5.5; UI render: default; VCL: kf5 Locale: en-GB (en_GB.utf8); UI: en-GB Calc: threaded The difficult part is deciding how to deal with this, i.e. what HTML code should be exported. For ODF images that have a caption, it makes sense to generate the following code with the "Save as HTML" function (some code exported by LibreOffice omitted for the sake of simplicity: <figure> <img src="..." alt="..." /> <figcaption>Illustration 1: my Caption Text</figcaption> </figure> If the caption is above the image in the ODF file, the figcaption element should end up above the img element in the HTML code. It is less obvious what to do with the XHTML export, beyond simply adding a span or a p element below the img element. figure and figcaption were first introduced in HTML 5, whereas LibreOffice's "Export to XHTML" function exports to XHTML 1.1 + Math ML 2.0, which is an outdated specification. XHTML 1.1 was superseded in 2018: https://www.w3.org/TR/xhtml11/ . The XHTML code might end up looking as follows: <p class="Illustration"><img alt="..." src=" ..." /></p> <p class="caption">Illustration ... </p> Note: 1. The content of the alt attribute (the contents of ODF's <svg:title> element) should not be repeated after the img element (which is a different bug). 2. I have replaced <div class="Illustration"> with a p element, which is more appropriate. The value of the class attribute may depend on the caption category in the ODF file. -- You are receiving this mail because: You are the assignee for the bug.
