<?xml version="1.0" encoding="ISO-8859-1"?>
<screenbook>
<title realName="B4 What is Leo">What is Leo</title>
<category realName="Leo">Leo</category>
<subcategory realName="Basics">Basics</subcategory>
<format realName="Tutorial">Tutorial</format>
<description>Introduction to Leo - the Programmer's Outlining Editor</description>
<keywords>outliner outline editor organize</keywords><ldate>8/4/2002</ldate><version>draft</version>
<locations>
<location>
C:\testtt\Leo\Basics\Tutorials\B4 What is Leo\</location>

</locations>

<pages>
<page>
<text>

<span id="pagetext"><![CDATA[<p><strong>Leo</strong> is a unique, powerful computer program that you can use to <strong>organize</strong>, <strong>analyze</strong> and <strong>describe</strong> text and text files. Leo is a <strong>free</strong> program written by Edward K. Ream. For information about downloading Leo, see <strong>installation</strong> &#160;tutorial in this series. Leo runs on Windows, Mac, or Linux.</p><p>Use Leo:</p><ul> <li/>to brainstorm a new project <li/>as a Personal Information Manager <li/>to add multiple outlines and commentary to any text file <li/>as a tool to facilitate a new kind of <a href="http://www.literateprogramming.com">literate programming</a>.</ul><p>Because Leo is unlike other tools you may have used, a series of examples&#160;may be&#160;the best way to demonstrate what can be done with Leo.</p>]]></span>

</text>
<picture>[Empty]</picture>
<title>Leo</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>From one perspective, Leo is an <strong>outlining editor</strong> . 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).</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic02.png</picture>
<title>Leo is an outlining editor</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p> Clicking on the indicated box will open the indicated <strong>node</strong> .</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic03.png</picture>
<title>Open a node</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>Here the node has been opened. Clicking on the box again will close the node.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic04.png</picture>
<title>Close a node</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p> Here the indicated node has been closed.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic05.png</picture>
<title>The node is closed</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>Clicking on a node <strong>headline</strong> <strong>(1)</strong> will show the text for that node in the&#160;<strong>body pane&#160;(2)</strong> below. The body pane is a text editor - you can enter, delete or change text here by typing it in.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic06.png</picture>
<title>Headline and text</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>You can save the outline in a leo file. Click <strong>File - Save</strong>.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic07.png</picture>
<title>File - Save</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>Here we will save our outline in a file name "pim.leo".</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic08.png</picture>
<title>Save as pim.leo</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>The file is now saved, and the file name appears in the title bar.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic09.png</picture>
<title>File name in title bar</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p> You've just&#160;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. <em>The outlining capability of Leo goes far beyond what has just been demonstrated, including multipath outlines, and multiple outlines in one file</em> .</p><p> What we've shown so far is no different from other outlining editors. What makes Leo unique is the addition of a new feature. <strong>Using simple directives, you can instruct&#160;Leo to&#160;extract text from any number of nodes, in any order, and write the text to a new file</strong>.&#160;You can also embed outline information in the&#160;second file, giving Leo the ability to read the text pieces back into the Leo outline, even if they have been changed. </p><p> In effect, Leo is a <strong>meta-text editor</strong> . 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.</p><p>What does this mean in practice? Some examples should help clarify things...</p><p>&#160;</p>]]></span>

</text>
<picture>[Empty]</picture>
<title>Leo is a meta-text editor</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p> Here is the "pim.leo" file again. We've:</p><ol> <li/>Selected the "<strong>2000</strong>" node. <li/>Entered a couple of <strong>directives</strong>. The second (@root) tells Leo the file name that we want to derive (extract to). (The @silent directive is explained in a later tutorial). <li/>Entered some node text. </ol>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic11.png</picture>
<title>The @root directive</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>Now we tell Leo to <strong>tangle</strong> the node. This means Leo should&#160;</p><ol> <li/>Start at the current node and look for a <strong>@root</strong> directive. <li/>Create the file named in the <strong>@root</strong> directive or open it if it already exists. <li/>Write all of the node text to the file named in the root directive. </ol><p>Why is this operation called <strong>tangling</strong>? We'll see that a few pages from now.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic12.png</picture>
<title>Tangle the node</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>Leo has&#160;derived the file (written the file to the hard disk).</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic13.png</picture>
<title>The file has been written</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>Here the file is listed in Windows Explorer.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic14.png</picture>
<title>The file is listed in Windows Explorer.</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>And here is the file displayed in a text editor.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic15.png</picture>
<title>The file displayed in a text editor.</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p> 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.</p><p>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 <strong>tangling</strong>.</p><p>Let's try this. Select the "Jul" node.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic16.png</picture>
<title>Extracting a node</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<ol> <li/>We add &lt;&lt; &gt;&gt; angle brackets to the headline. This tells Leo that the node is a <strong>section</strong>. <li/>We add the <strong>@c</strong> directive. This tells Leo where to start extracting text from this node. </ol>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic17.png</picture>
<title>&lt;&lt; &gt;&gt; brackets to define a section</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>Now we go back to the <strong>2000</strong> node. We enter the section name &lt;&lt; Jul &gt;&gt; into the node text where we want the &lt;&lt; Jul &gt;&gt; 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.</p><p>Note: when we put a &lt;&lt; section name &gt;&gt; into node text, the section name must correspond to a section located under the current node. Leo only looks in subnodes for section names.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic18.png</picture>
<title>A section name in node text</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>Choose <strong>Tangle</strong>.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic19.png</picture>
<title>Choose Tangle</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>The file has been updated.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic20.png</picture>
<title>The file has been updated</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>Here is the extracted file viewed in a text editor.</p>]]></span>

</text>
<picture width="640" height="480" ldate="" id="pagepic">pic21.png</picture>
<title>Here is the extracted file</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>This tutorial has given you a brief introduction of Leo's:</p><ul> <li/><strong>Outlining capacity</strong> <li/>Ability to create <strong>derived files</strong>.</ul><p>These two things are the main features of Leo. However, there is much more to say about both of them:</p><ul> <li/><strong>Outlining</strong> - see the <strong>Outlining</strong> tutorial in this series to see how Leo can be used to create outlines with multiple paths or views, making it a powerful tool for project planning or any kind of tree-based analysis. <li/><strong>Derived files</strong> - we've seen the simple case of deriving a text file from a node. This give you the ability to collect a number of text files in one Leo outline. But Leo can do much more that that - Leo can extract not only node text, but also outline structure, and can then read back this embedded structure. For a look at this feature and why it is so useful, particularly for programmers, see the next tutorial in this series: <strong>What is Leo -&#160;Continued</strong>. In addition, in the following tutorials you will see much more complex examples of derived files. </ul>]]></span>

</text>
<picture>[Empty]</picture>
<title>Summary</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
<page>
<text>

<span id="pagetext"><![CDATA[<p>In addition to <strong>Outlining</strong> and file deriving features like <strong>Tangle</strong>, Leo also has the following features:</p><ul> <li/>Can be scripted with Python. <li/>Contains a syntax highlighting programmer's editor. <li/>The .leo format is XML, meaning that a leo file can be easily converted to any other text format such as HTML.</ul><p>&#160;</p>]]></span>

</text>
<picture>[Empty]</picture>
<title>In addition to Outlining and file deriving features like Tangle, Leo also has th...</title>
<author>Joe Orr</author>
<sauthor>[Empty]</sauthor>
<cp>Copyright 2002 All Rights Reserved</cp>
<authoremail>orrj@jserv.com</authoremail>

</page>
</pages>
</screenbook>


