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.



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 line breaking for non-justified text, one paragraph at a time. The *-lookahead values will usually improve ragged line breaking choices (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-browers–style line breaking: useful for testing the effect of styling changes that don't depend on good line breaking.



  • 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’).


  • 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



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



  • Reduce number of uneven spreads.


  • Don't hyphenate as often for ragged text.


Line breaking



  • 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.


  • 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”).