0

We have a project which produces html from rst files, using Sphinx. Earlier we used Sphinx version 2.1 and after upgrade to version 6.1.3 a sideeffect occurs where our headers defined like this:

:header:

are rendered in our html structure as small headers, just like when we used Sphinx 2.1, but span with class "colon" is injected by Sphinx right after the header. Is there a way to stop Sphinx doing that without resorting to hiding it with CSS?

mzjn
  • 48,958
  • 13
  • 128
  • 248
ms3300
  • 216
  • 6
  • 13
  • `` was added in this Docutils commit: https://github.com/live-clones/docutils/commit/2f030728a033641764660ad1b4312191850b1748. Also mentioned here: https://docutils.sourceforge.io/HISTORY.html#release-0-18b1-2021-10-05 – mzjn Aug 09 '23 at 19:02
  • We wanted to maintain the :header: as simply a specific smaller header, because when we use other headers, corresponding to h6 for instance, we can't have the header use a smaller padding. It's going to be rendered as the smallest header based on the earlier headers in the file. So this ```:header:``` was for us a great way to have a custom smaller header. The old approach which worked can be observed in the header "description", or "availability" under this link: https://success.medius.com/release-notes/R118/#new-pre-approved-invoices This is the old build, and this is our intended header. – ms3300 Aug 10 '23 at 13:49
  • Maybe you can use `.. rubric:: Description` (https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-rubric). – mzjn Aug 10 '23 at 17:45

0 Answers0