[jsword-devel] Interlinear text

DM Smith dmsmith555 at yahoo.com
Mon Apr 21 12:53:20 MST 2008


Greg Hellings wrote:
> On Mon, Apr 21, 2008 at 1:17 PM, DM Smith <dmsmith555 at yahoo.com> wrote:
>   
>> A long time ago, I worked on creating interlinear text (inspired by
>>  Karl's work on GnomeSword) but could not quite get it working. I've
>>  revisited it because of the interest in a SWORD web interface for the
>>  iPhone.
>>
>>  So now it works  on FireFox, IE and Safari.
>>     
>
> Fascinating - how exactly are you determining the proper words and
> Greek lookups?  I presume you're looking at the Strongs' of the word
> in the KJV, and then there's an index from that into the Strongs'
> module and the Robinson's module?  I don't use Strongs myself, so I'm
> not familiar with what modules there are around to look into it.
>   
I created it by hand. There may be mistakes. The goal was not to be 
correct, but to show how interlinear can be rendered with html and css 
that was independent of the number of interlinear rows. It would be 
possible to have another row with the Webster's dictionary definition 
for each word (and that would be unreadable) or links to commentaries 
that discuss the word, or ....

The KJV NT is keyed to Strong's, Robinson's morphology and while not 
obvious, also to the TR which was used in the creating of the Strong's 
numbering.
Here is the verse in OSIS with one "word" per line:
<w lemma="strong:G1161" morph="robinson:CONJ" src="2">Then</w>
<w lemma="strong:G2501" morph="robinson:N-PRI" src="1">Joseph</w>
<w lemma="strong:G846" morph="robinson:P-GSF" src="5">her</w>
<w lemma="strong:G3588 strong:G435" morph="robinson:T-NSM 
robinson:N-NSM" src="3 4">husband</w>,
<w lemma="strong:G5607" morph="robinson:V-PXP-NSM" src="7">being</w>
<w lemma="strong:G1342" morph="robinson:A-NSM" src="6">a just</w>
<transChange type="added">man</transChange>,
<w lemma="strong:G2532" morph="robinson:CONJ" src="8">and</w>
<w lemma="strong:G3361" morph="robinson:PRT-N" src="9">not</w>
<w lemma="strong:G2309" morph="robinson:V-PAP-NSM" src="10">willing</w>
<w lemma="strong:G3856" morph="robinson:V-AAN" src="12">to make</w>
<w lemma="strong:G846" morph="robinson:P-ASF" src="11">her</w>
<w lemma="strong:G3856" morph="robinson:V-AAN" src="12" subType="x-17" 
type="x-split">a publick example</w>,
<w lemma="strong:G1014" morph="robinson:V-AOI-3S" src="13">was minded</w>
<w lemma="strong:G630" morph="robinson:V-AAN" src="15">to put</w>
<w lemma="strong:G846" morph="robinson:P-ASF" src="16">her</w>
<w lemma="strong:G630" morph="robinson:V-AAN" src="15" subType="x-18" 
type="x-split">away</w>
<w lemma="strong:G2977" morph="robinson:ADV" src="14">privily</w>.

Some things to note:
<w lemma="strong:G3588 strong:G435" morph="robinson:T-NSM 
robinson:N-NSM" src="3 4">husband</w>,
husband is translated from two Greek words with the Strong's numbers 
3588 and 435 and Robinson's morphological codes T-NSM and N-NSM, 
respectively.
These two Greek words are the 3rd and 4th word in the TR.

The following construct is also interesting:
<w lemma="strong:G630" morph="robinson:V-AAN" src="15">to put</w>
<w lemma="strong:G846" morph="robinson:P-ASF" src="16">her</w>
<w lemma="strong:G630" morph="robinson:V-AAN" src="15" subType="x-18" 
type="x-split">away</w>

Note that two have src="15". The second has a subType, with a unique 
value. Also note, that src="16" is between. Some decision on how to 
render this needs to be made. One way is to not repeat the information 
for the second use.

One of the things in the example is that punctuation was merged into the 
"word" to which it is attached.

> Personally my eye, when it's trying to stack that many things
> together, sort of desires a visual barrier between the rows in
> addition to the 0.5em whitespace.  Here's the changes I've made that
> work in FF
>   
Yeah, I have the same problem. One way of handling it is to style the 
first children (i.e. the text) differently. Your way also works well.

> to span.ref I added a line
> border: none none none;
>
> to span.verse span I changed
> padding: 0em 0.5em 0.5em 0em;
> to the following lines:
>         padding        : 0em 0.5em 0.25em 0em;
>         margin         : 0em 0em   0.25em 0em;
>         border         : none none none;
>         border-bottom  : 1px solid gray;
>         height         : 4em;
>
> to span.verse span span I also put in:
>         padding        : 0;
>         border         : 0;
>         height         : 1em;
>         margin         : 0;
>
> This gives (at least in FF) a nice line across between two quad-lines
> of text.  However, it still puts a border 3/4 of the way down (instead
> of connected with the rest of the border) under the second instance of
> the verse number - this is because the first one is outside of the
> span.verse and the second one is inside of span.verse, thus it
> inherits the border characteristic of span.verse span (which is
> exactly where I put the borders).  This is solved either by lifting
> the span.ref in the second instance to be outside of the span.verse
> (which would make the most consistent sense, I think) or by dropping
> in the following:
>       span.verse span.ref {
>         border         : 0;
>       }
> which overrides the border that span.verse span gives it.  But now
> there's still a gap underneath the superscript verse.  If instead you
> do
>      span.verse span.ref {
>         height          : 5.5em;
>      }
> this keeps the line on the bottom of the reference and places it in
> the correct place, with no need to move around the location of the
> span.ref.  However, having it consistently inside or consistently
> outside would seem preferable.
I was just demonstrating that, mechanically, it could go in either 
location. IMHO, it should be consistently be in one location. Before is 
my preference as it actually isn't part of the verse.

Your stylization is good.

>>  You can take a look at it here:
>>  www.crosswire.org/~dmsmith/interlinear
>>
>>  In Him,
>>     DM Smith
>>     




More information about the jsword-devel mailing list