## 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

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. With a text frame selected, click Item > Check Spelling. 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.

If you have dictionaries for more than one language installed, or more than one dictionary for a single language, the spellchecker may not work correctly or not at all. For example, if your character style uses “English” as the language setting, using the dictionary “en_US” (US-American English) won’t work, as “English” is being mapped to “en_GB”. Likewise, “German” will be mapped to “de_DE”. This cannot be fixed in the 1.4.x series because it would break backward compatibility with Scribus files created with prior 1.4.x versions. The file format of the next Scribus version will handle this correctly. As a workaround you can either install the working version (e.g. en_GB or de_DE) or to remove or temporarily disable (=rename) other dictionaries.