OpenTechStrategies / SimpleBook

A fork of the Collection Extension to print books from MediaWiki instances
1 stars 1 forks source link

Don't render a Table of Contents for a one-item book #53

Open slifty opened 3 years ago

slifty commented 3 years ago

If a book only has one item I would like to suggest that the Table of Contents should not be rendered.

Who's with me?

slifty commented 3 years ago

One related use case: When #52 is fixed, we will have one-item books regularly being generated. Those books will generally also NOT have titles or subtitles (right now if there is no title provided, the title page is not rendered). In that use case we would currently generate a table of contents with 1 item, and then the item.

jim-mcgowan commented 3 years ago

@slifty: I don't have a problem with not rendering a TOC for one item books, however, it seems like it would be more work to exclude it.

kfogel commented 3 years ago

I agree, it would look weird to have a TOC for a one-item book, and I think it's worth the (surely very small?) amount of extra work to exclude it.

slifty commented 3 years ago

Excellent!

This is a very small change indeed.