DokuWiki Hyphenation plugin

DokuWiki entry: plugin:hyphenation

Installation

Download and install the plugin using the Plugin Manager using the following URL. Refer to :Plugins on how to install plugins manually.

  • Latest version: http://wiki.birth-online.de/_media/software/php/hyphenation.tar.gz

Manual download:

How it works

The plugin registers hooks for the TPL_CONTENT_DISPLAYRENDERER_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.

Problems

Please report problems on the plugin page of the DokuWiki homepage.

  • extremely slow since the result is not cached
  • sometimes it causes the sidebar to appear BELOW the main text instead of besides it (did not happen again since the new event-hook is used)
  • just noticed that the phpHyphenation doesn't ignore blocks like <code>, <pre>, etc. … seems I have to fix it

TODO

  • option to switch it off for some pages

History

2009-02-27, 23:52 CET

  • another bugfix with ignoring special tags, seems to work … finally

2009-02-24, 17:42 CET

  • re-wrote the whole hyphenation library to a PHP-class
  • fixed bug with it ignoring only the first encountered block which is on the ignore list

2009-02-22, 23:19 CET

  • changed hook to RENDERER_CONTENT_POSTPROCESS so that the results ARE cached
  • added configuration

2009-02-22, 14:46 CET

  • initial version

 
software/php/dw-hyphenation-plugin.txt · Last modified: 2009-02-27 23:58.42 by mbirth
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki Contents powered by Club-Mate Contents powered by BassDrive.com Labelled with ICRA