232 Commits
Author SHA1 Message Date
Jared Dillard fceed642c3 Clarify version-added body vs argument parsing (#14630) 2026-10-23 13:21:23 -07:00
gerhardtgaoandAdam Turner a20ca6371c Fix link to Docutils' `.. class::` directive (#14193)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-12-24 16:15:41 +00:00
Adam Turner 8256092f14 Retarget to Sphinx 9.0 (#14093) 2025-11-25 08:00:08 +00:00
Dimitri Papadopoulos Orfanos 994a062c5f Fix typos found by codespell (#13992) 2025-11-24 23:07:38 +00:00
Stephen FinucaneandAdam Turner 44a98961b2 Use hyphenated version directives (#13714)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-10-06 00:10:35 +01:00
Ugo 9a08711e0e Correct the example for the `seealso` directive (#13854) 2025-08-27 10:54:15 +01:00
Jean-François B. 7b4164a5f2 LaTeX: better choice for \tymax parameter (#13711) 2025-07-01 18:29:08 +00:00
Jean-François B. 74c1686789 LaTeX: improve the table column widths computed by LaTeX itself
Fix #3447
Fix #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.
2025-06-29 21:42:47 +02:00
Adam Turner 551b842898 Deprecate support for source encodings other than UTF-8 (#13666) 2025-06-16 20:32:31 +01:00
Jean-François B. 4564486af4 LaTeX: clarify that latest docs addition refers to LaTeX 2025-06-11 10:05:28 +02:00
Jean-François B. f1316bb169 LaTeX: allow more cases of table nesting, fix #13646
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.
2025-06-10 18:04:02 +02:00
Tim HoffmannandAdam Turner 74627b25b0 Use anonymous references for links with embedded URLs (#13615)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-06-07 17:07:52 +01:00
Adam Turner c49d925b4d Remove `productionlist` hard-coding in writers (#13326)
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.
2025-02-13 00:16:26 +00:00
Chris SewellandAdam Turner 134bd7f1fb Add `collapsible` option to admonition directives (#12507)
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>
2025-01-29 18:06:57 +01:00
Adam Turner 42f300ee83 Rename the `:nowrap and :nosignatures:` directive options (#13264)
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.
2025-01-23 04:30:46 +00:00
Adam Turner fdb1b0cdad Update documentation for the `:no-search:` file-wide metadata option 2025-01-10 16:56:21 +00:00
Tim Hoffmann b2d69a7f41 Make a dedicated section for cross-reference syntax in docs (#12984) 2024-10-07 20:14:41 +01:00
Shahriar HeidrichandAdam Turner 7ad2733f4d Improve code-block/sourcecode class option docs (#11585)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-06 20:36:28 +01:00
09ab6edde5 Add CVE and CWE roles (#11781)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-05 18:44:14 +01:00
Tim HoffmannandAdam Turner 4080be1e82 Improve cross-reference documentation (#12944)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-03 15:58:37 +01:00
Tim HoffmannandAdam Turner 3b9aa9cace Format `literalinclude` directive options (#12780)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-18 02:55:14 +01:00
Wei-Hsiang (Matt) Wang e35e7b0fbe Remove unnecessary `:func: and :meth:` parentheses (#12848) 2024-09-01 06:33:28 +01:00
Tim HoffmannandAdam Turner 49c3b21c60 Format directive options and add some missing ones (#12779)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-08-14 20:59:50 +01:00
Tim HoffmannandAdam Turner 4cf8f7a093 Restructure documentation for the toctree directive (#12725)
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>
2024-08-11 16:36:01 +01:00
Adam Turner 18ac58bd53 Fix possibly-invalid HTML when a rubric node is manually created 2024-07-15 10:04:48 +01:00
Adam Turner 3456ff3ca3 Add all admonitions to `directives.rst` (#12572)
Also improve documentation for the *versionchanged* directives.
2024-07-15 02:26:05 +01:00
Adam Turner 7b570c06a1 Standardise on a common directive for describing code snippets 2024-07-15 02:15:52 +01:00
Adam Turner 1252c7b549 Use "rst" consistently for code and highlighting directives 2024-07-15 02:15:52 +01:00
Adam Turner f2640a4286 Standardise on "reStructuredText" over "reST" in documentation 2024-07-15 02:15:52 +01:00
Adam Turner 26576590ed Make the domain referencing role targets more specific 2024-07-15 01:59:42 +01:00
Chris Sewell 41b363dbff [rst] Add level option to rubric directive (#12506)
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.
2024-07-14 05:52:58 +02:00
Adam Turner 82edc3d385 Rewrite `usage/configuration.rst` (#12537)
- 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
2024-07-10 21:43:14 +01:00
Tim HoffmannandAdam Turner a95d716f7f Add a class option to the toctree directive (#12524)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-10 11:07:49 +01:00
Ed Cormany 98f953e158 DOCS: improve :tocdepth: note (#12356) 2024-05-07 04:49:08 +02:00
Bénédikt Tran f44ff30673 [doc] cleanup references and update external URLs (#12182) 2024-03-25 11:39:05 +01:00
Bénédikt Tran b2069fb64f [lint] update Makefile and lint doc (#12117) 2024-03-17 14:45:56 +01:00
Demetrios KozirisandBénédikt Tran faa33a53a3 [docs] Clarify how to escape curly braces in `samp` text (#11987)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-02-22 09:48:12 +01:00
Harrissou Sant-anna f4eea669e0 Fix wording for the number of default substitutions (#11985) 2024-02-19 10:14:07 +01:00
95b2cce9a0 Add a `versionremoved` directive (#11905)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-21 20:12:52 +00:00
pcgaustad 2ccc9d315e Give a more plausible example for a combination of tags (#11899) 2024-01-20 19:10:23 +00:00
Nicolas PeugnetandAdam Turner 59cf4d4c35 Allow custom targets in the manpage role (#11825)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-01-17 01:09:18 +00:00
Adam Turner 23cef9b59a Use `https://` where possible 2024-01-14 04:18:57 +00:00
Dimitri Papadopoulos Orfanos 460a63010f Fix various spelling errors (#11735) 2024-01-04 02:37:44 +00:00
Adam Turner 81a8870eee Note that cross-referencing syntax has moved to a new location 2023-10-03 19:39:36 +01:00
Adam Turner 6a56592b30 Move cross-referencing to a new page 2023-10-03 19:32:37 +01:00
Adam Turner 05682f12a6 Restore `usage/restructuredtext/domains` 2023-10-02 13:10:11 +01:00
Adam Turner c0e17eca40 Move the domains reference up one level 2023-10-02 13:09:38 +01:00
Nikita Sobolev 1bd261c3a0 Fix a typo in the `:final:` option for methods (#11670) 2023-09-14 09:50:49 +01:00
Hugo van Kemenade 359edc34fc Use the Python 3 `print()` function in the documentation (#11683) 2023-09-14 09:45:20 +01:00
blaisep b0fe730146 Fix #11407 adjust the spelling in the example. 2023-07-30 15:08:49 +02:00