## Hyphenation and Spellchecking

### Hyphenation

#### Introduction

One of the reasons for ugly text layout is “white holes” between words, which in turn are the result of unhyphenated text. A general rule is that the shorter the a line of text, the more likely those gaps are. Hence the strong recommendation to use the hyphenator for continuous text.

#### Configuration

To get the best hyphenation results, you are advised to configure the hyphenator properly. This can be done via File > Document Setup > Hyphenator for the current document and File > Preferences > Hyphenation and Spelling for new documents.

The dialog consists of four parts. In the upper left section (General Options) you can determine the general behavior of the hyphenator:

- Hyphenation Suggestions: If you check this option, Scribus will suggest the hyphenation for every word in a text frame. If applied to a long text, this can be time-consuming, and you may want to correct hyphenations on a case-by-case instead.
- Hyphenate Text Automatically During Typing: If checked, Scribus will automatically hyphenate text in every text frame that’s being added to your document. This includes imported text.

In the upper right corner you can see the most important typographical options, namely:

- Language: There are huge differences between the hyphenation rules in different languages, so you have to make sure to select the correct one. If you use more than one language in a document, you can set up separate character styles for every language.
- Smallest Word determines the length required to trigger a hyphen. The default is 3, which means that a word needs to consist at least of four characters to be hyphenated.
- Consecutive Hyphenations Allowed determines in how many consecutive lines hyphenation is permitted. It is recommended to limit the number of lines, because otherwise the right border of a text looks like a “ladder”. The default is 2, which is common in typography.

In the lower part of the dialog there are two fields that allow you to specify words that you want to be treated differently. The left field is called Exceptions. Here you can add words that aren’t hyphenated correctly by the hyphenator. In the example above, the word “manuscript” has been inserted, including the desired positions for line breaks, which are specified by inserting “-” via the keyboard.

To the right there is a second field called Ignore List. Any word that has been added to this list won’t be hyphenated.

#### Usage

Select a text frame, adjust the text alignment to your liking and then select Extras > Hyphenate Text from the menu. Note that this will only hyphenate text in a selected frame.

In the Extras menu there is also the opposite feature, called Dehyphenate Text. It is used to dehyphenate text in a selected frame, but it can also be used to dehyphenate a single word. To do the latter, you have to select a hyphenated word in a text frame and then use the menu command.

Not every possible or reasonable hyphenation can be detected by the hyphenation algorithm. In such a case you can insert a so-called “soft hyphen” into a word. “Soft hyphen” essentially tells the hyphenator: “Hyphenate here, if possible,” where “possible” means that hyphenation is not prevented by other settings, like Consecutive Hyphenations Allowed. To insert a soft hyphen, you need to place the cursor in a word at the desired break position and then use Insert > Character > Soft Hyphen.

### Spellchecking

For spellchecking Scribus uses the Hunspell library, which is also utilized by other popular programs like LibreOffice, Firefox or InDesign.

#### Configuration

Under File > Preferences > Hyphenation and Spelling you find a second tab called “Spelling”. The purpose of this dialog is not the configuration of spellchecking options per se, but the management of available dictionaries.

If you have already installed a program that uses Hunspell, like, for instance, LibreOffice, Scribus will try to detect the installed dictionaries and use them. Installed dictionaries will be listed in the left column of the dialog, where you can also see their location. To make proper use of the right column you need an internet connection, because Scribus will download a list of dictionaries available in LibreOffice’s freedesktop.org repository. You can then select one or more new dictionaries for download. Please note that these dictionaries are stored in your home directory or its equivalent under `.scribus/dicts`, so other programs cannot use them, unless you copy them to the respective system or program directories.

#### Usage

Using the spellchecker in its current form can be tricky, especially on UNIX and Linux systems (including Mac OS X), where you have two spellchecking options, namely Item > Check Spelling and Item > Spellchecker. The latter will invoke the older GNU aspell library and dictionaries, which are not available for Haiku, OS/2, eCS or Windows. Check Spelling will invoke Hunspell.

Spellchecking works on a frame basis, so just as with hyphenation, you have to select a text frame before you can let Scribus look for errors. One major difference between the hyphenator and the spellchecker is that you cannot set a default language. Scribus will use the system setting instead. If you want to use another language, you have to create a new character style. As you can see below, there is a language selector in the spellchecking dialog, but it will only work for the currently indicated word and then jump back to the language of your character style. The rest should be self-explanatory.