In HTML spec, definition list accepts multiple terms in a item. This patch allows doctree model to have multiple terms as children of definition_list_item also.
https://www.w3.org/TR/html52/grouping-content.html#the-dl-element
In sphinx, a custom directive named "glossary" allows multiple terms for one definition_list_item.
https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#glossary
Do you mean:
(plus the matching change in docs/ref/doctree.txt) ?
We would need to check, that all writers can handle the case
No problem for
HTML5, XML, pseudoXML, ODT, and LaTeX.Currently fails with "html5" writer, the "html4" writer produces invalid output (missing
</dt>
). The "manpage" writer does not fail, however the second term becomes part of the common definition (at least visibly) in theman
output.If implemented, this could be coupled with an input convention with empty comment:
Last edit: Günter Milde 2023-12-12
A test script to generate output with a "hand-crafted" document tree with extra term in a definition list.
Currently fails with "html5" writer, the "html4" writer produces invalid output (missing
</dt>
). The "manpage" writer does not fail, however the second term becomes part of the common definition (at least visibly) in theman
output.LaTeX needs a bit of adaption, too.
This may also break 3rd-party writers like the PDF (reportlab) writer from rst2pdf or the various Sphinx writers.
Last edit: Günter Milde 2023-12-12
Commit [r9747] changes the DTD, documentation, and
nodes.definition_list_item.content_model
to allow multiple terms for one definition.Related
Commit: [r9747]
A possible syntax for reStructuredText input of multi-term definition lists is proposed in [patches:#95].
Related
Patches: #95