Custom Hyphenation – Add a word to Hyphenation Dictionary?

Hi there,

I would like to be able to add rules for hyphenating certain words in a document.

For example, in one document, the word “Ramakrishna” occurs hundreds of times. Libreoffice doesn’t hyphenate the word well; it usually breaks it at Ra-makrishna, but preferably we would have it hyphenated at Rama-krishna; with an option also for Ramakri-shna.

I haven’t found any way to do this other than to put soft hyphens in every instance of the word—not a very elegant solution, and makes proofreading the text on screen annoying.

I found the mysterious hyph.dic file, but it is some kind of code—no actual words are in there. I can add words to the spelling dictionary; can I add words to the hyphenation dictionary?


Simply set the hyphenation rules to not hyphenate after the first or second letter.

Thank you, Floris.

But I don’t want that rule applied to all words. I want other words to be able to be hyphenated after two letters; it’s just that one word that is the problem.

I note that if I select the word Ramakrishna, and then go to tools—>language—>hyphenation, it gives only one option: Ra-makrishna. I can’t move the hyphenation point. So the algorithm is unable to hyphenate it in any other way.

There is a very good reason to not hyphenate after the first or second letter in normal text: many guides disapprove of it because it looks ugly.
A better suggestion is offered by @ajlittoz.

1 Like

Since the presently only known way to do it is inserting soft hyphens, have you considerd using Edit>Find & Replace?

  1. prepare the first occurrence of Ramakrishna in your document as Rama<soft_hyphen>kri<soft_hyphen>na. Copy it (into clipboard).
  2. in Edit>Find & Replace, enter Ramakrishna into Find:
  3. paste into Replace:
    Note you won’t see the soft hyphens nor any space/mark to tell you there are special descriptors in the word
  4. Replace All
1 Like

Thanks, Ajlittoz.

Yes, that is one workaround I had considered.

And if you are correct that this is the “only known way to do it”, then there’s my answer! I was hoping there was a way to edit the hyphenation dictionary. I know in some other software one can do that.

Since the text may, in future, be exported to another software for more precise typesetting, I was reluctant to use this method.

I did discover that there is a way to “hide” the soft hyphens; right now they are showing on screen. I’ll just have to remember to delete them all before resetting the type in other software.

Finally, is this something that deserves a feature request? What do you all think? Sounds like it’s not an issue for most people…

The soft hyphens will only be visible in a PDF or printed when they occur at the end of a line.
We strongly advise you to turn on display of non-printing characters and things like soft hyphens while you are writing or editing your work, just like builders keep the scaffolding while building a house. It doesn’t look pretty, but it’s an invaluable help because you can see what you are doing.

1 Like

Right, I agree. It’s just so ugly when proofreading, to see all those soft hyphens!

Thanks for your help & best wishes to you.

When proofreading, just turn them off.

1 Like

If you said what version you are using, I missed it, but the Writing Aids page in the online help for ver. 7.3 says that when entering a word in a dictionary, you can enter an equals sign (=) at the place(s) where hyphenation should take place. An equals sign at the end of the word prevents automatic hypenation.

Thanks for that, Paul. Currently version 7.2.

Where does one enter words into the dictionary?

Go to Tools > Spelling and click on the Options button. Select a dictionary and click Edit. Then enter the word. Put hyphens in where the word should be divided, or leave it undivided and put an = equal sign at the end to indicate that it should never be hyphenated.

1 Like

Thank you, Paul! At long last I now understand how to add hyphenation to the dictionary. That works perfectly. Brilliant!

Glad to be of help.