(no commit message)
[ikiwiki.git] / doc / todo / hyphenation.mdwn
1 [[!tag wishlist]]
2
3 I recently found [Hyphenator](http://code.google.com/p/hyphenator/) which is quite cool ... but it should be possible to implement this functionality within ikiwiki and not rely on javascript and the client.
4
5 A Perl implementation of the algorithm exists in [[!cpan TeX::Hyphen]].
6
7 > I'd be inclined to say that Javascript run in the client is a better
8 > place to do hyphenation: this is the sort of non-essential,
9 > progressive-enhancement thing that JS is perfect for. If you did it
10 > at the server side, to cope with browser windows of different sizes
11 > you'd have to serve HTML sprinkled with soft-hyphen entities at
12 > every possible hyphenation point, like
13 >
14 >     pro­gress­ive en­hance­ment
15 >
16 > which is nearly twice the byte-count and might stop
17 > search engines from indexing your site correctly.
18 >
19 > A browser that supports Javascript probably also supports
20 > soft-hyphen marks, but I doubt all non-JS browsers support them
21 > correctly.
22 >
23 > It might be good to have a plugin to insert a reference to the
24 > hyphenation JS into the `<head>`, or a general way to enable
25 > this sort of thing without writing a plugin or changing your
26 > `page.tmpl`, though. Perhaps we should have a `local.js`
27 > alongside `local.css`? :-)
28 >
29 > --[[smcv]]
30
31 >> Thanks, I did not realize that the javascript does something else than add &amp;shy;s - took a closer look at it now.
32 >> I doubt however that adding them will increase the byte count more than transmitting the javascript.