Fix#3447Fix#8228
With this patch the legacy notion of "problematic cell" is almost
entirely removed, and LaTeX package tabulary will be used more often so
that column widths in tables may get better fit to actual contents.
This works well when the column contains cells with multiple paragraphs,
bullet lists, enumerated lists, or line blocks. For cells with object
descriptions or admonitions, the column may not fit tightly to the
contents, but other columns will probably be improved.
Tables using longtable can now contain nested tables inclusive of those
rendered by tabulary, up to the suppression of the latter horizontal
lines due to an upstream LaTeX bug. A longtable can never itself be
nested, and will fall-back to tabular.
Formerly longtable would raise (in principle) an error if it contained
any sort of nested table, but the detection of being a longtable was
faulty if not specified as class option.
Relates #6838.
The ``productionlist`` directive operates in a line-based context, creating an ``addnodes.productionlist`` container
of ``addnodes.production`` nodes, with one per production in the directive. However, the full state of the abstract
document tree is not included in the produced nodes, with each builder/translator implementing a different way
of appending the fixed separator ``::=`` and justifying the displayed text.
This should not happen in the writer, and hard-coding such details hampers flexibility when documenting different
abstract grammars. We move the specific form of the ``.. productionlist::`` directive to the logic in the directive body
and have the writers apply minimal custom logic.
LaTeX changes written by Jean-François B.
This PR adds the `collapsible` and option to the core admonition type directives, which are propagated to the nodes, e.g.
```restructuredtext
.. admonition:: title
:collapsible:
content
.. note:: content
:collapsible: closed
```
For the HTML5 writer, this replaces the outer `div` with a `details` tag, and the title `p` with a `summary` tag (with an `open` attribute if set), e.g.
```html
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>hallo</p>
</div>
```
changes to
```html
<details class="admonition note" open="open">
<summary class="admonition-title">Note</summary>
<p>hallo</p>
</details>
```
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Rename the ``:nowrap`` and ``:nosignatures:`` directive options to
``:no-wrap`` and ``:no-signatures:``, for readability.
This mirrors changes already made to `:no-index`, `:no-index-entry`,
`:no-contents-entry`, and `:no-search` in Sphinx 7.2 and 7.3.
Structure the options using `.. rst:directive:option::` and adapt some descriptions where suitable.
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This commit adds a `level` option to the `rubric` directive, which propagates a `level` attribute to the `rubric` node,
and allows renderers to select a specific heading level.
Logic for this attribute has been added to the HTML5 and LaTeX builder.
- Remove now-removed configuration values
- Use obvious 'unset' defaults for ``project`` and ``author``
- Prefer 'e.g.' to 'ex.'
- Allow non-list sequence types in various configuration values
- Add types and defaults to every confval directive