Docutils sections

Jonathan Gossage <[email protected]> Mon, 14 Oct 2024 13:27:33 -0400
Newsgroups gmane.text.docutils.user
Message-ID <CAApdmf2DXt25UKSE3pHFpwpb6wowEu=xFDkvuxLBLQXYmbZhag@mail.gmail.com>
--===============1442322180786506989==
Content-Type: multipart/alternative; boundary="000000000000248d410624732928"

--000000000000248d410624732928
Content-Type: text/plain; charset="UTF-8"

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

--000000000000248d410624732928
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-size:xx-large">=
Currently, the method of identifying a section using a title with underline=
s and optional overlines does most of what I need in docutils. It generates=
 the following HTML:<br>* HTML &lt;section&gt; start<br>* HTML section titl=
e<br>* HTML Id modifier to uniquely identify a section.<br>* HTML &lt;/sect=
ion&gt; to mark the end of a section.<br><br>What it does not do is allow m=
e to specify an HTML class. What I want to do is to style all sections diff=
erently depending on the level - h1 to h6 of the section. I have done this =
manually by modifying the generated HTML and<br>therefore have a working ve=
rification of the concept.<br><br>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 soluti=
on. Any suggestions?<br><br>P.S. I am using Docutils from Sphinx using Sphi=
nx 7.4.<br clear=3D"all"></div><div><br></div><span class=3D"gmail_signatur=
e_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature" data-sma=
rtmail=3D"gmail_signature"><div dir=3D"ltr">Jonathan Gossage</div></div></d=
iv>

--000000000000248d410624732928--


--===============1442322180786506989==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============1442322180786506989==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline