View Single Post
Old 11-29-2021, 01:20 PM   #165
Moonbase59
Addict
Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.
 
Moonbase59's Avatar
 
Posts: 213
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
Quote:
Originally Posted by Buhaj47 View Post
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;
}

Last edited by Moonbase59; 11-29-2021 at 02:11 PM.
Moonbase59 is offline   Reply With Quote