Pages

Wednesday, 8 September 2021

The SimHebrew Bible nearing publication

I have been spending time over the last 6 weeks designing the e-book for the SimHebrew Bible. It is a single book. The past month I have been learning how to control cascading style sheets in order to make this piece of software (an e-book is software and needs controlling like any other piece of software) maintainable and to prove that I have the structure right.

The Bible is a complex structure. One of the problems is how to present the 39 books in the traditional 24. The divisions are tricky from the point of view of designing the navigation in a large book.

Figure 1: the Opening of Ruth in the SimHebrew Bible
Here is the beginning of the book of Ruth taken from my tests on an iPhone. 

You can see the structure of a single book - 
  • surrounded entirely by a border - maybe I will cut off the side borders to allow for wider screen real-estate for this two-column work.
  • then the title - a real heading for navigation from the main table of contents.
  • then the internal contents showing all the chapters.
  • then the top of the first chapter (on a new page if you are not using the iBook's continuous scrolling.)
  • then the chapter window. I could make this negative on the left side and positive on the right side, but I decided to keep the sides equivalent, to go back, use a back button or go to the toc and choose from there.
  • then the text itself in alternating lines.
Here are the classes used to keep all the detailed attributes out of the main body of the book and in a single small list of parameters for the html. Ruth is book# 31 (of 39). Although classed with the five scrolls, it counts as a whole book in the 24. The 24 are the 5 books of Moses, the 8 books of the prophets, the three books of poetry, the five scrolls of which Ruth is the second, making it book# 18 of 24, and the remaining: 22. Daniel 23. Ezra-Nehemiah, and 24. Chronicles.

Here is the full coding for this section that you see in Figure 1.

<div class="book-section">
<div class="prose-book" id="31"> (Ruth is one of the 21 prose books.)
<h2 class="book-head">rut (Ruth)</h2>
<div class="toc-for-24">
<div class="toc-for-24-5"> (Ruth is one of the 5 scrolls - a place for special treatment for them.)
<div class="chapter-links">
<a href="#31001">a (1)</a> | <a href="#31002">b (2)</a> | <a href="#31003">g (3)</a> | 
<a href="#31004">d (4)</a></div>
</div>
</div> (ends the toc divs for a book.)
<div class="book_hdr">
<h4 class="chapter-head">rut (Ruth)</h4></div> (Chapter head is repeated at the top of the book.)
<div class="grid-h4" id="31001"> (A small window into the next 4 chapters.)
<div class="item5">a | <a href="#31002">b</a> | <a href="#31003">g</a> | <a href="#31004">d</a></div>
<div class="item6">1 | <a href="#31002">2</a> | <a href="#31003">3</a> | <a href="#31004">4</a></div></div> (Note, if it weren't the first chapter, you would see the chapter name repeated in the window. This allows you to remember where you were when coming back to the book after a pause in your reading.)
<div class="grid1"> (A two-column format for the text itself.)
<div class="item1">
<span class="heb-verse">a </span> (Allows special treatment of verse number formatting.)
vihi bimi wpo't hwop'tim vihi ryb barx.<br/>vilç aiw mbit lkm ihudh lgur bwdh moab hua vawto uwni bniv.</div>
<div class="item2">
<span class="eng-verse">1 </span>
It was in the days of the judgment of the judges, and there was a famine in the land.<br/>And a man went from Bethlehem of Judah to reside in Sdeh-Moab, he, his wife, and his two sons.</div>
<div class="item3">
<span class="heb-verse">b </span>
vwm haiw alimlç vwm awto noymi vwm wni-bniv mklon vclion aprtim mbit lkm ihudh.<br/>viboau wdh-moab vihiu-wm.</div>
<div class="item4">
<span class="eng-verse">2 </span>
And the name of the man was Elimelek, and the name of his wife Naomi, and the name of his two sons, Mahlon and Chilion, Ephrathites from Bethlehem of Judah.<br/>And they came to Sdeh-Moab, and there they were.</div>
... and so on. (Noticee the br tags representing the musical cadences within a verse.)

Each class has many html attributes that can be modified in one place.

The e-book has to split large files for efficiency of loading the text - to avoid a long pause between chapters. The book-section is simply a point where I can direct the epub software to split the file so that the split is not arbitrary.

Figure 2: TOC for the Psalms in part
Book-section looks like this:
.book-section { page-break-after: always;}
.book-section > div {  font-weight: normal; text-align: left;  margin-top: 2px; } [the page-break is wrong - shouldn't be there since it will cause a break if the class is split.]

I am learning the CSS language as I go. I think the above means that any div tags within book-section will inherit the properties in the second line. But I don't know for sure because when I look inherited properties up on the web I get a whole set of specifications to read - and it's just too much info for the moment. I try it and see if it works - then I hope it won't get in the way later.

One thing is sure - there are no attributes defined in the text itself which is produced automatically from my database and so remains completely uncluttered with bulky repeated definitions of html attributes and completely true to the data I have developed these past 15 years - for the English, and 2 years - for my conversion of my internal coding to SimHebrew. So i can grow the book as I learn more..

Ruth is a prose book, one of the 21. So it gets the class prose-book and the toc-for-24-5 class which allows some special formatting like border colors, or background colors, to distinguish this set of books from the others. 

For contrast Figure 2 shows the top of the Psalms inner table of contents. As one of the three poetry books, it has a different border-color. Whether the borders or colors will stay is a matter for discussion. The structure is at least fully defined. I have patterned the toc according to the 5 books of psalms. 

These may end up with a split class in their middle for efficiency's sake. Similarly with other large books like Isaiah and Jeremiah.

These can be done by hand. If one does this by hand, it is best to use a unique class name for the new div - an internal book divider. Then you can remove it after the split.

So the book The SimHebrew Bible, The Hebrew Bible in Simulated Hebrew – with English Guide, is nearing completion. We will announce availability soon. In time for gift-giving to your favorite friend who you know wants to learn Hebrew.


No comments:

Post a Comment