Forum › News

Prince 17 released!

mikeday
Today we have released Prince 17 with some major new features:
  • Fragmented CSS grid layout, spanning multiple pages
  • CSS cascade layers and nested CSS
  • Markdown documents as input files
  • JavaScript ES6 classes and a faster JavaScript parser
  • OpenType COLR fonts, such as Segoe UI Emoji
The full list of changes and improvements can be found in the release notes and Prince for Books is now synchronised with Prince releases.

Thank you to everyone who has used Prince and supported its development!

Edited by mikeday

jenniferflint
I am excited to see the continued development here and have now run my first test cases in Prince 17. One test shows different behavior where both a hyphenation override and word-spacing override have been placed on a single paragraph. The combined CSS instructions yield a less pleasing result in Prince 17 than in Prince 16.2.

I've attached my sample files which use the same HTML and CSS file for both Prince 16.2 and Prince 17 and show a different result for the first paragraph on the top of the 2nd page (in magenta). Any idea why this may be different?
  1. word-spacing-Prince17.zip‎ 181.3 kB ‎
    word-spacing-files
pjrm
(By the way, please consider posting to a new topic in the Bugs forum, perhaps with a topic name such as "reducing word spacing for pagination", as this discussion isn't relevant to most people interested in the release of Prince 17.)

I can't reproduce this pdf, as most of the CSS referenced by the HTML (rel="stylesheet") is on a private site (ht​tp://bis/Prod$/...).

Looking at the pdf, I would guess that it is not an interaction between hyphenation and word-spacing, but just a change in line-breaking choices. I expect that further reducing the word-spacing slightly would give the same number of lines as Prince 16 gave. That said, the negative word-spacing does make the text look rather cramped; is that trying to avoid a widow or the like, perhaps a pagination issue present only in the full document of which sfsl.80-p*.html is/are an excerpt? What is it that's less pleasing: is it the fact that it uses an extra line, or the fact that the result ends in a “runt”, a short word part?

Either way, consider using Prince for Books for this sort of document, which will use more CPU time and less human time to do pagination: it will often be able to guess for itself which paragraphs should be squeezed or stretched (if “-prince-change-line-breaks-for-pagination: yes;” is used), or which headings, diagrams, footnote areas etc. to add space around (if they are marked with -prince-resize-options to say how much space to consider adding or removing). Or if you want to choose the paragraph to squeeze or stretch, you can use “-prince-n-lines: -1” on that paragraph (i.e. reduce the number of lines by 1, relative to when there are no pagination considerations for that paragraph), and it will change the word spacing as necessary to achieve that. The sample stylesheet for the novel sample linked from that page explains how to use these pagination properties (and how to achieve a few other things often needed in books). (And Prince for Books also gives fewer paragraphs ending in a short last line than normal Prince, if that was the concern.)
pjrm
If using normal Prince, then consider adding a span around the end of the paragraph, and styling that span with white-space:nowrap. This might help with encouraging particular line breaking choices, when you're trying to squeeze (or stretch) a paragraph for pagination purposes.

(Incidentally, as I mentioned just now in a separate topic, I would suggest moving word-spacing adjustments and nowrap styling that are just for pagination purposes into a separate stylesheet: if content or styling subsequently changes, then this typesetting-related stylesheet can be reviewed or even dropped — e.g. for a different edition or a change to page size or body font size.)