Enhance simple book title page to list on toc#2368
Conversation
Add to TOC if Title is not empty. Conditionally Title, SubTitle, and Footer if they are not empty. Use a slightly bigger image size, if both the last 2 fields are empty, otherwise, use the original image size.
Add Developer name in the change log
|
This updated code has been successfully tested: see output above. To avoid confusion between PR features, it is a lot easier for me to start a new branch from scratch (=master). This new PR is totally independent. The old PR 2365 will be closed (= abandoned), since it was stacked against an uncleaned PR 2300, which also was stacked against another uncleaned PR 1873. I have implemented all changes as suggested by DSBank for PR 2365. Verbose emptiness checks — len(self.subtitle_string.strip()) > 0 should be just self.subtitle_string.strip(). The core change (skipping empty subtitle/footer paragraphs and adding the TOC mark) is correct and a good improvement. Thanks, and sorry for all the confusions. |
|
@dave-khuon can you add a description? |
|
Just did. Thanks. |
Add a check button to control whether to add this Title Page to the TOC. Just to respect the old behavior, if required.
Allow either Title or SubTitle to be used for TOC Title. If both not present, use filename of the image. If none of the above are present, allow the Title Page Subject to be listed as "not provided", and this page will produced a blank page. We do not touch of the book driver logics which provide the current behavior. If both SubTitle and Footer are not present, we can use more room for the image.
|
Here is the resulting Book output, using this book item list: |

This enhancement is to make this title page more flexible, as it can be used not just at the beginning of the book, but throughout it, as chapter separators for different sections of the families.
The appearance of the page on the TOC is controlled by a check button. Its Subject is determined by the presence of Title, or Subtitle, Image filename, or a "Not Provide" if all the above fail.