nehan - Japanese dynamic layout engine written in JavaScript. 
[ 2010/04/29 ]
Nehan is dynamic layout engine for Japanese text format written in JavaScript.
It's support Japanese vertical layout, and horizontal layout, ruby, bold, blockquote, image processing also available.
Tested on IE6-8,Firefox3.5-3.6,Google Chrome, Opera, Safari4
No third party libraries are needed.

Getting Started

1. Upload nehan.js and image files of charactor

Suppose that you upload nehan.js to "/path/to/nehan.js", and all image files of charactor to "/path/to/char-img-root"

2. header definition

<script charset="utf-8" type="text/javascript" src="/path/to/nehan.js"></script>
<script type="text/javascript">
window.onload = function(){
Nehan.LayoutMapper.start("div", {
3. vertical (or horizontal) section in your article

vertical section like this.
<div class="lp-vertical lp-width-400 lp-height-300 lp-font-size-16">
your "vertical" article here..
horizontal section like this.
<div class="lp-horizontal lp-width-400 lp-height-300 lp-font-size-16">
your "horizontal" article here..
Markup help




<a href="">link 1</a>
<a href="" target="_blank">link2(new window)</a>
<a2 href="">link3(new window)</a2>

Both width and height must be described, align property(top,bottom,left,right) is optional.

<img src="/path/to/img" width="200" height="300" />
<img src="/path/to/img" width="200" height="300" align="top" />
force turn page

previous page tail
next page head

<blockquote indent="2">text</blockquote>
multi charactor in on charactor space

this is it<pack>!!</pack>
font scale

<font scale="1.6">BIG</font>
<font scale="0.8">SMALL</font>

※ ネーミングは好みではありませんが、nehanはJavaScriptで書かれたオープンソースです。




さらに縦書きでも横書きでもルビが打てました。これも万人が喜ぶ技術ですね。今日は久々にうれしくて、きっと多くの方が喜ばれると思いレポートしました。Thanx cool G !!

出典 / 関連リンク :

ICET - Center for International Cultural Exchange of Technology
Nagoya, Japan and Berkeley, California