[sword-devel] The poor man's interlinear

Mike Hart just_mike_y at yahoo.com
Sat Sep 8 12:08:32 MST 2012


To understand your input request, someone wanted

A.  to display each row of text from 2 separate files, alternating. 


B. To display an actual interlinear, matching 'related words'

For A, I would have:
1. loaded each file into excel, created a new Collumn 1 (named order) and autonumbered each row of C1 
2. Merged the 2 resulting tables into a single worksheet in excel
3. Sorted them on collumn 1 in ascending order

4. selected collumn 2 and output that to a file. 

B. Is a little more tricky and would require (and i'm only working through the logical steps... you'll have to fill in the greps and specifics.
1. creating an order for each word (if paragraphs matter, then give the EOL a word like {{EOL}}
2. doing a dictionary lookup (Excel function LOOKUP). (Assuming you can turn both files into something similar to strongs numbers)
3. Save each file which is now by collumn 1-word order, 2-word, 3-dictionary number as a flat file (remove the LOOKUP function)
4. reopen each file

3. Sort File 2 on the definition numbers
4. Create a 4th collumn in File 1 and LOOKUP the definition number in file 2 returning the word  from file 2
5. Create a Html Table based on  these results

 From: David Haslam <dfhmch at googlemail.com>
To: sword-devel at crosswire.org 
Sent: Friday, September 7, 2012 2:34 AM
Subject: [sword-devel] The poor man's interlinear
/One my friends recently asked:/

Do you know of any program that will load two text files (plain text or Word
files) and display them interlinearly?

/Here's my reply:/

Not off hand, but here's an easy workaround using Excel.

First create a double-space copy of each text file. i.e. Replace all EOLs by
two EOLs.
e.g. Using Notepad++ replace \r\n by \r\n\r\n for a Windows styled text

For the second file, insert an extra blank line at the top of the second
file, so this file has its text on even numbered lines.

Paste the contents for each double-spaced text file into a separate Excel

In another worksheet, use a formula in cell A1 to select accordingly. The
formula is


where I've not renamed the worksheets.

Copy cell A1 to as many rows as you need.


The whole operation could be achieved by a more complex formula without the
prior need to convert the files to double-space.
I considered this at first, but came to the conclusion that simplicity is

The method I described could be extended to cope with three (or more) files,
using the MOD function instead of the ISODD function. 
i.e. By first making a triple-spaced copy of each file.


PS. I'd resist doing it for Word files, unless they are first converted to
Unicode text files.

View this message in context: http://sword-dev.350566.n4.nabble.com/The-poor-man-s-interlinear-tp4650950.html
Sent from the SWORD Dev mailing list archive at Nabble.com.

sword-devel mailing list: sword-devel at crosswire.org
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20120908/fbb659c7/attachment.html>

More information about the sword-devel mailing list