H3 title spread over two pages in PDF

Any idea how I can change the configuration or the css to prevent in a PDF a H3 title starting at the bottom of page and ending at the top of the following one? I’m using McLuhan Theme (v. 2.13.0).
Thanks

See Paged Media · Prince Documentation. I think you’d want to use the ‘break-inside: avoid’ rule in this case. Maybe try something like:

h3 {
break-inside: avoid;
}

You might have to fiddle with the selector to make sure it’s applied correctly. There is a PDF print preview available in the browser that can help you troubleshoot CSS changes in your PDFs. Visit https://YOURNETWORKURL/YOURBOOKURL/format/xhtml?debug=prince to see it. It’s not perfect, but does give you a browser-based preview of your PDF and lets you use inspect tools to preview CSS changes, etc.

Thanks a lot @SteelWagstaff ! Exactly what I was looking for! :+1:
Thanks also for the Prince documentation page.

François

1 Like