Tuesday, June 1, 2010

Preparing for 1.0 -- do we have to be always left-aligned?

Hmm, let's see, we want to release 1.0, but I feel that something is still need to be polished before 1.0 release. I will show you a portion of Bible text from the latest 0.9 version below. It is taken from Psalms 90. Do you see anything missing?

Psalm 90 in version 0.9
Psalms are supposed to be poetry, nicely written to express similarity, difference, emphasis, and so on. But the display above looks like plain newspaper text with uncertain spacing. It is so... wrong.

Compare that with the same chapter from version 1.0:

Psalm 90 in version 1.0
The bad news is that the indentation data is not readily available. I think we will need to copy it from the Bible book published by Lembaga Alkitab Indonesia (Indonesian Bible Society).

Fortunately with help from Roy Krisnadi, the indentation for the whole Psalms book is complete. He sent me a feedback that he would like to help. I said he could help with the indentation data. He agreed and he sent me the data over several days. Thanks!

In order to store the indentation data, a special markup is needed. I designed it (of course not without flaws) as follows:

  • Verses that contain indentation data starts with @@
  • @0 marks the beginning of non-indented text ("Doa Musa, abdi Allah" above)
  • @1 marks the beginning of single-indented text ("Tuhan, Engkaulah tempat..." above)
  • @2 marks the beginning of double-indented text ("turun-temurun." above)
  • @8 marks the forced new line (at the end of verse 2 above).
Hence, the text shown in the screenshot is stored as:
@@@0Doa Musa, abdi Allah. @8@1Tuhan, Engkaulah tempat perteduhan kami @2turun-temurun.
@@@1Sebelum gunung-gunung dilahirkan, @2dan bumi dan dunia diperanakkan, bahkan dari selama-lamanya sampai selama-lamanya Engkaulah Allah.@8
@@@1Engkau mengembalikan manusia kepada debu, @2dan berkata: "Kembalilah, hai anak-anak manusia!"
For anyone who wants this data for purposes of developing Bible applications for web, desktop or mobile, you can request it. We have agreed to share this data to others.

For version 1.0, only Psalms has this data. We haven't managed to input indentation data onto other books that have indentations. If anyone wants to help, please contact me via the comments section below.

No comments:

Post a Comment