Re: publish_parts and table of contents?

Guenter Milde via Docutils-users <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
On 2017-07-18, Tony Narlock wrote:

> Is there a way to get the equivalent to “.. contents::” from publish_parts?

According to
http://docutils.sourceforge.net/docs/api/publisher.html#publish-parts-details,
no.

> If not, is there any way to get the table of contents programmatically?

This could be done in a wrapper; or a custom writer or front-end.

Places to look include the transforms.parts.Content() and the used HTML
writer.

> If not, is there any reason / issue with it being a feature?

I don't know.

> The practical use is a developer pulling out parts the HTML output would
> like control over the table of contents output.

The simple and secure approach would be CSS styling --- unless the task is
more complicated.

Günter




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.