[
  header ["Basic Concepts" ]
  block [
    para [{Biloba {STX} takes a document in plain text format and converts it into the output format of your choice. Currently you can choose from the following formats:} ]
    itemized [
      item [
        strong ["{XHTML}" ]{ Extensible Hypertext Markup Language. The  standard format for documents on the Internet.} ]
      item [
        strong ["^A92;TeX{}" ]{ A very popular file format in the scientific and academic communities. Can be converted to {PDF} (and other) files.} ]
      item [
        strong ["{XML}" ]{ Extensible Markup Language. A standard  format for structured data.} ]
      item [
        strong ["{debug, raw}" ]{ Representation of the document's logical structure.} ]
    ]
    line [{Most users would want their documents converted to {XHTML}.} ]
  ]
  header ["Preparation" ]
  block [
    para ["For the purpose of this guide, we will use the " 
      emph ["Biloba STX Test Harness" ]{ which can be found on the CD. It is a very simple environment that needs no configuration by the user --- it can be started right away from the CD.} ]
    para ["To start it, you have to execute " 
      code ["start.bat" ]{ located on the CD which will start the webserver required to run Biloba STX. If the server was successfully started, you will see a window displaying the text } 
      code ["Copyright (c) 1991-2003 iMatix Corporation" ]{. Do not  close this window while using the test harness.} ]
    para ["Your browser displays the " 
      emph ["Biloba STX Test Harness" ]" page (redirect.html). Go directly to the " 
      emph ["Test Environment" ]{, a page where you can enter STX documents for testing purposes. This is the  environment used for this guide.} ]
    para [{The way documents are formatted does not differ whether you use this simple preconfigured test environment or any other  interface. Biloba STX can be configured to run embedded in your webserver or as a commandline tool. The } 
      emph ["Expert's Guide" ]" tells you how to setup Biloba STX for your needs." ]
  ]
  header ["Your First Document" ]
  block [
    line [{Go to the test environment as described in the previous section.} ]
    para ["Push the " 
      emph ["Render my Document" ]{ button and you will see the document from the text area rendered into HTML. Hit your browser's } 
      emph ["back" ]{ button to return to the text area where you can edit the source of the document. Modify the text and push the } 
      emph ["Render my Document" ]{ button again. The rendered document has changed accordingly.} ]
    para ["Whenever you push the " 
      emph ["Render my Document" ]{ button,  Biloba STX is invoked. It parses the source in the text area and converts it into the format you have selected in the dropdown box left to the button. Have Biloba  render your document into another format to get the idea.} ]
  ]
  header ["Paragraphs and Captions" ]
  block [
    para [{Biloba's Structured Text is organised around the concept of text elements. A text element consists of one or more non-empty lines that have the same indentation on each line. Indentation refers to the number of blanks at the beginning of a line.} ]
    para [{A STX document consists of some sections which may contain sub-sections which again may contain sub-sections and so on. Every section is  introduced by a caption giving the name of the section followed by at least one text element that forms the body of the section.} ]
    para [{Every text element after a caption that is indented two characters relative to the caption belongs to the body of that caption. Together, a caption and its body elements form a section.} ]
    para ["Here is an example:" ]
    figure [
      title ["A Simple Section" ]
      verbatim [{Caption

  This is a part
  of /Caption's/ body.

  So is this.
} ]
    ]
    para [{"Caption" is the caption for the section and the two paragraphs "This is..." and "So is this." form the body of the section.} ]
    para [{Try the example in the test environment to see how Biloba STX renders them.} ]
    line [{Note that captions are not allowed to span multiple lines.} ]
    para ["Sections and sub-sections can be nested:" ]
    figure [
      title ["Nested Sections" ]
      verbatim [{Language

  Ludwig von Wittgenstein once said "The limits
  of language are the limits of one's world."

  Let's have a closer look at language.

  Syntax

    Syntax describes the structure of
    valid sentences in a language.

  Semantics

    Semantics describe the meaning of
    a syntactically correct sentence.

  Pragmatics

    Pragmatics is the meaning of a
    sentence put into the context of
    background knowledge and experience.
} ]
    ]
    para [{Here we have a section with two paragraphs followed by three sub-sections each of which contains further paragraphs.} ]
  ]
  header ["Term Definitions and Quotes" ]
  block [
    para [{In the previous section we had an example of three sections that only consisted of a word and its defintion. The word was put as the caption of the section and the section's body contained its definition.} ]
    para [{As terms and their definition are a very common thing in documents, Biloba STX has a special form to express that something is such a term/definition pair.} ]
    para [{By adding the information that something is a term/definition pair instead of a common caption followed by a paragraph, the information can be presented in a more succinct way and will therefore be easier to convey. If all term/definition pairs are formatted using this special form, it is also possible to set them off from the rest of the text and thus making it easier for the reader to find a certain definition.} ]
    para [{The special form for term/definition pairs looks as follows:} ]
    figure [
      title ["Term/Definition Pairs" ]
      verbatim [{Syntax -- structure of valid sentences in a language.
Semantics -- meaning of a syntactically correct sentence.
Pragmatics -- meaning of a sentence put into the ... 
} ]
    ]
    para [{Biloba STX has special forms for many common text elements in order to give them additional meaning.} ]
    para ["Another special form is used for quotes:" ]
    figure [
      title ["A Quotation" ]
      verbatim [{"The limits of language are
the limits of one's world." --Ludwig von Wittgenstein
} ]
    ]
    para [{Here the left part must be enclosed in quotation marks, otherwise the parser will identify the quote as a very long term that needs to be defined.} ]
    para [{Using the special forms we can now re-structure the example from the previous section as follows:} ]
    figure [
      title ["Nested Sections Restructured Using Special Forms" ]
      verbatim [{Language

  "The limits of language are
  the limits of one's world." --Ludwig von Wittgenstein

  Let's have a closer look at language.

  Syntax -- structure of valid sentences in a language.
  Semantics -- meaning of a syntactically correct sentence.
  Pragmatics -- meaning of a sentence put into the ... 
} ]
    ]
    para [{In terms of structure, the result is quite different from the first example. We only have one section instead of three and instead of simple paragraphs we have logically distinct text elements:} ]
    itemized [
      item ["a quote," ]
      item ["a paragraph, and" ]
      item ["three term/definition pairs" ]
    ]
    para [{You should try to use the special forms whenever possible to implicitly add this information to your document which otherwise would be lost. It helps to make your  documents more accessible to your audience.} ]
  ]
  header ["Lists" ]
  block [
    line ["There a two kinds of lists in Biloba:" ]
    itemized [
      item ["itemized or bullet lists (such as this one), and" ]
      item ["numbered lists" ]
    ]
    para [{An item of a bullet list is introduced by a ''- '' sequence in front of it.} ]
    figure [
      title ["An Itemized List" ]
      verbatim [{  - item
  - item that spans more
    than one line
  - item
} ]
    ]
    para [{As we can see in the example, list items are allowed to span multiple lines as long as the lines are well aligned with another.} ]
    para [{Numbered list items are introduced by a ''1) '' sequence in front of them.} ]
    figure [
      title ["A Numbered List" ]
      verbatim [{  1) item number one
  2) item number two
  3) and finally, item number three
} ]
    ]
    para [{An empty line ends a list. Consequently, these are two lists, though the author might have intended otherwise:} ]
    figure [
      title ["Two Lists" ]
      verbatim [{  1) item number one
  2) item number two

  3) and finally, item number three
} ]
    ]
  ]
  header ["Inline Formatting" ]
  block [
    para ["Inline formatting is sometimes added to " 
      emph ["emphasize" ]{ words that need to be set off from the rest of the sentence. Do not overuse this feature, otherwise the whole effect of emphasis gets lost in chaos.} ]
    para ["This is how it is done in Biloba:" ]
    figure [
      title ["Inline Formatting" ]
      verbatim [{/emphasis/

*stronger emphasis*

''sample text''

~text that needs correction~

_text that replaces corrected text_
} ]
    ]
    para [{Sample text is used to mark something as an exmple or to signal that this text has to be typed in or is the output of a program.} ]
    para [{Text that needs correction and the accompanying text that replaces corrected text are used to denote that something was faulty and should be corrected accordingly.} ]
    figure [
      title ["Hyperlinks" ]
      verbatim [{[http://www.google.com]
[search google>>http://www.google.com]
} ]
    ]
    para [{Text between square brackets is used to create hyperlinks. The text between is interpreted as the target. Optionally you may add text to a link as illustrated in the last row of the example. The given text will be turned into a link to the given location. If no text is given, the location itself is displayed as link text.} ]
    figure [
      title ["A Horizontal Rule" ]
      verbatim ["---^/" ]
    ]
    para [{A line that only consist of dashes will be rendered as  a horizontal separator.} ]
  ]
  header ["Adding Images" ]
  block [
    para ["Adding images to a document is done with" ]
    figure [
      title ["Adding an Image" ]
      verbatim [{
  #Image of Ginkgo Leaves (Tamara Crupi, September 1996)
  #type:image
  ../biloba.jpg
} ]
    ]
    para [{where the first line represents the caption of the image. The line without the hash sign } 
      code ["#" ]" in front gives the path to the image. The " 
      code ["#type:image" ]{ line is required so that Biloba knows it should render this figure as an image.} ]
    para [{Note that these lines must be indented by two spaces relative to the current level. If the line immediately before this indented text element was a single line, it would be converted into a caption and these lines were interpreted as normal text in a paragraph. Therefore it is essential to ensure that text elements immediately before an image consist of at least two lines. If splitting the line to span two lines is not an option you can add a single } 
      code ["." ]{ character as the only character to be found in the second line. The } 
      code ["." ]{ will not produce any output but  ensures that Biloba does not turn the line before into a caption.} ]
    para ["Here is an example:" ]
    figure [
      title ["Preventing a Caption" ]
      verbatim [{Consider these leaves:
.
  #Image of Ginkgo Leaves (Tamara Crupi, September 1996)
  #type:image
  ../biloba.jpg
} ]
    ]
    para [{Without the guiding dot, "Consider these leaves" would become a caption for obvious reasons.} ]
  ]
  header ["Adding Example Text" ]
  block [
    para [{You can make Biloba retain text just as you entered it and have it copied into a figure. No further formatting is applied to this text element.} ]
    para [{This is achieved in the same way as we did with images, except that you must omit the } 
      code ["#type:image" ]" line." ]
    para ["The first line not starting with a hash sign " 
      code ["#" ]{  indicates the beginning of text that should be preserved. It extends until the next line with "normal" indentation. } ]
    para [{This is particularly useful when describing external  data such as program listings or printouts.} ]
    figure [
      title ["A Simple C Program" ]
      verbatim [{
  #include <stdio.h>
  #define S "Hello, Worldn"

  int main(int argc, char **argv)
  {
    exit(printf(S) == strlen(S) ? 0 : 1);
  }    
} ]
    ]
  ]
  header ["Conclusion" ]
  block [
    para [{We have now seen all of Biloba's forms required to create documents. Look at the source of the documents part of the test harness for additional examples. Learning from examples can be very effective.} ]
    para [{If you require a feature that was not covered by this guide, you should have a look at the more detailed } 
      emph ["Expert's Guide" ]{ to Biloba STX which also covers  features you would not require for everyday use.} ]
  ]
]