This plugin implements hyphenation for various languages. While there are client side javascript implementations - such as HyphenatorContrib -
this one here hyhpenates texts on the server side. So why implement yet another hyphenation solution? Here's why.
Hyphenator.js has recently been abandoned and succeeded by yet another javascript package hyphenopoly.
Those javascript packages keep changing all too often which is a pity sometimes. The api difference between hyphenator.js and hyphenopoly are so broad that it
would require a rewrite of HyphenatorContrib anyway, besides a name change of the package. So implementing another extension was inevitable anyway. HyphenatorContrib still is
working just fine. Still, all client side solutions suffer from an initial flicker of the text being reformatted after hyphens have been inserted.
A text being hyphenated on the backend can be cached if required and does not suffer from flickering html pages being reformatted. That might be the reason why google never really
followed up on CSS Text Module Level 3 with regards to hyphenation. It simply does not provide a smooth user experience & rendering performance.
HyphenationPlugin is based on TeX::Hyphen which uses TeX hyphenation patterns available for various languages.
Usage
Text might be hyphenated using the %HYPHENATE makro.
Parameter
Description
Default
"...", text="..."
text to be hyphenated
lang="..."
language of the text to be hyphenated
CONTENT_LANGUAGE, current user's language or system default
hyphen="..."
character string to be used as as separator of sylables; try hyphe="-" to make hyphenation more visible
­
minlength="..."
minimum length of a string to be hyphenated
5
Alternatively, you might define a hyphenation area by surrounding text with an HTML element of class hyphenate:
The optional lang and data-hyphen attributes work as described above. Note that <div class="hyphenate"> ...</div> does not apply any additional css properties by default, such as justifying the text.
This is up to the Foswiki skin, or any other css class assigned to the div element.
Within a hyphenation area <pre> ...</pre> elements are not hyphenated. You might explicitly protect a part of the hyphenate area from being processed by adding a donthyphenate class to an element:
Going forward, our best-of-breed brand will deliver value to low hanging fruit. So we can hit the ground running, we will be dynamically calibrating every best practice in our space? You need to intelligently monetize your enterprises to increase your big data velocity. So we can hit the ground running, we will be dynamically calibrating every best practice in our space. You need to
Our business traveller
intelligently monetize your enterprises to increase your big data velocity. Reliably aligning strategically long-term propositions is crucial to our next-generation dot-bomb. Key players will take ownership of their paradigm shifts by iteratively revolutionizing actionable standpoints. So we can hit the ground running, we will be dynamically calibrating every best practice in our space?
Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab -> "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button.
Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the
search results.
You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install