%HTMLlat1; %HTMLsymbol; %HTMLspecial; ]> Hyphenation
Roland van Ipen­burg
To be stolen or blogged


Mon­day 6 July 2009 12:28

About fix­ing the menu to make long words wrap, last week­end I start­ed with a Perl mod­ule that will take care of that. There was al­ready TeX::Hyphen, and I com­bined that with HTML::TreeBuilder to end up with some­thing that will take a bunch of HTML and in­sert soft hy­phens at the right places. It can be used to just en­able the brows­er to break long words in nar­row lay­out, but it can also be used to just in­sert all the pos­si­ble soft hy­phens so you would get a much less ragged text lay­out.

There are JavaScript so­lu­tions for this (as fea­tured on Ham­burg Uni), but down­load­ing a 68kB pat­tern file for just a sin­gle lan­guage seems a bit much for such a pur­pose. Not the down­load (al­though I don't see a serv­er side so­lu­tion adding 68kB of ­ to a page like that), but pars­ing it all and do­ing it real time might make the client side ex­pe­ri­ence a bit slug­gish at times.


Book­mark this on De­li­cious

Add to Stum­bleUpon

Add to Mixx!



application away browser buy cool data days different flash game gta html ibook internet linux movie open play playstation possible run screen server side site stuff system train web windows work

Blog Posts (418)

Image Gal­leries

ipen­bug Last.fm pro­file

ipen­bug last.fm pro­file

Fol­low me on Twit­ter

Roland van Ipen­burg on face­book
Lin­ux Regis­tered User #488795
rolipe BOINC com­bined stats


Add to Google

Valid XHTML + RFDa Valid CSS! Hy­phen­at­ed XSL Pow­ered Valid RSS This site was cre­at­ed with Vim Pow­ered by Bri­co­lage! Pow­ered by Post­greSQL! Pow­ered by Apache! Pow­ered by mod­_perl! Pow­ered by Ma­son! Pow­ered by Perl Made on a Mac Pow­ered By Mac OS X XS4ALL This site has been proofed for ac­cu­ra­cy on the VISTAWEB-3000 Creative Com­mons Li­cense
This work by Roland van Ipen­burg is li­censed un­der a Creative Com­mons At­tri­bu­tion-Non­com­mer­cial-Share Alike 3.0 Un­port­ed Li­cense.
Per­mis­sions be­yond the scope of this li­cense may be avail­able at mail­to:ipen­burg@xs4all.nl.