Prevent linebreaks and hyphen in some short texts (emails)

Previous topic - Next topic


I wish i could prevent linebreaks and hyphens in some specified text.

emails should not be hyphenated. hyphenation is hard to distinguish from a real included dash.
+ sometime emails include a dot or a dash like but i dont want any linebreak or hyphen to break any part of that text.

Idealy this would be achieved with text having a specific character style. But i dont thing it is possible as for now. Is there a way ?

Possibly using a script ?


the "standard" way for avoiding the hyphenation of a word is to put a soft hyphen in front of the word.

a long time ago cezary even made a patch for it:

according to the comments in the ticket, scribus seems to already have some code that tries to implement it but fails...


i have a trivial two lines patch against the current code that prevents "Extras > Hyphenate" from hyphenating words that start with a soft hyphen.

i have to check what happens when "hyphenate while typing" is on.
if you first type the soft hyphen, it seems to respect it.
when you go back and add it later, then the word gets hyphenated.

finally, i think that we also should make the soft hyphens visible when the control chars are shown...
does anybody have a suggestion on how to do it?
i've checked libre office and it adds an hyphen with a dark gray background. sadly, this changes the layout so i don't think it will be a solution that can be used in scribus.

ps.: note to self: a vertical light gray bar before between the letters could be a good solution...


i've uploaded the "trivial" patch:

like the best wines, it will get better after a few years in the mantis cellar...

i've also added a short analysis on how the hyphenation of single words can be prevented in scribus:

  • it is possible to set the smallest word to be hyphenated for a specific word (or a character style) to 99 and avoid the hyphenation of a single word.
    this seems to be working for both the automatic hyphenation and for "extras > hyphenate text"
  • when "hyphenating during typing" is enabled, typing a soft hyphen when staring a word will prevent the hyphenation of that word.
    adding the soft hyphen when some hyphenation already occurred is possible, but the inserted hyphens need to be manually removed by deleting the letter before the automatic hyphen and retyping that letter.
  • "extras > hyphenate" simply ignores the soft hyphen in front of a word (this behavior gets fixed with the patch mentioned above).

this won't allow you to avoid a line break, since scribus does not allow the text to go outside of the frame.