Hyphenation and Spellchecking

Hyphenation

Introduction

One of the reasons for ugly text layout is “rivers” between words. What you may easily see are white spaces that run vertically across lines of text, which are visually distracting. 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. There are other means to reducing visual ugliness or distraction in text, but hyphenation is probably the simplest.

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.


Hyphenator Settings Dialog

The dialog consists of two tabs. In the Behaviour tab, you can determine the general behaviour of the hyphenator:

In the Word Lists tab 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.

The settings to the right were formerly in Preferences, but have now moved out to a Hyphenation tab in the new Text Properties palette. The smallest word default setting is probably rather liberal, since few would want to hyphenate a 3-letter word. Similarly, you may may not want to have 2 lines in a row 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

Settings for Spellchecking were formerly under Preferences, but now have moved to Windows > Resources. This brings up the Resource Manager, with Spelling Dictionaries being one of the Categories to choose from. The purpose of this dialog is not the configuration of spellchecking options per se, but the management of available dictionaries. Currently, Scribus is using Hunspell for spellchecking, and while there are quite a number of dictionaries available, for less common languages you may need to seek their dictionaries from other sources.


Hyphenator Settings Dialog

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.

Scribus will also make use of Myspell dictionaries, so an alternative place to have them in Linux, for example, might be in /usr/share/myspell.

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. You invoke spellchecking with Extras > Check Spelling... (keyboard: Shift+F7). There is a language selector in the spellchecking dialog, but this will not be very efficient for a language other than your default one, since after each word, it will revert to your chosen language. For example, let's imagine that your Scribus language is set for English, and you have some German text in a frame you would like to spellcheck. While you might think that going to Preferences and changing the language to German is the correct method, but this will only change the language for menus and so on.

The language for spellchecking is actually set in the Edit dialog for Character Styles. For example, pull up the dialog for editing styles, select Default Character Style, then Edit, and under Advanced Formatting you set the language, which will apply to spellchecking as well. You should be able to see when you open the spellchecking dialog that the appropriate language is now indicated.


Hyphenator Settings Dialog