Prince for Books

Prince for Books is a new venture that allows us to spend more time on features particularly sought by publishers.

The initial focus of work is on features common to all books: making the pagination and line-breaking choices expected of books.

Read more in the Prince for Books documentation section of the User Guide.

Downloads

Changes

2022-08

Synchronised with Prince latest build 2022-07-01.

2021-04

Synchronised with Prince 14.1.

2019-11

Synchronised with Prince 13.

2018-10

MacOS X

  • Fixed bug affecting fonts on MacOS 10.14 (Mojave).

Line breaking

  • Better handling of paragraphs containing a float, including the case of a drop cap.

    (The line breaking will still be non-optimal around where each float starts and ends, where the line width changes, but most of the paragraph will now be more consistent with the rest of the document.)

  • Line breaking in multi-line headings now uses lookahead by default.

2018-09

Spread balancing

  • Change the balancedness criterion to include bottom margin, allowing that margin to be truncated for purposes of deciding whether the two pages can be considered to have the same length.

  • New @page property prince-page-fill to allow suppressing spread balancing.

    Note that in this initial release, the value to suppress spread balancing is called auto, whereas in future releases the value will instead be called prefer-fill. CSS error-handling rules allow giving one declaration with each value for now.

Line breaking

  • Make spacing in justified paragraphs less dependent on the width of the font's space glyph.

  • Minor other line-breaking tweaks, including reducing degree of insistence on the last line being a fair proportion of the measure; and slight increase in insistence of being at least as long as the text indent.

2018-06

Based on Prince 12.

Line breaking

  • Try harder to avoid violating a requested prince-hyphenate-lines limit.
  • German:
    • Use different line-breaking trade-offs for paragraphs marked up as being in German (as judged by the same rules as for :lang(de)).
    • Hyphenation changes.
  • Minor other line-breaking changes.

Ragged line breaking

  • Change canonical property name from prince-text-wrap to prince-line-break-choices, but retain prince-text-wrap as alias.
  • Renamed initial value from css-text-4–style wrap to body.
  • New values 'body-lookahead', 'heading-lookahead', 'title-lookahead', to enable paragraph-at-a-time line breaking for non-justified text: that is, to allow revisiting an earlier line to improve a later line, rather than deciding line ends one at a time before seeing what problems arise in the rest of the paragraph. The *-lookahead values will usually improve line-breaking choices in ragged paragraphs (at the cost of using more time and memory), and we expect them to become the default in future releases once we've had more experience that they don't cause significant regression; please let us know if you find they make anything worse.
  • New value fast, for quick web-browser–style line breaking: useful for testing the effect of styling changes that don't depend on good line breaking.

2018-04

Hyphenation

  • Reduce aversion to hyphenation at end of a page, especially on verso pages, or if the hyphenation is at a natural break in the word, or if the paragraph is marked as being in German.
  • More aversion to dividing the first word in a hyphenated phrase.
  • Fix a problem in German hyphenation inference (wrongly breaking mid-word after ‘sch’).

2018-02

  • Hyphenation updates, mainly for chemistry terms
  • New property prince-text-wrap: wrap | heading | title. [Renamed to prince-line-break-choices in 2018-04.]
  • Penalize breaking before a dash or ellipsis
  • Allow breaking before or after dash
  • Penalize word division within hyphenated phrase
  • Fix division by zero bug

2017-07

Hyphenation

  • Better treatment of English compound words.
  • English dictionary based hyphenation.

2017-03

Pagination

  • Reduce number of uneven spreads.

Hyphenation

  • Don't hyphenate as often for ragged text.

2015-05

Line breaking

2015-04

Pagination/hyphenation

  • Try harder to avoid a hyphen at the end of a page.

Line breaking

  • Try to avoid a short last line, especially if shorter than text-indent.
  • Weakly try to avoid a hyphen at the end of the last full line.
  • Be more willing to have a loose line for the first line of a paragraph.

Command-line

  • No longer need --books flag. Add --web-layout flag.

German language

  • Significantly improve choice of where to hyphenate a word. (Please let us know of cases we still get wrong!)

Short-term Roadmap

  • Pagination: Treat pagination as an optimization problem, and adjust line-breaking decisions to improve pagination.
  • Line breaking: Improve line breaking of ragged text (such as headings and table cells).
  • Pagination: Some mechanism to allow a widow line if it is at least k% full.
  • Baseline grid: Initial simple mechanisms for a baseline grid.
  • Hyphenation: Improved hyphenation choices for English, especially in compound words (“handwritten”).