|
From: Jonathan G. <jgo...@gm...> - 2024-10-14 17:28:22
|
Currently, the method of identifying a section using a title with underlines and optional overlines does most of what I need in docutils. It generates the following HTML: * HTML <section> start * HTML section title * HTML Id modifier to uniquely identify a section. * HTML </section> to mark the end of a section. What it does not do is allow me to specify an HTML class. What I want to do is to style all sections differently depending on the level - h1 to h6 of the section. I have done this manually by modifying the generated HTML and therefore have a working verification of the concept. A simple way to achieve this seems to be to create a new directive That allows me to add a class specification as an option to the directive but I am hoping that there may be a simpler solution. Any suggestions? P.S. I am using Docutils from Sphinx using Sphinx 7.4. -- Jonathan Gossage |