brechtm / rinohtype

The Python document processor
http://www.mos6581.org/rinohtype
GNU Affero General Public License v3.0
506 stars 61 forks source link

Missing Title Page in Article Template #433

Open Marttico opened 1 month ago

Marttico commented 1 month ago

I'm using the article template for my report, which previously included a title page. However, in the latest version of RinohType, I've noticed that the title page has been removed. It seems this change was made because the article template was too similar to the book template. Unfortunately, the book template adds blank pages after each chapter, making it less suitable for my use case.

Is there a way to reintroduce the title page in the article template, or to get rid of these blank pages in the book template?

My current template looks a like this:

[TEMPLATE_CONFIGURATION]
name = Eindverslag configuration
template = article

language = nl

[VARIABLES]
paper_size = A4

I use the following command to render it: rinoh Eindverslag.rst -t my_book.rtt

brechtm commented 1 month ago

The default book template configuration is set to start chapters on odd (right-hand) pages, inserting blank pages when necessary. The easiest way to achieve your goal is to use the book template and override the setting for the page_break property of the chapter style by supplying your own stylesheet that inherits from the sphinx stylesheet (the default for the book template):

[STYLESHEET]
name=My custom template
base=sphinx
description=Some tweaks to the stylesheet used by the Book template

[chapter]
page_break=none
Marttico commented 1 month ago

Thanks @brechtm ! This seems to work for most blank pages, however it does seem to still have a page break after the title page and before the Table of Contents of my document. Any idea on how I could fix that?

brechtm commented 1 month ago

I assumed this could be fixed by setting the _pagebreak property on the table of contents section style, but this doesn't to have the expect result. This might be a bug, but I can't make any promises as to when I would be able to look into it, I'm afraid.