Alter Hyphenation-Rules

This forum is for all Flare issues not related to any of the other categories.
Post Reply
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

Alter Hyphenation-Rules

Post by gbusch »

Hi forums,

sorry for the vague title.
Didn't find a better one.
I also had no idea where to post this.
So i start with "General".

My question is about hyphenation and how Flare is processing it.
As far as i understand Flare takes the hyphenation rules and maps it to the words.
So if you have a long word, e.g. "electroencephalographically", you will get a semicolon separated list of possbile hyphenations, which might look like this (linebreaks only for better readability here):

Code: Select all

elec-troencephalographically;
electro-encephalographically;
electroen-cephalographically;
electroenceph-alographically;
electroencephal-ographically;
electroencephalo-graphically;
electroencephalograph-ically;
electroencephalographic-ally;
My problem is, whenever it comes to hyphenation, Flare always starts to check for a possible "break point" from the beginning of that list until it finds a matching one. And as soon there is a match it stops. No matter if there would be another one that would still fit. So at the end of the line you might get this one:

Code: Select all

lorem ipsum ... some blind text ... ELEC-
TROENCEPHALOGRAPHICALLY ... some more lorem ipsum blind text
some other lorem ipsum blind text ... other blind text again
lorem ipsum blind text line ... actually still reading this?
default_hyphenation_1.png
As you can see this doesn't look good since the first line is cut off too early. Anyway what are the other hyphenation rules good for, if only the 1st one is used?
So it would be better, if Flare would start from the end of that list - from the last possible hyphenation rule.
So you would get this:

Code: Select all

lorem ipsum ... some blind text ... ELECTROENCEPHALOGRAPHIC-
ALLY ... some more lorem ipsum blind text some other lorem i
psum blind text ... other blind text again lorem ipsum blind
text line ... i think you got the idea.
To achieve this i always have to watch out for hyphenations in the preview of the print layout, mark the hyphenated word, add a userdefined hyphenation rule by just reverting the one that is already present:

Code: Select all

electroencephalographic-ally;
electroencephalograph-ically;
electroencephalo-graphically;
electroencephal-ographically;
electroenceph-alographically;
electroen-cephalographically;
electro-encephalographically;
elec-troencephalographically;
That will result in this:
custom_hyphen.png
This workaround is ... well it is additional work i'd like to avoid and for the Flare project this is additional overhead.
Anyway you never get all hyphenation problems like this fixed if you have several print outputs with different layouts. In one output the word is hyphenated, in another one it is not ... so you would have to check each page in each outputs.

I know there are some stylesheet rules where i can set length of hyphenated words, length of characters to stay in the first line/last line, short lines etc. but setting these rules in the stylesheet would result in words that might never be hyphenated or in words where the 1st/last hyphenation rule will never be applied. Or if you not set this in the stylesheets you will have to apply these rules to each paragraph indiviually - which is additional work again.

So ... how are you dealing with that?
Is there any way to make Flare starting with the last hyphenation rule?
Because when starting with the first rule you'll never know if the word would still fit to the line if you would choose the second rule (and so on). Or you will have to do some additional check "if hyphen matches -> check next one anyway; if next one doesn't fit to the line -> take previous one".

For me it seems to be more logic to start with the last one. And while the first part of the word does not fit to the line -> check previous rule.

Is it worth to file a feature request?

cheers

EDIT: added screenshots
You do not have the required permissions to view the files attached to this post.
Last edited by gbusch on Mon Nov 30, 2015 2:34 am, edited 1 time in total.
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

What the ... ?!?

Post by gbusch »

Sorry, to bump this topic, but now it's getting worse!

I created a script that iterates over all topics, extracts any word from the topic, applies the hyphenation rules and creates a custom Flare hyphenation xml file with the rules in a proper order. So hyphenation makes really sense (since hyphenation only after the first match makes any additional hyphenation rule completely obsolete). After struggling with encoding-issues, Umlauts etc. this finally works.

But ...

Why is Flare suddenly case-sensitive when using custom hyphenation rules?
It is not case-sensitive when using the build-in rules, but as soon as you use custom rules you need to enter each word at least two times since Flare would ignore the custom rule if it is lower case but the word is at the beginning of a sentence ...

Why, lord, why?

(Sorry for being possibly rude but this really offends me ... )
Last edited by gbusch on Fri Nov 20, 2015 6:14 am, edited 1 time in total.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Alter Hyphenation-Rules

Post by ChoccieMuffin »

As this is a peer-to-peer forum your anguish might not be noticed by the official Flare bods.

I can't help with your problem, but you might want to enter a feature request or even a bug, so it gets dealt with by MadCap. See my signature for links.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

Re: Alter Hyphenation-Rules

Post by gbusch »

Well, thanks for your reply.

I was already thinking of filing a bug or a feature request but i wonder if i'm the only one that cares about proper hyphenation.

If so, a report wouldn't have any success, wouldn't it?
(As you know, the more people are interested in this, the higher the likelihood that this wil be fixed somehow by the devs.)

If not, i'd like to see what other users think about it and if there is a better workaround than a huge custom .mchyph file.

Currently i have created a custom .mchyph file with all words used in all our outputs. Each word with lower case, upper case and first char upper case. This results in more than 200 000 custom hyphenation rules that might handle 90% of all use cases properly. I did'nt notice any issues with that until now. I was concerned about performance/stability issues but there is nothing remarkable so far. Loading takes a bit more time but once it is loaded it is fine. I can live with that - for now.

But this can't be the solution. The more changes are made to the docs the more often i need to update the custom .mchyph file and the bigger the file will grow. Even if there are no problems by now i'm pretty sure this will have some major impact to the stability of the software someday. And on the other hand, what is build-in hyphenation good for, if you will have to create your own rules anyway? Not everyone is able to do so.
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

Re: Alter Hyphenation-Rules

Post by gbusch »

I filed a Bug-Report with topic "Wrong build-in Hyphenation / custom hyphenation is case sensitive" at https://www.madcapsoftware.com/feedback/bugs.aspx
kirinawust
Propeller Head
Posts: 19
Joined: Tue Nov 05, 2013 5:08 am

Re: Alter Hyphenation-Rules

Post by kirinawust »

I am interested in proper hyphenation order, since I am German, too.

Up to now, I am reversing the hyphenation rules order of any word which happens to annoy me with ugly hy-
phenation.
Tobias
Propeller Head
Posts: 27
Joined: Mon Sep 19, 2022 8:07 am
Location: Southern Bavaria, five lake district

Re: Alter Hyphenation-Rules

Post by Tobias »

I`m reviving this old thread hoping that anyone found a solution to this problem. This is really annoying and makes a lot of unnecessary extra work
scap
Propeller Head
Posts: 55
Joined: Tue Jun 28, 2022 7:36 am

Re: Alter Hyphenation-Rules

Post by scap »

Could avoid this issue by turning off hyphenation.
Tobias
Propeller Head
Posts: 27
Joined: Mon Sep 19, 2022 8:07 am
Location: Southern Bavaria, five lake district

Re: Alter Hyphenation-Rules

Post by Tobias »

Alyready tried this.. it maybe works in English, but with long German words this leads to really ugly line breaks :?
scap
Propeller Head
Posts: 55
Joined: Tue Jun 28, 2022 7:36 am

Re: Alter Hyphenation-Rules

Post by scap »

Hmmm.

I've never used it but the wbr CSS element might be useful?

https://developer.mozilla.org/en-US/doc ... lement/wbr
Tobias
Propeller Head
Posts: 27
Joined: Mon Sep 19, 2022 8:07 am
Location: Southern Bavaria, five lake district

Re: Alter Hyphenation-Rules

Post by Tobias »

this wbr element would require to define the breaks for every word again.
There already are German hyphenation rules in flare, but flare handles them the wrong way, and hyphenates words at the first possible point, not at the last possible point.
oelgoetz
Propeller Head
Posts: 41
Joined: Wed Jun 23, 2010 8:04 am

Re: Alter Hyphenation-Rules

Post by oelgoetz »

I agree. The way Flare applies German hyphenation rules is correct but if there are multiple alternatives then Flare selects one that a creature with feelings would never select. The German language uses a lot of noun-compounds. In most cases, we would rather break these down into individual words than separate them by syllable.
Post Reply