Making interlinear composite text using DelightEd 2.0b1

As I promised yesterday, here’s a new version of my free Rich Text editor DelightEd which can automatically turn 2-4 source files into a single interlinear document, with corresponding lines from each displayed in order, distinguished using colour.

This article explains how to use this new feature. A second article explains how it works, and why I have adopted this approach to the problem.

In this initial release, the rules for getting this to work are quite strict; these will be relaxed in future versions to make this process simpler and more fault-tolerant. This example uses UTF-8 text from Project Gutenberg, but works perfectly well with a very wide range of other sources including Wikisource.

Many freely-available texts have leading and trailing copyright sections, and may also have extensive prefatory matter. To preserve these in the interlinear text, mark them out by putting
%%start
immediately before them, and
%%end
at the end of that section. You can use this at the start of your file, and at the end; for the moment putting sections like this in the body of the text doesn’t work reliably, so should be avoided. What goes between the %%start and %%end can be as long as you like, and could include lengthy introductory essays and more.

After the %%end at the start of the body of the text, I recommend that you insert a single blank line. Then follows the body text, which is best considered laid out as poetry: each line (with a ‘hard return’ at the end) will be treated separately; blank lines will be preserved exactly as they are. So in poetry, you’d use:
%%end

INFERNO

Inferno: Canto I

Nel mezzo del cammin di nostra vita
mi ritrovai per una selva oscura
che’ la diritta via era smarrita.

Ahi quanto a dir qual era e` cosa dura
esta selva selvaggia e aspra e forte
che nel pensier rinova la paura!
and so on, with a single blank line separating each verse. For prose, you’ll probably want to make each sentence a new line, and put a blank line between paragraphs.

Ensure that the use of text and blank lines matches between the source files. A future version will skip duplicate blank lines, but for the moment you need to match these carefully across your source files. The ideal text file format for use here is Unicode UTF-8 using Unix-style line endings, but opening the text file in DelightEd should automatically set most text in the correct format. You can also import Rich Text, HTML or PDF, of course, although those may pose greater problems in layout and formatting.

Once you’re happy that you have two to four matching source files ready to merge, ensure that tabs are displayed using the View menu. Then drag the tab of each document into one of the windows and repeat to turn that window into the template for the merger. The tab at the left should be your primary version: it will appear first in black/white in the blocks of interlinear text, and its %%start and %%end sections will be included.

delighted201

The next tab will be used as the second version, appearing second in red in the interleaved text, and so on through blue for the third and green for the fourth and last, whose tab is at the right.

Once you’re ready to generate the interlinear document, select the tab at the left and use the Merge Tabs command in the View menu to create the new composite document. You can then check that through. If errors are apparent, most commonly resulting from non-matching lines, close and abandon that composite document, correct the original file, and repeat the merger.

delighted202

The merged file can’t, at the moment, be split back out into separate source files, but you can save it in any of the formats supported by DelightEd, which include Rich Text, plain text, HTML and PDF.

Version 2.0b1 of DelightEd is available from here: DelightEd20b1
from the Downloads page above, and from its own Product Page.

Please let me know how useful you find this, and what changes I should make to improve it. This is just a start, I hope.