This document illustrates simple examples of all the formatting and mark-up that the txt2html tool recognizes. This example.html file was created from the text file example.txt by typing:
txt2html example.txt > example.html
This is an example of bold text. This is an example of italicized text. This text is both bold and italicized.
This is a link to another location in this document.
This is a link to another document, the README.html in this same directory.
This is a link to another location in the README.html document.
This is a link to the Google WWW site.
If you look in example.txt you will see that the first 2 links were created in-line, while the last 2 used an alias to a definition elsewhere in the example.txt file.
This is a default paragraph with no formatting styles appended.
This paragraph has a :p command appended. It should look the same as the default.This paragraph has a :b command appended. It should have no following newline.
This paragraph has a :pre appended. It will appear with a different font and with spacing exactly as in the example.txt file.
This is a bulleted list, created with a single :ul appended to the last line of the list:
This is a numbered list; an :ol command is appended:
And this is a definition list, using a :dl command:
An item in a list can have multiple lines and paragraphs if the formatting commands are applied to each line of the list:
This is a 2nd paragraph associated with item 2.
This is a 3rd paragraph. It can be as long as needed to describe the item. It will keep going until a :p formatting command is placed at the end of a line.
Commands applied to each line in the paragraph:
This is a simple bulleted list with no indentation, by appending :all(l) to the last line.
This leading and trailing horizontal breaks for this section were created using the :line command.
The :c,image(file) command inserts this image of an equation. The "c" causes it to be centered.
The :image(file,link) command inserts it again, and allows you to click on it to go to the Google WWW site.
The :link(name) and :link(alias,value) commands were illustrated earlier in this document.
This is a simple default table created by appending :tb to the last line.
The next table used :tb(b=5,s=;,a=r) to create a larger border, use a different delimiter character in the example.txt file, and align to the right of the browser window.
The next table with :tb(w=100%,ea=c) has a width percentage that fills 100% of the screen and the text in each entry aligned to the center.
The next table with :tb(cw1=5x0%,w=20,ca1=r) has the width of column 1 = 50%, the rest of the columns of width 20 pixels, and the data in column 1 aligned to the right.
The next table with :tb(c=3,cva1=t,eva=bo,cw2=60) has three columns. Column one is vertically aligned to the top, there is a break row specified by just commas, the data is vertically aligned to the bottom, and the width of column 2 is 60 pixels.
|Section One||Line One Line Two Line Three||Column three|
|Section Two (bold)||Line One Line Two Line Three||Column 3|
The next table with :tb(c=3,cva1=t,b=0,w=60%,cw3=80%,s=***) has three columns (only two that have information - see heading two). Column one is vertically aligned to the top, there is no border, the width of column 3 is 80% of the table, the width of the table is 60% of the screen, and the separator is not a comma (it is ***).
|Heading One||A couple of sentences that wrap. For example, a definition, an explanation, a point about this particular page, and so forth. The lines wrap, no matter where you insert newlines, if you specify a specific number of columns. Don't forget to include spaces, or your words will also wrap together.|
|Heading Two||There is a bit of a break between the last paragraph and heading twobecause we inserted a row of blank space. There is a separator columnbetween the heading and the paragraphs because we included an extraseparator there (compare with distance between columns in tableabove). To make the distance larger, put <br> in the extracell. It need not be included in every row, just one.|
The next table with :tb(c=3,b=0,w=60%,cw2=5%,s=***) has columns equals three, there is no border, the width of the entire table covers 60% of the screen, column two has a width of 5% of the table, and the separator is, again, ***.
|Heading One||Heading Two|
|This table is similar to the last one. A couple of sentences thatwrap. For example, a definition, an explaination, a point about thisparticular page, and so forth. The lines wrap, no matter where youinsert newlines, if you specify a specific number of columns. Don'tforget to include spaces, or your words will also wrap together.||This table has no extra row like the one above, but it does havethe extra column to separate the data columns. This column is 5% ofthe total width, so it is big enough to make a clear break between thecolumns, but not overwhelming. More text to wrap. More text to wrap.More text to wrap. More text to wrap. More text to wrap. More textto wrap.|