Quote:
Originally Posted by Buhaj47
What entry should I add to a dictionary to hyphenate maximum 2 consecutive lines? Here's the beginning of my file:
Code:
UTF-8
LEFTHYPHENMIN 3
RIGHTHYPHENMIN 3
COMPOUNDLEFTHYPHENMIN 3
COMPOUNDRIGHTHYPHENMIN 3
.a1
.a2b1s
Majority (but not all) entries in the dictionary start with a dot, what is it for?
|
You can’t (correctly). The whole dictionary would have to be recompiled in order to make a functional whole. The patterns (a leading dot means "at word begin") are calculated from a large word list, and several exception, prefix, suffix and rules lists), and later recalculated to follow a scheme the hyphenation file format creator invented (apparently for better performance).
Plus, some reader engines (older RMSDK, like in the Tolino) don’t recognize word boundaries correctly, resulting in bad hyphenation, because these engines "think" a punctuation character (like .,;»«›‹„“”‚‘’–—) directly adjacent to a word belongs to that word, which results in horribly bad "hyphenation" like "P-ferd" or "wil-l." (German words for "horse" and "want").
EDIT: Forget all that—I misread "consecutive
lines" and somehow assumed "2-character" hyphenation.
Lines you’ll specify in the book’s CSS (if EPUB), if your reader honours it, like so (for a paragraph):
Code:
p {
/* hyphenation on */
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
/* hyphenation for max. so many consecutive lines */
-webkit-hyphenate-lines: 2;
hyphenate-lines: 2;
}