DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:hyphenation

hyphenation Plugin

Compatible with DokuWiki

2009-02-14+

plugin Provides automatic soft-hyphen insertion using the phpHyphenation library

Last updated on
2009-02-27
Provides
Action

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to shy

Tagged with html, hyphen

Requirement

Please, note that this Plugin requires PHP 5!

How it works

The plugin registers hooks for the RENDERER_CONTENT_POSTPROCESS event and runs hyphenation over the text. DokuWiki caches the result so this process should run only once per change of a wiki page. So you might have to clear your cache to see the new soft-hyphens!

For hyphenation it uses the phpHyphenation library which makes use of the TeX-algorithms which are considered the best available. The language for hyphenation can be set in the Configuration Manager. The libary is able to also hyphenate Dutch, French, German, Spanish and Swedish.

Alternatives

Since this plugin breaks other plugins and renders other contents empty, I use CSS3 hyphenation instead as described in https://css-tricks.com/almanac/properties/h/hyphenate/. I edited my theme's design.css to

* {
  hyphens: auto;
};

and removed the hyphenation plugin.

Problems

  • The hyphenation plugin seems to conflict with the blog plugin, as it interferes with html entities like   or &middot and transforms them to &nb­sp; and &mid­dot
  • messes up lower/upper case with words in custom hypenation: e.g. “Kon/fir/manden/frei/zeit” in custom hyph the plugin renders all occurences of Konfirmandenfreizeit as konfirmandenfreizeit
  • messes up with dokuwiki's email addresses hex encoding scheme (mailguard): if hyphenation plugin is enabled it seems that pages with large amounts of html hex sequences are not shown at all. Loading seems to stall and after some time an empty page is shown with no error message at all. You can start with 2-3 email addresses (and it works) add more adresses… and after some lines the page won't show anymore.

Problem

Hello, I have a fatal error, maybe due to the restrictie php settings of my provider cwcity. Fatal error: Call to undefined function mb_split() in /home/www/cwcity/hosting/r/o/roomsixhu/htdocs/lib/plugins/hyphenation/phpHyphenation/phpHyphenation.class.php on line 142

I removed it

http://roomsixhu.beerdrinkers.eu/doku.php?id=start

http://roomsixhu.beerdrinkers.eu/info.php

plugin/hyphenation.txt · Last modified: 2023-12-21 18:33 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki