Leo : Basics What is Leo |
Leo is a unique, powerful computer program that you can use to organize, analyze and describe text and text files. Leo is a free program written by Edward K. Ream. For information about downloading Leo, see installation tutorial in this series. Leo runs on Windows, Mac, or Linux.
Use Leo:
Because Leo is unlike other tools you may have used, a series of examples may be the best way to demonstrate what can be done with Leo.
From one perspective, Leo is an outlining editor . This is a screenshot of Leo. You create an outline in the top left pane. (A later tutorial explains how to create an outline like the one in the screenshot).
Clicking on the indicated box will open the indicated node .
Here the node has been opened. Clicking on the box again will close the node.
Here the indicated node has been closed.
Clicking on a node headline (1) will show the text for that node in the body pane (2) below. The body pane is a text editor - you can enter, delete or change text here by typing it in.
You can save the outline in a leo file. Click File - Save.
Here we will save our outline in a file name "pim.leo".
The file is now saved, and the file name appears in the title bar.
You've just seen an introduction to Leo as an outlining editor. You can use Leo to make an outline, with optional text for each outline element. You can save the outline to a file. Outlines are explained more in a later tutorial in this series. The outlining capability of Leo goes far beyond what has just been demonstrated, including multipath outlines, and multiple outlines in one file .
What we've shown so far is no different from other outlining editors. What makes Leo unique is the addition of a new feature. Using simple directives, you can instruct Leo to extract text from any number of nodes, in any order, and write the text to a new file. You can also embed outline information in the second file, giving Leo the ability to read the text pieces back into the Leo outline, even if they have been changed.
In effect, Leo is a meta-text editor . It gives you the ability to create a structural document for a non structured document, or a document that is structured in some other way.
What does this mean in practice? Some examples should help clarify things...
Here is the "pim.leo" file again. We've:
Now we tell Leo to tangle the node. This means Leo should
Why is this operation called tangling? We'll see that a few pages from now.
Leo has derived the file (written the file to the hard disk).
Here the file is listed in Windows Explorer.
And here is the file displayed in a text editor.
That example wasn't very useful. All that we extracted was the text "This is my diary." We'll probably want to extract more than that.
In fact, when tangling, we can extract not only the node text as we just saw, but also all or part of the text of any subnode. And we can put these extracted pieces into the derived file in any order. That is why the process of extraction is called tangling.
Let's try this. Select the "Jul" node.
Now we go back to the 2000 node. We enter the section name << Jul >> into the node text where we want the << Jul >> section text to be output. When tangling, Leo will replace this section name with the section text. This operation is recursive, so if a section text contains a section name, this also will be replaced with the named section's text.
Note: when we put a << section name >> into node text, the section name must correspond to a section located under the current node. Leo only looks in subnodes for section names.
Choose Tangle.
The file has been updated.
Here is the extracted file viewed in a text editor.
This tutorial has given you a brief introduction of Leo's:
These two things are the main features of Leo. However, there is much more to say about both of them:
In addition to Outlining and file deriving features like Tangle, Leo also has the following features: