rst2latex and (un)numbered sections

Martin Koutecký <[email protected]> Sat, 9 Nov 2019 20:29:56 +0100
Newsgroups gmane.text.docutils.user
Message-ID <CAHRAuJDyuQ3E81xpm2ok5ED2vpBV57OXGpqQ0uztZu6hBcOPDw@mail.gmail.com>
In LaTeX, one may write \section{...} for a numbered section and
\section*{...} for an unnumbered section. This seems impossible with rST.
Is this correct?

I have a large document which I'm translating into LaTeX using rst2latex
and (because of specific styling needs) I would like to have both numbered
and unnumbered sections. Does anyone know a hack to do this?

I wanted to implement the following: for a normal section, just write

Section
=======

but for an unnumbered section, write

STARRED Section
===================

and then in LaTeX redefine the \section command with ifthen to give
\section*{Section} (gobble "STARRED ") if the title begun with the special
string and to give \section{Section} if it did not start with that special
string. But this also seems quite hard to do.

Happy to hear your advice,
Martin