Contents

Hyphenation

There are various techniques for managing hyphenation in PDF output.

You can change the basic hyphenation settings (variables) in your book’s print-pdf.scss or screen-pdf.scss files. Our default stylesheets can ask Prince to hyphenate paragraphs and lists (p, ul, ol, dl), with a few exceptions (such as text on the title and contents pages). Prince includes a range of hyphenation dictionaries for major languages by default, which do a good job. However, you might need to add dictionaries or lists of specific words that Prince doesn’t support.

You can find .dic files online for various languages and specialities, or you can compile your own.

A .dic file is a plain-text file with one word or word-fragment on each line. Each one is called a pattern.

To show where a word or word-fragment can hyphenate, you add digits (1 to 9) to the pattern. The digits have special meanings:

For user discussion, see the Prince forums here: If you need to hack Prince’s built-in hyphenation dictionaries more deeply, see this forum post.