xTxT Documentation

Introduction and Overview

xTxT is simply a convenient syntax for marking up plain-text documents. Using a minimal amount of markup, you can style and structure your webpages easily.

For example, to create a standard heading tag using HTML, a user must type;

<h1>My Heading</h1>

xTxT simplifies tagging to;

/h1 
My Heading

In a similar way, text styling is simplified. For example, HTML's bolding markup;

HTML: this is some <strong>bold</strong> text
xTxT: this is some \bold\ text

HTML: this is some <i>italicized</i> text
xTxT: this is some \\italicized\\ text

xTxT provides these types of simplified tag constructs for essentially all common HTML tag types, including lists;

HTML:

<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>

xTxT:

/ul
Item 1
Item 2

And hyperlinks;

HTML:

<a href="http://www.google.com">Google</a>

xTxT:

[Google[http://www.google.com]]

What can xTxT Do?

xTxT markup allows you to describe your plain-text document as follows;

  • Style - bold, italic, underline, strikethrough, highlighting, urgent text and more...
  • Structure - headings, lists, paragraphs, regions, ...
  • Context - dictionary definitions, quotations, citations, ...
  • Navigation - outbound links to other resources, "anchors," or inbound links directly to a point in the page, ...
  • Metadata - content which is not seen by human viewers, but is useful to search engines and programs browsing the document, ...
  • Embedding - embed external data into your page, including XML, RSS, XHTML from other websites, data from a relational database, ...

xTxT is designed to be very simple to use, yet it is at the same time a very powerful and extensible markup syntax.

Goals

The primary goals of xTxT include;

  1. Easy editing of xTxT documents using a plain text editor such as Notepad.
  2. Readable source text. HTML tends to be very heavy on its use of tags, making the content of the document difficult to find and strenuous to read.
  3. Easy to remember syntax. "list" is generally easier to remember than ul; however HTML-standard tags names such as "ul" (unordered list) are also supported for convenience.
  4. Broad range of capabilities, including formatting, structure, data import, and logic flow.
  5. Ability to embed raw HTML when needed. This allows for embedding anything specialized, such as pasting in a Google Map, or building a special data-entry form.
  6. Ability to create custom xTxT tags that perform special tasks -- or to extend xTxT capabilities within a host application. An example of this is xTxT's best-known use -- the Miru Publishing System.
  7. Ability to render xTxT to any output type: HTML 4.0, HTML 3.2, XHTML, WAP, RTF, XSL-FO, PDF, Plain Text, and so on. One of xTxT's goals is to allow you to write a document once, and deliver it through multiple publishing channels. Some applications, such as email newsletters, depend on the ability to publish both HTML and plain-text versions of the same content, simultaneously.

How Does xTxT Markup Work?

xTxT markup is designed from the ground up to be as minimalistic and unobtrusive as possible.

A document which contains absolutely no xTxT markup commands at all is a perfectly valid xTxT document -- each paragraph in the document would render as a perfectly valid HTML paragraph (<p>...</p>).

Typing in HTML by hand requires a relatively high degree of tag maintenance. All HTML tags require opening and closing braces (<, >) and tag terminators (\).