From: Günter M. <mi...@us...> - 2022-08-04 11:22:23
|
- **summary**: rst2odt generates numbered lists, when it shouldn't --> rst2odt ignores start value of numbered lists - **Comment**: Docutils' reStructuredtext parser recognizes the "date paragraphs" as enumerated lists. This is a known problem that can only be worked around (see https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#enumerated-lists). A quick fix would be to use a non-breaking space after the day number: `9. června` or escape the dot or the space `10\. června`,` 10.\ června`. You could also consider turning the "date paragraphs" into section headings, use a description list, or mark the dates as hyperlink targets: 10. června '''''''''' Začali jsme sestup po severní... 10. června Začali jsme sestup po severní _`7. července` Why does it "work" with HTML5? The parser parses the leading number into a "start" value attribute (check with rst2pseudoxml). The HTML writer uses `<ol>` tags (ordered list) and passes the "start" attribute. Hence, in the browser it may look fine (depending on the CSS styling). The ODT writer, OTOH, seems to ignore the "start" attribute and hence every "date paragraph" starts with 1. --- ** [bugs:#357] rst2odt ignores start value of numbered lists** **Status:** open **Labels:** ODT Writer **Created:** Wed Jan 30, 2019 01:26 PM UTC by Matej Cepl **Last Updated:** Tue Mar 03, 2020 09:41 PM UTC **Owner:** nobody **Attachments:** - [32_Peru.html](https://sourceforge.net/p/docutils/bugs/357/attachment/32_Peru.html) (16.6 kB; text/html) - [32_Peru.odt](https://sourceforge.net/p/docutils/bugs/357/attachment/32_Peru.odt) (9.9 kB; application/vnd.oasis.opendocument.text) - [32_Peru.rst](https://sourceforge.net/p/docutils/bugs/357/attachment/32_Peru.rst) (2.0 kB; application/octet-stream) I have here a simple document in rST (it is actually Czech translation of one chapter of this fanfiction https://www.fanfiction.net/s/12407442/32/ ; I hope it is so simple, I don't need to make a simplified version). It pretends to be a sheet from a diary so it is full of lines (in Czech date format) 30. ledna 2019 (which is how you write January 30th, 2019 in Czech). rst2html5 correctly understands that this is not numbered list and leave those paragraphs as they are. rst2odt however tries to make a numbered list out of these and fails spectaluraly. Using python3-docutils-0.14-2.1 on openSUSE/Tumbleweed (updated as of today) with python3-3.6.5-3.4.x86_64. I have checked with diff and tools/rst2odt.py is essentially identical with /usr/bin/rst2odt from that package. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |