PageRenderTime 63ms CodeModel.GetById 15ms app.highlight 37ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/English/rules.html

http://txt2tags.googlecode.com/
HTML | 1757 lines | 1708 code | 46 blank | 3 comment | 0 complexity | b075cb8077777e6fe2a3cd7d3638590d MD5 | raw file
   1<?xml version="1.0"
   2?>
   3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   4<html xmlns="http://www.w3.org/1999/xhtml">
   5<head>
   6<title>Txt2tags Markup Rules</title>
   7<meta name="generator" content="http://txt2tags.org" />
   8
   9<!-- Included /a/pessoal/sourceforge.net/txt2tags/src/doc/English/rules/rules.css -->
  10<style type="text/css">
  11body {
  12	margin:2em;
  13}
  14a {
  15	font-weight:bold;
  16	text-decoration:none;
  17}
  18a:hover {
  19	text-decoration:underline;
  20}
  21.toc {
  22	margin-left:2em;
  23}
  24.section {
  25	margin-top:2em;
  26	margin-bottom:1em;
  27	border:1px solid black;
  28	text-align:center;
  29	background-color:#ddd;
  30}
  31table {
  32	empty-cells:hide;
  33}	
  34td {
  35	padding:4px;
  36}
  37</style>
  38
  39</head>
  40<body>
  41
  42<div class="header" id="header">
  43<h1>Txt2tags Markup Rules</h1>
  44</div>
  45
  46<div class="body" id="body">
  47<p>
  48This document describes all the details about each txt2tags mark.
  49The target audience are <b>experienced</b> users. You may find it
  50useful if you want to master the marks or solve a specific problem
  51about a mark.
  52</p>
  53<p>
  54If you are new to txt2tags or just want to know which are the
  55available marks, please read the <a href="markup.html">Markup Demo</a>.
  56</p>
  57<p>
  58Note 1: This document is generated directly from the txt2tags
  59test-suite. All the rules mentioned here are 100% in sync with the
  60current program code.
  61</p>
  62<p>
  63Note 2: A good practice is to consult <a href="rules.t2t">the sources</a> when
  64reading, to see how the texts were made.
  65</p>
  66<p>
  67Table of Contents:
  68</p>
  69<div class="toc" id="toc">
  70  <ul>
  71  <li><a href="#paragraph">Paragraph</a>
  72    <ul>
  73    <li><a href="#toc2">Syntax: Lines grouped together</a>
  74    </li>
  75    <li><a href="#toc3">Syntax: Leading and trailing spaces are ignored</a>
  76    </li>
  77    <li><a href="#toc4">Syntax: A comment don't close a paragraph</a>
  78    </li>
  79    <li><a href="#toc5">Closing: EOF closes the open paragraph</a>
  80    </li>
  81    </ul>
  82  </li>
  83  <li><a href="#comment">Comment</a>
  84    <ul>
  85    <li><a href="#toc7">Syntax: The % character at the line beginning (column 1)</a>
  86    </li>
  87    <li><a href="#toc8">Syntax: Area (block)</a>
  88    </li>
  89    <li><a href="#toc9">Syntax: Area (block) with trailing spaces</a>
  90    </li>
  91    <li><a href="#toc10">Invalid: The % in any other position</a>
  92    </li>
  93    </ul>
  94  </li>
  95  <li><a href="#line">Line</a>
  96    <ul>
  97    <li><a href="#toc12">Syntax: At least 20 chars of - = _</a>
  98    </li>
  99    <li><a href="#toc13">Syntax: Any kind of mixing is allowed</a>
 100    </li>
 101    <li><a href="#toc14">Syntax: Leading and/or trailing spaces are allowed</a>
 102    </li>
 103    <li><a href="#toc15">Invalid: Less than 20 chars (but strike matches)</a>
 104    </li>
 105    <li><a href="#toc16">Invalid: Strange chars (but strike matches)</a>
 106    </li>
 107    </ul>
 108  </li>
 109  <li><a href="#inline">Inline</a>
 110    <ul>
 111    <li><a href="#toc18">Syntax: Marks are greedy and must be "glued" with contents</a>
 112    </li>
 113    <li><a href="#toc19">Syntax: Repetition is greedy</a>
 114    </li>
 115    <li><a href="#toc20">Invalid: No contents</a>
 116    </li>
 117    <li><a href="#toc21">Invalid: Contents not "glued" with marks</a>
 118    </li>
 119    </ul>
 120  </li>
 121  <li><a href="#link">Link</a>
 122    <ul>
 123    <li><a href="#toc23">Syntax: E-mail</a>
 124    </li>
 125    <li><a href="#toc24">Syntax: E-mail with form data</a>
 126    </li>
 127    <li><a href="#toc25">Syntax: URL</a>
 128    </li>
 129    <li><a href="#toc26">Syntax: URL with anchor</a>
 130    </li>
 131    <li><a href="#toc27">Syntax: URL with form data</a>
 132    </li>
 133    <li><a href="#toc28">Syntax: URL with form data and anchor</a>
 134    </li>
 135    <li><a href="#toc29">Syntax: URL with login data</a>
 136    </li>
 137    <li><a href="#toc30">Syntax: URL with login, form and anchor</a>
 138    </li>
 139    <li><a href="#toc31">Syntax: URL with label</a>
 140    </li>
 141    <li><a href="#toc32">Syntax: URL with label (trailing spaces are discarded, leading are maintained)</a>
 142    </li>
 143    <li><a href="#toc33">Syntax: URL with label, stressing</a>
 144    </li>
 145    <li><a href="#toc34">Syntax: Link with label for local files</a>
 146    </li>
 147    <li><a href="#toc35">Syntax: Another link as a label</a>
 148    </li>
 149    <li><a href="#toc36">Syntax: URL with funny chars</a>
 150    </li>
 151    <li><a href="#toc37">Test: Various per line</a>
 152    </li>
 153    <li><a href="#toc38">Feature: Guessed link, adding protocol automatically</a>
 154    </li>
 155    <li><a href="#toc39">Invalid: Trailing space on link</a>
 156    </li>
 157    <li><a href="#toc40">Invalid: Label with ] char (use postproc)</a>
 158    </li>
 159    </ul>
 160  </li>
 161  <li><a href="#image">Image</a>
 162    <ul>
 163    <li><a href="#toc42">Syntax: Image name inside brackets: [img]</a>
 164    </li>
 165    <li><a href="#toc43">Syntax: Image pointing to a link: [[img] link]</a>
 166    </li>
 167    <li><a href="#toc44">Align: Image position is preserved when inside paragraph</a>
 168    </li>
 169    <li><a href="#toc45">Align: Image alone with spaces around is aligned</a>
 170    </li>
 171    <li><a href="#toc46">Test: Two glued images with no spaces (left &amp; right)</a>
 172    </li>
 173    <li><a href="#toc47">Test: Various per line</a>
 174    </li>
 175    <li><a href="#toc48">Invalid: Spaces inside are not allowed</a>
 176    </li>
 177    </ul>
 178  </li>
 179  <li><a href="#macro">Macro</a>
 180    <ul>
 181    <li><a href="#toc50">Syntax: Macro without formatting string</a>
 182    </li>
 183    <li><a href="#toc51">Syntax: Macro name is case insensitive</a>
 184    </li>
 185    <li><a href="#toc52">Syntax: Macro with formatting string</a>
 186    </li>
 187    <li><a href="#toc53">Syntax: Leading and trailing spaces are preserved</a>
 188    </li>
 189    <li><a href="#toc54">Test: Expansion of the percent char</a>
 190    </li>
 191    <li><a href="#toc55">Test: Various per line, glued</a>
 192    </li>
 193    <li><a href="#toc56">Test: Path formatters</a>
 194    </li>
 195    </ul>
 196  </li>
 197  <li><a href="#numtitle">Numbered Title</a>
 198  </li>
 199  <li><a href="#title">Title</a>
 200    <ul>
 201    <li><a href="#toc59">Syntax: Balanced equal signs (from 1 to 5)</a>
 202    </li>
 203    </ul>
 204  </li>
 205
 206    <ul>
 207
 208    </li>
 209    <li><a href="#toc62">Label: Between brackets, alphanumeric [A-Za-z0-9_-]</a>
 210    </li>
 211    </ul>
 212  </li>
 213
 214    <ul>
 215
 216    </li>
 217    <li><a href="#toc65">Syntax: Spaces around and/or inside are allowed (and ignored)</a>
 218    </li>
 219    <li><a href="#toc66">Invalid: Unbalanced equal signs</a>
 220    </li>
 221    <li><a href="#toc67">Invalid: Level deeper than 5</a>
 222    </li>
 223    <li><a href="#toc68">Invalid: Space between title and label</a>
 224    </li>
 225    <li><a href="#toc69">Invalid: Space inside label</a>
 226    </li>
 227    <li><a href="#toc70">Invalid: Strange chars inside label</a>
 228    </li>
 229    </ul>
 230  </li>
 231  <li><a href="#quote">Quote</a>
 232    <ul>
 233    <li><a href="#toc72">Syntax: TAB defines quote</a>
 234    </li>
 235    <li><a href="#toc73">Nesting: Creating deeper quotes</a>
 236    </li>
 237    <li><a href="#toc74">Nesting: Reverse nesting works</a>
 238    </li>
 239    <li><a href="#toc75">Nesting: Random count</a>
 240    </li>
 241    <li><a href="#toc76">Nesting: When not supported</a>
 242    </li>
 243    <li><a href="#toc77">Syntax: Spaces after TAB</a>
 244    </li>
 245    <li><a href="#toc78">Invalid: Spaces before TAB</a>
 246    </li>
 247    <li><a href="#toc79">Invalid: Paragraphs inside</a>
 248    </li>
 249    <li><a href="#toc80">Closing: EOF closes the open block</a>
 250    </li>
 251    </ul>
 252  </li>
 253  <li><a href="#raw">Raw</a>
 254  </li>
 255  <li><a href="#tagged">Tagged</a>
 256  </li>
 257  <li><a href="#verbatim">Verbatim</a>
 258    <ul>
 259    <li><a href="#toc84">Syntax: A single line</a>
 260    </li>
 261    <li><a href="#toc85">Syntax: A single line with leading spaces</a>
 262    </li>
 263    <li><a href="#toc86">Syntax: Area (block)</a>
 264    </li>
 265    <li><a href="#toc87">Syntax: Area (block) with trailing spaces</a>
 266    </li>
 267    <li><a href="#toc88">Invalid: No space between mark and contents</a>
 268    </li>
 269    <li><a href="#toc89">Invalid: Leading spaces on block marks</a>
 270    </li>
 271    <li><a href="#toc90">Closing: EOF closes the open block</a>
 272    </li>
 273    </ul>
 274  </li>
 275  <li><a href="#deflist">Definition List</a>
 276  </li>
 277  <li><a href="#numlist">Numbered List</a>
 278  </li>
 279  <li><a href="#list">List</a>
 280    <ul>
 281    <li><a href="#toc94">Items: Prefixed by hyphen</a>
 282    </li>
 283    <li><a href="#toc95">Items: Free leading spacing (indentation)</a>
 284    </li>
 285    <li><a href="#toc96">Items: Vertical spacing between items</a>
 286    </li>
 287    <li><a href="#toc97">Items: Exactly ONE space after the hyphen</a>
 288    </li>
 289    <li><a href="#toc98">Items: Catchy cases</a>
 290    </li>
 291    <li><a href="#toc99">Nesting: Creating sublists</a>
 292    </li>
 293    <li><a href="#toc100">Nesting: Free leading spacing (indentation)</a>
 294    </li>
 295    <li><a href="#toc101">Nesting: Maximum depth</a>
 296    </li>
 297    <li><a href="#toc102">Nesting: Reverse doesn't work</a>
 298    </li>
 299    <li><a href="#toc103">Nesting: Going deeper and back</a>
 300    </li>
 301    <li><a href="#toc104">Nesting: Vertical spacing between lists</a>
 302    </li>
 303    <li><a href="#toc105">Nesting: Messing up</a>
 304    </li>
 305    <li><a href="#toc106">Closing: Two (not so) empty lines</a>
 306    </li>
 307    <li><a href="#toc107">Closing: Empty item closes current (sub)list</a>
 308    </li>
 309    <li><a href="#toc108">Closing: EOF closes the lists</a>
 310    </li>
 311    </ul>
 312  </li>
 313  <li><a href="#table">Table</a>
 314    <ul>
 315    <li><a href="#toc110">Syntax: Lines starting with a pipe |</a>
 316    </li>
 317    <li><a href="#toc111">Syntax: Extra pipes separate cells</a>
 318    </li>
 319    <li><a href="#toc112">Syntax: With a trailing pipe, make border</a>
 320    </li>
 321    <li><a href="#toc113">Syntax: Table lines starting with double pipe are heading</a>
 322    </li>
 323    <li><a href="#toc114">Align: Spaces before the leading pipe centralize the table</a>
 324    </li>
 325    <li><a href="#toc115">Align: Spaces inside the cell denote its alignment</a>
 326    </li>
 327    <li><a href="#toc116">Span: Column span is defined by extra pipes at cell closing</a>
 328    </li>
 329    <li><a href="#toc117">Test: Empty cells are placed as expected</a>
 330    </li>
 331    <li><a href="#toc118">Test: Lines with different number of cells</a>
 332    </li>
 333    <li><a href="#toc119">Test: Empty cells + Span + Messy cell number = Fun!</a>
 334    </li>
 335    <li><a href="#toc120">Test: Lots of cells at the same line</a>
 336    </li>
 337    <li><a href="#toc121">Test: Empty lines</a>
 338    </li>
 339    <li><a href="#toc122">Invalid: There must be at least one space around the pipe</a>
 340    </li>
 341    <li><a href="#toc123">Invalid: You must use spaces, not TABs</a>
 342    </li>
 343    </ul>
 344  </li>
 345  </ul>
 346
 347</div>
 348<p></p>
 349<hr class="light" />
 350<p></p>
 351<a id="paragraph" name="paragraph"></a>
 352<h1 class="section">Paragraph</h1>
 353<a id="toc2" name="toc2"></a>
 354<h2>Syntax: Lines grouped together</h2>
 355<p>
 356A paragraph is composed by one or more lines.
 357A blank line (or a table, or a list) ends the
 358current paragraph.
 359</p>
 360<a id="toc3" name="toc3"></a>
 361<h2>Syntax: Leading and trailing spaces are ignored</h2>
 362<p>
 363   Leading and trailing spaces are ignored.   
 364</p>
 365<a id="toc4" name="toc4"></a>
 366<h2>Syntax: A comment don't close a paragraph</h2>
 367<p>
 368A comment line can be placed inside a paragraph.
 369It will not affect it.
 370</p>
 371<a id="toc5" name="toc5"></a>
 372<h2>Closing: EOF closes the open paragraph</h2>
 373<p>
 374The end of the file (EOF) closes the
 375currently open paragraph.
 376</p>
 377<a id="comment" name="comment"></a>
 378<h1 class="section">Comment</h1>
 379<a id="toc7" name="toc7"></a>
 380<h2>Syntax: The % character at the line beginning (column 1)</h2>
 381<a id="toc8" name="toc8"></a>
 382<h2>Syntax: Area (block)</h2>
 383<a id="toc9" name="toc9"></a>
 384<h2>Syntax: Area (block) with trailing spaces</h2>
 385<a id="toc10" name="toc10"></a>
 386<h2>Invalid: The % in any other position</h2>
 387<p>
 388 % not on the line beginning (at column 2)
 389</p>
 390<p>
 391some text     % half line comments are not allowed
 392</p>
 393<a id="line" name="line"></a>
 394<h1 class="section">Line</h1>
 395<a id="toc12" name="toc12"></a>
 396<h2>Syntax: At least 20 chars of - = _</h2>
 397<hr class="light" />
 398<hr class="heavy" />
 399<hr class="light" />
 400<a id="toc13" name="toc13"></a>
 401<h2>Syntax: Any kind of mixing is allowed</h2>
 402<p>
 403Free mixing is allowed to make the line,
 404but the first char is the identifier for
 405the difference between separator ( - _ )
 406and strong ( = ) lines.
 407</p>
 408<hr class="heavy" />
 409<hr class="light" />
 410<hr class="heavy" />
 411<hr class="heavy" />
 412<hr class="light" />
 413<a id="toc14" name="toc14"></a>
 414<h2>Syntax: Leading and/or trailing spaces are allowed</h2>
 415<hr class="light" />
 416<hr class="light" />
 417<hr class="light" />
 418<a id="toc15" name="toc15"></a>
 419<h2>Invalid: Less than 20 chars (but strike matches)</h2>
 420<p>
 421<s>-----</s>
 422</p>
 423<a id="toc16" name="toc16"></a>
 424<h2>Invalid: Strange chars (but strike matches)</h2>
 425<p>
 426<s>-----</s> <s>------</s>
 427</p>
 428<p>
 429<s>-----</s>+<s>------</s>
 430</p>
 431<p>
 432( <s>----------------</s> )
 433</p>
 434<a id="inline" name="inline"></a>
 435<h1 class="section">Inline</h1>
 436<a id="toc18" name="toc18"></a>
 437<h2>Syntax: Marks are greedy and must be "glued" with contents</h2>
 438<p>
 439GLUED: The contents must be glued with the marks, no spaces
 440between them. Right after the opening mark there must be a
 441non-blank character, as well as right before the closing mark.
 442</p>
 443<p>
 444GREEDY: If the contents boundary character is the same as
 445the mark character, it is considered contents, not mark.
 446So ****bold**** turns to &lt;B&gt;**bold**&lt;/B&gt; in HTML.
 447</p>
 448<p>
 449{ <b>b</b>        }{ <i>i</i>        }{ <u>u</u>        }{ <s>s</s>        }{ <code>m</code>        }{ r       }{ t }<br />
 450{ <b>bo</b>       }{ <i>it</i>       }{ <u>un</u>       }{ <s>st</s>       }{ <code>mo</code>       }{ ra      }{ tg }<br />
 451{ <b>bold</b>     }{ <i>ital</i>     }{ <u>undr</u>     }{ <s>strk</s>     }{ <code>mono</code>     }{ raw     }{ tggd }<br />
 452{ <b>bo ld</b>    }{ <i>it al</i>    }{ <u>un dr</u>    }{ <s>st rk</s>    }{ <code>mo no</code>    }{ r aw    }{ tg gd }<br />
 453{ <b>bo * ld</b>  }{ <i>it / al</i>  }{ <u>un _ dr</u>  }{ <s>st - rk</s>  }{ <code>mo ` no</code>  }{ r " aw  }{ tg ' gd }<br />
 454{ <b>bo **ld</b>  }{ <i>it //al</i>  }{ <u>un __dr</u>  }{ <s>st --rk</s>  }{ <code>mo ``no</code>  }{ r ""aw  }{ tg ''gd }<br />
 455{ <b>bo ** ld</b> }{ <i>it // al</i> }{ <u>un __ dr</u> }{ <s>st -- rk</s> }{ <code>mo `` no</code> }{ r "" aw }{ tg '' gd }<br />
 456{ <b>**bold**</b> }{ <i>//ital//</i> }{ <u>__undr__</u> }{ <s>--strk--</s> }{ <code>``mono``</code> }{ ""raw"" }{ ''tggd'' }<br />
 457{ <b>*bold*</b>   }{ <i>/ital/</i>   }{ <u>_undr_</u>   }{ <s>-strk-</s>   }{ <code>`mono`</code>   }{ "raw"   }{ 'tggd' }<br />
 458</p>
 459<a id="toc19" name="toc19"></a>
 460<h2>Syntax: Repetition is greedy</h2>
 461<p>
 462When the mark character is repeated many times,
 463the contents are expanded to the largest possible.
 464Thats why they are greedy, the outer marks are
 465the ones used.
 466</p>
 467<p>
 468{  <b>*</b>       }{  <i>/</i>       }{  <u>_</u>       }{  <s>-</s>       }{  <code>`</code>       }{ "       }{ ' }<br />
 469{  <b>**</b>      }{  <i>//</i>      }{  <u>__</u>      }{  <s>--</s>      }{  <code>``</code>      }{ ""      }{ '' }<br />
 470{  <b>***</b>     }{  <i>///</i>     }{  <u>___</u>     }{  <s>---</s>     }{  <code>```</code>     }{ """     }{ ''' }<br />
 471{  <b>****</b>    }{  <i>////</i>    }{  <u>____</u>    }{  <s>----</s>    }{  <code>````</code>    }{ """"    }{ '''' }<br />
 472{  <b>*****</b>   }{  <i>/////</i>   }{  <u>_____</u>   }{  <s>-----</s>   }{  <code>`````</code>   }{ """""   }{ ''''' }<br />
 473{  <b>******</b>  }{  <i>//////</i>  }{  <u>______</u>  }{  <s>------</s>  }{  <code>``````</code>  }{ """"""  }{ '''''' }<br />
 474</p>
 475<a id="toc20" name="toc20"></a>
 476<h2>Invalid: No contents</h2>
 477<p>
 478{     ****     }{     ////     }{     ____     }{     ----     }{     ````     }{    """"     }{    '''' }<br />
 479{     ** **    }{     // //    }{     __ __    }{     -- --    }{     `` ``    }{    "" ""    }{    '' '' }<br />
 480</p>
 481<a id="toc21" name="toc21"></a>
 482<h2>Invalid: Contents not "glued" with marks</h2>
 483<p>
 484Spaces between the marks and the contents in any side
 485invalidate the mark.
 486</p>
 487<p>
 488{  ** bold**   }{  // ital//   }{  __ undr__   }{  -- strk--   }{  `` mono``   }{ "" raw""    }{ '' tggd'' }<br />
 489{  **bold **   }{  //ital //   }{  __undr __   }{  --strk --   }{  ``mono ``   }{ ""raw ""    }{ ''tggd '' }<br />
 490{  ** bold **  }{  // ital //  }{  __ undr __  }{  -- strk --  }{  `` mono ``  }{ "" raw ""   }{ '' tggd '' }<br />
 491</p>
 492<a id="link" name="link"></a>
 493<h1 class="section">Link</h1>
 494<a id="toc23" name="toc23"></a>
 495<h2>Syntax: E-mail</h2>
 496<p>
 497<a href="mailto:user@domain.com">user@domain.com</a><br />
 498<a href="mailto:user@domain.com">user@domain.com</a>.<br />
 499<a href="mailto:user@domain.com">user@domain.com</a>. any text.<br />
 500any text: <a href="mailto:user@domain.com">user@domain.com</a>. any text.<br />
 501<a href="mailto:user@domain.com">label</a><br />
 502</p>
 503<a id="toc24" name="toc24"></a>
 504<h2>Syntax: E-mail with form data</h2>
 505<p>
 506<a href="mailto:user@domain.com?subject=bla">user@domain.com?subject=bla</a><br />
 507<a href="mailto:user@domain.com?subject=bla.">user@domain.com?subject=bla.</a><br />
 508<a href="mailto:user@domain.com?subject=bla,">user@domain.com?subject=bla,</a><br />
 509<a href="mailto:user@domain.com?subject=bla&amp;cc=otheruser@domain.com">user@domain.com?subject=bla&amp;cc=otheruser@domain.com</a><br />
 510<a href="mailto:user@domain.com?subject=bla&amp;cc=otheruser@domain.com.">user@domain.com?subject=bla&amp;cc=otheruser@domain.com.</a><br />
 511<a href="mailto:user@domain.com?subject=bla&amp;cc=otheruser@domain.com,">user@domain.com?subject=bla&amp;cc=otheruser@domain.com,</a><br />
 512<a href="mailto:user@domain.com?subject=bla&amp;cc=otheruser@domain.com">label</a>.<br />
 513<a href="mailto:user@domain.com?subject=bla&amp;cc=otheruser@domain.com.">label</a>.<br />
 514</p>
 515<a id="toc25" name="toc25"></a>
 516<h2>Syntax: URL</h2>
 517<p>
 518<a href="http://www.domain.com">http://www.domain.com</a><br />
 519<a href="http://www.domain.com/dir/">http://www.domain.com/dir/</a><br />
 520<a href="http://www.domain.com/dir///">http://www.domain.com/dir///</a><br />
 521<a href="http://www.domain.com">http://www.domain.com</a>.<br />
 522<a href="http://www.domain.com">http://www.domain.com</a>,<br />
 523<a href="http://www.domain.com">http://www.domain.com</a>. any text.<br />
 524<a href="http://www.domain.com">http://www.domain.com</a>, any text.<br />
 525<a href="http://www.domain.com/dir/">http://www.domain.com/dir/</a>. any text.<br />
 526any text: <a href="http://www.domain.com">http://www.domain.com</a>. any text.<br />
 527any text: <a href="http://www.domain.com/dir/">http://www.domain.com/dir/</a>. any text.<br />
 528any text: <a href="http://www.domain.com/dir/index.html">http://www.domain.com/dir/index.html</a>. any text.<br />
 529any text: <a href="http://www.domain.com/dir/index.html">http://www.domain.com/dir/index.html</a>, any text.<br />
 530</p>
 531<a id="toc26" name="toc26"></a>
 532<h2>Syntax: URL with anchor</h2>
 533<p>
 534<a href="http://www.domain.com/dir/#anchor">http://www.domain.com/dir/#anchor</a><br />
 535<a href="http://www.domain.com/dir/index.html#anchor">http://www.domain.com/dir/index.html#anchor</a><br />
 536<a href="http://www.domain.com/dir/index.html#anchor.">http://www.domain.com/dir/index.html#anchor.</a><br />
 537<a href="http://www.domain.com/dir/#anchor.">http://www.domain.com/dir/#anchor.</a> any text.<br />
 538<a href="http://www.domain.com/dir/index.html#anchor.">http://www.domain.com/dir/index.html#anchor.</a> any text.<br />
 539any text: <a href="http://www.domain.com/dir/#anchor.">http://www.domain.com/dir/#anchor.</a> any text.<br />
 540any text: <a href="http://www.domain.com/dir/index.html#anchor.">http://www.domain.com/dir/index.html#anchor.</a> any text.<br />
 541</p>
 542<a id="toc27" name="toc27"></a>
 543<h2>Syntax: URL with form data</h2>
 544<p>
 545<a href="http://domain.com?a=a@a.a&amp;b=a+b+c.">http://domain.com?a=a@a.a&amp;b=a+b+c.</a><br />
 546<a href="http://domain.com?a=a@a.a&amp;b=a+b+c,">http://domain.com?a=a@a.a&amp;b=a+b+c,</a><br />
 547<a href="http://domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c.">http://domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c.</a><br />
 548<a href="http://domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c@.">http://domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c@.</a><br />
 549</p>
 550<a id="toc28" name="toc28"></a>
 551<h2>Syntax: URL with form data and anchor</h2>
 552<p>
 553<a href="http://domain.com?a=a@a.a&amp;b=a+b+c.#anchor">http://domain.com?a=a@a.a&amp;b=a+b+c.#anchor</a><br />
 554<a href="http://domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c.#anchor">http://domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c.#anchor</a><br />
 555<a href="http://domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c@.#anchor">http://domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c@.#anchor</a><br />
 556</p>
 557<a id="toc29" name="toc29"></a>
 558<h2>Syntax: URL with login data</h2>
 559<p>
 560<a href="http://user:password@domain.com/bla.html">http://user:password@domain.com/bla.html</a>.<br />
 561<a href="http://user:password@domain.com/dir/">http://user:password@domain.com/dir/</a>.<br />
 562<a href="http://user:password@domain.com">http://user:password@domain.com</a>.<br />
 563<a href="http://user:@domain.com">http://user:@domain.com</a>.<br />
 564<a href="http://user@domain.com">http://user@domain.com</a>.<br />
 565</p>
 566<a id="toc30" name="toc30"></a>
 567<h2>Syntax: URL with login, form and anchor</h2>
 568<p>
 569<a href="http://user:password@domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c.#anchor">http://user:password@domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c.#anchor</a><br />
 570<a href="http://user:password@domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c@#anchor">http://user:password@domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c@#anchor</a><br />
 571</p>
 572<a id="toc31" name="toc31"></a>
 573<h2>Syntax: URL with label</h2>
 574<p>
 575<a href="http://www.domain.com">label</a><br />
 576</p>
 577<a id="toc32" name="toc32"></a>
 578<h2>Syntax: URL with label (trailing spaces are discarded, leading are maintained)</h2>
 579<p>
 580<a href="http://www.domain.com">  label</a><br />
 581<a href="http://www.domain.com">label</a><br />
 582</p>
 583<a id="toc33" name="toc33"></a>
 584<h2>Syntax: URL with label, stressing</h2>
 585<p>
 586<a href="http://www.domain.com/dir/index.html#anchor.">anchor</a><br />
 587<a href="http://user:password@domain.com/bla.html">login</a><br />
 588<a href="http://www.domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c.">form</a><br />
 589<a href="http://www.domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c.#anchor">form &amp; anchor</a><br />
 590<a href="http://user:password@domain.com/bla.cgi?a=a@a.a&amp;b=a+b+c.">login &amp; form</a><br />
 591</p>
 592<a id="toc34" name="toc34"></a>
 593<h2>Syntax: Link with label for local files</h2>
 594<p>
 595<a href="..">local link up</a><br />
 596<a href="bla.html">local link file</a><br />
 597<a href="#anchor">local link anchor</a><br />
 598<a href="bla.html#anchor">local link file/anchor</a><br />
 599<a href="bla.html#anchor.">local link file/anchor</a><br />
 600<a href="abc.gif">local link img</a><br />
 601</p>
 602<a id="toc35" name="toc35"></a>
 603<h2>Syntax: Another link as a label</h2>
 604<p>
 605<a href="http://www.domain.com">www.fake.com</a><br />
 606</p>
 607<a id="toc36" name="toc36"></a>
 608<h2>Syntax: URL with funny chars</h2>
 609<p>
 610<a href="http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm">http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm</a><br />
 611<a href="http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&amp;b=+.@*_-">http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&amp;b=+.@*_-</a><br />
 612<a href="http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&amp;b=+.@*_-#anchor_-1%.">http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&amp;b=+.@*_-#anchor_-1%.</a><br />
 613<a href="http://foo._user-9:pass!#$%&amp;*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&amp;b=+.@*_-#anchor_-1%.">http://foo._user-9:pass!#$%&amp;*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&amp;b=+.@*_-#anchor_-1%.</a><br />
 614</p>
 615<a id="toc37" name="toc37"></a>
 616<h2>Test: Various per line</h2>
 617<p>
 618<a href="http://L1.com">http://L1.com</a> ! <a href="mailto:L2@www.com">L2@www.com</a> ! <a href="http://www.com">L3</a> ! <a href="mailto:w@ww.com">L4</a> ! <a href="http://www.L5.com">www.L5.com</a><br />
 619</p>
 620<a id="toc38" name="toc38"></a>
 621<h2>Feature: Guessed link, adding protocol automatically</h2>
 622<p>
 623<a href="http://www.domain.com">www.domain.com</a><br />
 624<a href="http://www2.domain.com">www2.domain.com</a><br />
 625<a href="ftp://ftp.domain.com">ftp.domain.com</a><br />
 626<a href="http://WWW.DOMAIN.COM">WWW.DOMAIN.COM</a><br />
 627<a href="ftp://FTP.DOMAIN.COM">FTP.DOMAIN.COM</a><br />
 628<a href="http://www.domain.com">label</a><br />
 629<a href="ftp://ftp.domain.com">label</a><br />
 630<a href="http://WWW.DOMAIN.COM">label</a><br />
 631<a href="ftp://FTP.DOMAIN.COM">label</a><br />
 632</p>
 633<a id="toc39" name="toc39"></a>
 634<h2>Invalid: Trailing space on link</h2>
 635<p>
 636[label <a href="http://www.domain.com">www.domain.com</a> ]
 637</p>
 638<a id="toc40" name="toc40"></a>
 639<h2>Invalid: Label with ] char (use postproc)</h2>
 640<p>
 641[label] <a href="http://www.domain.com">www.domain.com</a>]
 642</p>
 643<a id="image" name="image"></a>
 644<h1 class="section">Image</h1>
 645<a id="toc42" name="toc42"></a>
 646<h2>Syntax: Image name inside brackets: [img]</h2>
 647<p>
 648<img align="middle" src="../img/t2tpowered.png" border="0" alt=""/>
 649</p>
 650<a id="toc43" name="toc43"></a>
 651<h2>Syntax: Image pointing to a link: [[img] link]</h2>
 652<p>
 653<a href="http://txt2tags.org"><img align="middle" src="../img/t2tpowered.png" border="0" alt=""/></a><br />
 654</p>
 655<a id="toc44" name="toc44"></a>
 656<h2>Align: Image position is preserved when inside paragraph</h2>
 657<p>
 658<img align="left" src="../img/t2tpowered.png" border="0" alt=""/> Image at the line beginning.
 659</p>
 660<p>
 661Image in the middle <img align="middle" src="../img/t2tpowered.png" border="0" alt=""/> of the line.
 662</p>
 663<p>
 664Image at the line end. <img align="right" src="../img/t2tpowered.png" border="0" alt=""/>
 665</p>
 666<a id="toc45" name="toc45"></a>
 667<h2>Align: Image alone with spaces around is aligned</h2>
 668<p>
 669<img align="left" src="../img/t2tpowered.png" border="0" alt=""/>   
 670                <center><img align="middle" src="../img/t2tpowered.png" border="0" alt=""/></center>  
 671                                    <img align="right" src="../img/t2tpowered.png" border="0" alt=""/>
 672</p>
 673<a id="toc46" name="toc46"></a>
 674<h2>Test: Two glued images with no spaces (left &amp; right)</h2>
 675<p>
 676<img align="left" src="../img/t2tpowered.png" border="0" alt=""/><img align="right" src="../img/t2tpowered.png" border="0" alt=""/>
 677</p>
 678<a id="toc47" name="toc47"></a>
 679<h2>Test: Various per line</h2>
 680<p>
 681Images <img align="middle" src="../img/t2tpowered.png" border="0" alt=""/> mixed <img align="middle" src="../img/t2tpowered.png" border="0" alt=""/> with <img align="middle" src="../img/t2tpowered.png" border="0" alt=""/> text.
 682</p>
 683<p>
 684Images glued together: <img align="middle" src="../img/t2tpowered.png" border="0" alt=""/><img align="middle" src="../img/t2tpowered.png" border="0" alt=""/><img align="middle" src="../img/t2tpowered.png" border="0" alt=""/>.
 685</p>
 686<a id="toc48" name="toc48"></a>
 687<h2>Invalid: Spaces inside are not allowed</h2>
 688<p>
 689[../img/t2tpowered.png ]
 690</p>
 691<p>
 692[ ../img/t2tpowered.png]
 693</p>
 694<p>
 695[ ../img/t2tpowered.png ]
 696</p>
 697<a id="macro" name="macro"></a>
 698<h1 class="section">Macro</h1>
 699<a id="toc50" name="toc50"></a>
 700<h2>Syntax: Macro without formatting string</h2>
 701<p>
 702Date    : 20081027 - 20081027<br />
 703Mtime   : 20081027 - 20081027<br />
 704Infile  : rules.t2t - rules.t2t<br />
 705Outfile : rules.html - rules.html<br />
 706</p>
 707<a id="toc51" name="toc51"></a>
 708<h2>Syntax: Macro name is case insensitive</h2>
 709<p>
 710Date    : 20081027<br />
 711Mtime   : 20081027<br />
 712Infile  : rules.t2t<br />
 713Outfile : rules.html<br />
 714</p>
 715<a id="toc52" name="toc52"></a>
 716<h2>Syntax: Macro with formatting string</h2>
 717<p>
 718Date    : txt 20 txt<br />
 719Mtime   : txt 20 txt<br />
 720Infile  : txt t2t txt<br />
 721Outfile : txt html txt<br />
 722</p>
 723<a id="toc53" name="toc53"></a>
 724<h2>Syntax: Leading and trailing spaces are preserved</h2>
 725<p>
 726Date    : ( txt ) - ( 20 )<br />
 727Mtime   : ( txt ) - ( 20 )<br />
 728Infile  : ( txt ) - ( t2t )<br />
 729Outfile : ( txt ) - ( html )<br />
 730</p>
 731<a id="toc54" name="toc54"></a>
 732<h2>Test: Expansion of the percent char</h2>
 733<p>
 734Date    : % - % - %% - %%<br />
 735Mtime   : % - % - %% - %%<br />
 736Infile  : % - % - %% - %%<br />
 737Outfile : % - % - %% - %%<br />
 738</p>
 739<a id="toc55" name="toc55"></a>
 740<h2>Test: Various per line, glued</h2>
 741<p>
 742Date    : 202008102720081027<br />
 743Mtime   : 202008102720081027<br />
 744Infile  : t2trules.t2trules.t2t<br />
 745Outfile : htmlrules.htmlrules.html<br />
 746</p>
 747<a id="toc56" name="toc56"></a>
 748<h2>Test: Path formatters</h2>
 749<p>
 750Path    : /a/pessoal/sourceforge.net/txt2tags/src/doc/English/rules/rules.t2t<br />
 751Path    : /a/pessoal/sourceforge.net/txt2tags/src/doc/English/rules.html<br />
 752Dirname : /a/pessoal/sourceforge.net/txt2tags/src/doc/English/rules, rules<br />
 753Dirname : /a/pessoal/sourceforge.net/txt2tags/src/doc/English, English<br />
 754File    : rules + t2t = rules.t2t<br />
 755File    : rules + html = rules.html<br />
 756</p>
 757<a id="numtitle" name="numtitle"></a>
 758<h1 class="section">Numbered Title</h1>
 759<p>
 760See <a href="#title">Title</a>, the same rules apply.
 761</p>
 762<a id="title" name="title"></a>
 763<h1 class="section">Title</h1>
 764<a id="toc59" name="toc59"></a>
 765<h2>Syntax: Balanced equal signs (from 1 to 5)</h2>
 766<a id="toc60" name="toc60"></a>
 767<h1>Title Level 1</h1>
 768<a id="toc61" name="toc61"></a>
 769<h2>Title Level 2</h2>
 770<h3>Title Level 3</h3>
 771<h4>Title Level 4</h4>
 772<h5>Title Level 5</h5>
 773<a id="toc62" name="toc62"></a>
 774<h2>Label: Between brackets, alphanumeric [A-Za-z0-9_-]</h2>
 775<a id="lab_el-1" name="lab_el-1"></a>
 776<h1>Title Level 1</h1>
 777<a id="lab_el-2" name="lab_el-2"></a>
 778<h2>Title Level 2</h2>
 779<a id="lab_el-3" name="lab_el-3"></a>
 780<h3>Title Level 3</h3>
 781<a id="lab_el-4" name="lab_el-4"></a>
 782<h4>Title Level 4</h4>
 783<a id="lab_el-5" name="lab_el-5"></a>
 784<h5>Title Level 5</h5>
 785<a id="toc65" name="toc65"></a>
 786<h2>Syntax: Spaces around and/or inside are allowed (and ignored)</h2>
 787<h3>Title Level 3</h3>
 788<h3>Title Level 3</h3>
 789<h3>Title Level 3</h3>
 790<h3>Title Level 3</h3>
 791<h3>Title Level 3</h3>
 792<a id="lab_el-9" name="lab_el-9"></a>
 793<h3>Title Level 3</h3>
 794<a id="toc66" name="toc66"></a>
 795<h2>Invalid: Unbalanced equal signs</h2>
 796<p>
 797      =Not Title
 798</p>
 799<p>
 800     ==Not Title=
 801</p>
 802<p>
 803    ===Not Title====
 804</p>
 805<a id="toc67" name="toc67"></a>
 806<h2>Invalid: Level deeper than 5</h2>
 807<p>
 808 ======Not Title 6======
 809</p>
 810<p>
 811=======Not Title 7=======
 812</p>
 813<a id="toc68" name="toc68"></a>
 814<h2>Invalid: Space between title and label</h2>
 815<p>
 816=Not Title= [label1]
 817</p>
 818<a id="toc69" name="toc69"></a>
 819<h2>Invalid: Space inside label</h2>
 820<p>
 821=Not Title=[ label ]
 822</p>
 823<a id="toc70" name="toc70"></a>
 824<h2>Invalid: Strange chars inside label</h2>
 825<p>
 826=Not Title=[la/bel]
 827</p>
 828<a id="quote" name="quote"></a>
 829<h1 class="section">Quote</h1>
 830<a id="toc72" name="toc72"></a>
 831<h2>Syntax: TAB defines quote</h2>
 832	<blockquote>
 833	To quote a paragraph, just prefix it by a TAB
 834	character. All the lines of the paragraph must
 835	begin with a TAB.
 836	</blockquote>
 837<p>
 838Any non-tabbed line closes the quote block.
 839</p>
 840<a id="toc73" name="toc73"></a>
 841<h2>Nesting: Creating deeper quotes</h2>
 842	<blockquote>
 843	The number of leading TABs identifies the quote
 844	block depth. This is quote level 1.
 845		<blockquote>
 846		With two TABs, we are on the quote
 847		level 2.
 848			<blockquote>
 849			The more TABs, more deep is
 850			the quote level.
 851				<blockquote>
 852				There isn't a limit.
 853				</blockquote>
 854			</blockquote>
 855		</blockquote>
 856	</blockquote>
 857<p></p>
 858<a id="toc74" name="toc74"></a>
 859<h2>Nesting: Reverse nesting works</h2>
 860	<blockquote>
 861		<blockquote>
 862			<blockquote>
 863				<blockquote>
 864				This quote starts at
 865				level 4.
 866				</blockquote>
 867			Then its depth is decreased.
 868			</blockquote>
 869		Counting down, one by one.
 870		</blockquote>
 871	Until the level 1.
 872	</blockquote>
 873<p></p>
 874<a id="toc75" name="toc75"></a>
 875<h2>Nesting: Random count</h2>
 876	<blockquote>
 877		<blockquote>
 878			<blockquote>
 879			Unlike lists, any quote block is
 880			independent, not part of a tree.
 881			</blockquote>
 882		</blockquote>
 883	The TAB count don't need to be incremental
 884	by one.
 885		<blockquote>
 886			<blockquote>
 887				<blockquote>
 888				The nesting don't need
 889				to follow any rule.
 890				</blockquote>
 891			</blockquote>
 892		Quotes can be opened and closed
 893		in any way.
 894			<blockquote>
 895				<blockquote>
 896					<blockquote>
 897					You choose.
 898					</blockquote>
 899				</blockquote>
 900			</blockquote>
 901		</blockquote>
 902	</blockquote>
 903<p></p>
 904<a id="toc76" name="toc76"></a>
 905<h2>Nesting: When not supported</h2>
 906	<blockquote>
 907	Some targets (as sgml) don't support the
 908	nesting of quotes. There is only one quote
 909	level.
 910		<blockquote>
 911		In this case, no matter how much
 912		TABs are used to define the quote
 913		block, it always will be level 1.
 914		</blockquote>
 915	</blockquote>
 916<p></p>
 917<a id="toc77" name="toc77"></a>
 918<h2>Syntax: Spaces after TAB</h2>
 919	<blockquote>
 920	  Spaces AFTER the TAB character are allowed.
 921	  But be careful, it can be confusing.
 922	</blockquote>
 923<p></p>
 924<a id="toc78" name="toc78"></a>
 925<h2>Invalid: Spaces before TAB</h2>
 926<p>
 927  	Spaces BEFORE the TAB character
 928  	invalidate the mark. It's not quote.
 929</p>
 930<a id="toc79" name="toc79"></a>
 931<h2>Invalid: Paragraphs inside</h2>
 932	<blockquote>
 933	Paragraph breaks inside a quote aren't
 934	possible.
 935	</blockquote>
 936<p></p>
 937	<blockquote>
 938	This sample are two separated quoted
 939	paragraphs, not a quote block with
 940	two paragraphs inside.
 941	</blockquote>
 942<p></p>
 943<a id="toc80" name="toc80"></a>
 944<h2>Closing: EOF closes the open block</h2>
 945	<blockquote>
 946	The end of the file (EOF) closes the
 947	currently open quote block.
 948	</blockquote>
 949<p></p>
 950<a id="raw" name="raw"></a>
 951<h1 class="section">Raw</h1>
 952<p>
 953See <a href="#verbatim">Verbatim</a>, the same rules apply.
 954</p>
 955<a id="tagged" name="tagged"></a>
 956<h1 class="section">Tagged</h1>
 957<p>
 958See <a href="#verbatim">Verbatim</a>, the same rules apply.
 959</p>
 960<a id="verbatim" name="verbatim"></a>
 961<h1 class="section">Verbatim</h1>
 962<a id="toc84" name="toc84"></a>
 963<h2>Syntax: A single line</h2>
 964<pre>
 965A verbatim line.
 966</pre>
 967<p></p>
 968<a id="toc85" name="toc85"></a>
 969<h2>Syntax: A single line with leading spaces</h2>
 970<pre>
 971  Another verbatim line, with leading spaces.
 972</pre>
 973<p></p>
 974<a id="toc86" name="toc86"></a>
 975<h2>Syntax: Area (block)</h2>
 976<pre>
 977A verbatim area delimited
 978       by lines with marks.
 979</pre>
 980<p></p>
 981<a id="toc87" name="toc87"></a>
 982<h2>Syntax: Area (block) with trailing spaces</h2>
 983<pre>
 984Trailing spaces and TABs after the area marks
 985are allowed, but not encouraged nor documented.
 986</pre>
 987<p></p>
 988<a id="toc88" name="toc88"></a>
 989<h2>Invalid: No space between mark and contents</h2>
 990<p>
 991```Not a verbatim line, need one space after mark.
 992</p>
 993<a id="toc89" name="toc89"></a>
 994<h2>Invalid: Leading spaces on block marks</h2>
 995<p>
 996  ```
 997  Not a verbatim area.
 998  The marks must be at the line beginning,
 999  no leading spaces.
1000  ```
1001</p>
1002<a id="toc90" name="toc90"></a>
1003<h2>Closing: EOF closes the open block</h2>
1004<pre>
1005The end of the file (EOF) closes
1006the currently open verbatim area.
1007</pre>
1008<p></p>
1009<a id="deflist" name="deflist"></a>
1010<h1 class="section">Definition List</h1>
1011<p>
1012See <a href="#list">List</a>, the same rules apply.
1013</p>
1014<a id="numlist" name="numlist"></a>
1015<h1 class="section">Numbered List</h1>
1016<p>
1017See <a href="#list">List</a>, the same rules apply.
1018</p>
1019<a id="list" name="list"></a>
1020<h1 class="section">List</h1>
1021<a id="toc94" name="toc94"></a>
1022<h2>Items: Prefixed by hyphen</h2>
1023<ul>
1024<li>Use the hyphen to prefix list items.
1025</li>
1026<li>There must be one space after the hyphen.
1027</li>
1028<li>The list is closed by two consecutive blank lines.
1029</li>
1030</ul>
1031
1032<a id="toc95" name="toc95"></a>
1033<h2>Items: Free leading spacing (indentation)</h2>
1034     <ul>
1035     <li>The list can be indented on the source document.
1036     </li>
1037     <li>You can use any number of spaces.
1038     </li>
1039     <li>The result will be the same.
1040     </li>
1041     </ul>
1042
1043<a id="toc96" name="toc96"></a>
1044<h2>Items: Vertical spacing between items</h2>
1045<ul>
1046<li>Let one blank line between the list items.
1047<p></p>
1048</li>
1049<li>It will be maintained on the conversion.
1050<p></p>
1051</li>
1052<li>Some targets don't support this behavior.
1053<p></p>
1054</li>
1055<li>This one was separated by a line with blanks.
1056  You can also put a blank line inside
1057<p></p>
1058  the item contents and it will be preserved.
1059</li>
1060</ul>
1061
1062<a id="toc97" name="toc97"></a>
1063<h2>Items: Exactly ONE space after the hyphen</h2>
1064<p>
1065-This is not a list (no space)
1066</p>
1067<p>
1068-    This is not a list (more than one space)
1069</p>
1070<p>
1071-	This is not a list (a TAB instead the space)
1072</p>
1073<a id="toc98" name="toc98"></a>
1074<h2>Items: Catchy cases</h2>
1075<ul>
1076<li>- This is a list
1077</li>
1078<li>+ This is a list
1079</li>
1080<li>: This is a list
1081</li>
1082</ul>
1083
1084<a id="toc99" name="toc99"></a>
1085<h2>Nesting: Creating sublists</h2>
1086<ul>
1087<li>This is the "mother" list first item.
1088</li>
1089<li>Here is the second, but inside this item,
1090  <ul>
1091  <li>there is a sublist, with its own items.
1092  </li>
1093  <li>Note that the items of the same sublist
1094  </li>
1095  <li>must have the same indentation.
1096    <ul>
1097    <li>And this can go on, opening sublists.
1098      <ul>
1099      <li>Just add leading spaces before the
1100      </li>
1101      <li>hyphen and sublists will be opened.
1102      </li>
1103      <li>The two blank lines closes them all.
1104      </li>
1105      </ul>
1106    </li>
1107    </ul>
1108  </li>
1109  </ul>
1110</li>
1111</ul>
1112
1113<a id="toc100" name="toc100"></a>
1114<h2>Nesting: Free leading spacing (indentation)</h2>
1115<ul>
1116<li>When nesting lists, the additional spaces are free.
1117 <ul>
1118 <li>You can add just one,
1119        <ul>
1120        <li>or many.
1121          <ul>
1122          <li>What matters is to put more than the previous.
1123          </li>
1124          <li>But remember that the other items of the same list
1125          </li>
1126          <li>must use the same indentation.
1127          </li>
1128          </ul>
1129        </li>
1130        </ul>
1131 </li>
1132 </ul>
1133</li>
1134</ul>
1135
1136<a id="toc101" name="toc101"></a>
1137<h2>Nesting: Maximum depth</h2>
1138<ul>
1139<li>There is not a depth limit,
1140  <ul>
1141  <li>you can go deeper and deeper.
1142    <ul>
1143    <li>But some targets may have restrictions.
1144      <ul>
1145      <li>The LaTeX maximum is here, 4 levels.
1146        <ul>
1147        <li>This one and the following sublists
1148          <ul>
1149          <li>are moved up to the level 4
1150            <ul>
1151            <li>when converting to LaTeX.
1152              <ul>
1153              <li>On the other targets,
1154                <ul>
1155                <li>it is just fine
1156                  <ul>
1157                  <li>to have a very deep list.
1158                  </li>
1159                  </ul>
1160                </li>
1161                </ul>
1162              </li>
1163              </ul>
1164            </li>
1165            </ul>
1166          </li>
1167          </ul>
1168        </li>
1169        </ul>
1170      </li>
1171      </ul>
1172    </li>
1173    </ul>
1174  </li>
1175  </ul>
1176</li>
1177</ul>
1178
1179<a id="toc102" name="toc102"></a>
1180<h2>Nesting: Reverse doesn't work</h2>
1181        <ul>
1182        <li>Reverse nesting doesn't work.
1183        </li>
1184        </ul>
1185
1186      <ul>
1187      <li>Because a sublist *must* have a mother list.
1188      </li>
1189      </ul>
1190
1191    <ul>
1192    <li>It's the list concept, not a txt2tags limitation.
1193    </li>
1194    </ul>
1195
1196  <ul>
1197  <li>All this sublists will be bumped to mother lists.
1198  </li>
1199  </ul>
1200
1201<ul>
1202<li>At level 1, like this one.
1203</li>
1204</ul>
1205
1206<a id="toc103" name="toc103"></a>
1207<h2>Nesting: Going deeper and back</h2>
1208<p>
1209When nesting back to an upper level, the previous sublist
1210is automatically closed.
1211</p>
1212<ul>
1213<li>Level 1
1214  <ul>
1215  <li>Level 2
1216    <ul>
1217    <li>Level 3
1218      <ul>
1219      <li>Level 4
1220      </li>
1221      </ul>
1222    </li>
1223    <li>Level 3 -- (closed Level 4)
1224    </li>
1225    </ul>
1226  </li>
1227  <li>Level 2 -- (closed Level 3)
1228  </li>
1229  </ul>
1230</li>
1231<li>Level 1 -- (closed Level 2)
1232</li>
1233</ul>
1234
1235<p>
1236More than one list can be closed when nesting back.
1237</p>
1238<ul>
1239<li>Level 1
1240  <ul>
1241  <li>Level 2
1242    <ul>
1243    <li>Level 3
1244      <ul>
1245      <li>Level 4
1246      </li>
1247      </ul>
1248    </li>
1249    </ul>
1250  </li>
1251  </ul>
1252</li>
1253<li>Level 1 -- (closed Level 4, Level 3 and Level 2)
1254</li>
1255</ul>
1256
1257<a id="toc104" name="toc104"></a>
1258<h2>Nesting: Vertical spacing between lists</h2>
1259<ul>
1260<li>Level 1
1261<p></p>
1262  <ul>
1263  <li>Level 2 -- blank BEFORE and AFTER (in)
1264  <p></p>
1265    <ul>
1266    <li>Level 3
1267      <ul>
1268      <li>Level 4
1269      </li>
1270      </ul>
1271    </li>
1272    <li>Level 3
1273    <p></p>
1274    </li>
1275    </ul>
1276  </li>
1277  <li>Level 2 -- blank BEFORE and AFTER (out)
1278  <p></p>
1279  </li>
1280  </ul>
1281</li>
1282<li>Level 1
1283<p></p>
1284  <ul>
1285  <li>Level 2 -- blank BEFORE (spaces) and AFTER (TAB)
1286  <p></p>
1287    <ul>
1288    <li>Level 3
1289    </li>
1290    </ul>
1291  </li>
1292  </ul>
1293</li>
1294</ul>
1295
1296<a id="toc105" name="toc105"></a>
1297<h2>Nesting: Messing up</h2>
1298<p>
1299Be careful when going back on the nesting,
1300it must be on a valid level! If not, it will
1301be bumped up to the previous valid level.
1302</p>
1303<ul>
1304<li>Level 1
1305    <ul>
1306    <li>Level 2
1307        <ul>
1308        <li>Level 3
1309            <ul>
1310            <li>Level 4
1311            </li>
1312            </ul>
1313        </li>
1314        <li>Level 3.5 ???
1315        </li>
1316        <li>Level 3
1317        </li>
1318        </ul>
1319    </li>
1320    <li>Level 2.5 ???
1321    </li>
1322    <li>Level 2
1323    </li>
1324    </ul>
1325</li>
1326<li>Level 1.5 ???
1327</li>
1328<li>Level 1
1329</li>
1330</ul>
1331
1332<a id="toc106" name="toc106"></a>
1333<h2>Closing: Two (not so) empty lines</h2>
1334<ul>
1335<li>This list is closed by a line with spaces and other with TABs
1336</li>
1337</ul>
1338
1339<ul>
1340<li>This list is NOT closed by two comment lines
1341</li>
1342<li>This list is closed by a line with spaces and TAB,
1343</li>
1344<li>then a comment line, then an empty line.
1345</li>
1346</ul>
1347
1348<a id="toc107" name="toc107"></a>
1349<h2>Closing: Empty item closes current (sub)list</h2>
1350<p>
1351The two blank lines closes ALL the lists.
1352To close just the current, use an empty item.
1353</p>
1354<ul>
1355<li>Level 1
1356  <ul>
1357  <li>Level 2
1358    <ul>
1359    <li>Level 3
1360    </li>
1361    </ul>
1362    Level 2
1363  </li>
1364  </ul>
1365  Level 1
1366</li>
1367</ul>
1368
1369<p></p>
1370<p>
1371The empty item can have trailing blanks.
1372</p>
1373<ul>
1374<li>Empty item with trailing spaces.
1375</li>
1376</ul>
1377
1378<p></p>
1379<ul>
1380<li>Empty item with trailing TAB.
1381</li>
1382</ul>
1383
1384<p></p>
1385<a id="toc108" name="toc108"></a>
1386<h2>Closing: EOF closes the lists</h2>
1387<ul>
1388<li>If the end of the file (EOF) is hit,
1389  <ul>
1390  <li>all the currently opened list are closed,
1391    <ul>
1392    <li>just like when using the two blank lines.
1393    </li>
1394    </ul>
1395  </li>
1396  </ul>
1397</li>
1398</ul>
1399
1400<a id="table" name="table"></a>
1401<h1 class="section">Table</h1>
1402<a id="toc110" name="toc110"></a>
1403<h2>Syntax: Lines starting with a pipe |</h2>
1404<table>
1405<tr>
1406<td>Cell 1</td>
1407</tr>
1408</table>
1409
1410<a id="toc111" name="toc111"></a>
1411<h2>Syntax: Extra pipes separate cells</h2>
1412<table>
1413<tr>
1414<td>Cell 1</td>
1415<td>Cell 2</td>
1416<td>Cell 3</td>
1417</tr>
1418</table>
1419
1420<a id="toc112" name="toc112"></a>
1421<h2>Syntax: With a trailing pipe, make border</h2>
1422<table border="1">
1423<tr>
1424<td>Cell 1</td>
1425<td>Cell 2</td>
1426<td>Cell 3</td>
1427</tr>
1428</table>
1429
1430<a id="toc113" name="toc113"></a>
1431<h2>Syntax: Table lines starting with double pipe are heading</h2>
1432<table border="1">
1433<tr>
1434<th>Cell 1</th>
1435<th>Cell 2</th>
1436<th>Cell 3</th>
1437</tr>
1438</table>
1439
1440<a id="toc114" name="toc114"></a>
1441<h2>Align: Spaces before the leading pipe centralize the table</h2>
1442<table align="center" border="1">
1443<tr>
1444<td>Cell 1</td>
1445<td>Cell 2</td>
1446<td>Cell 3</td>
1447</tr>
1448</table>
1449
1450<a id="toc115" name="toc115"></a>
1451<h2>Align: Spaces inside the cell denote its alignment</h2>
1452<table align="center" border="1">
1453<tr>
1454<th>Heading</th>
1455<th>Heading</th>
1456<th>Heading</th>
1457</tr>
1458<tr>
1459<td>&lt;-</td>
1460<td align="center">--</td>
1461<td align="right">-&gt;</td>
1462</tr>
1463<tr>
1464<td align="center">--</td>
1465<td align="center">--</td>
1466<td align="center">--</td>
1467</tr>
1468<tr>
1469<td align="right">-&gt;</td>
1470<td align="center">--</td>
1471<td>&lt;-</td>
1472</tr>
1473</table>
1474
1475<a id="toc116" name="toc116"></a>
1476<h2>Span: Column span is defined by extra pipes at cell closing</h2>
1477<table align="center" border="1">
1478<tr>
1479<th>1</th>
1480<th>2</th>
1481<th colspan="2">3+4</th>
1482</tr>
1483<tr>
1484<td align="center">1</td>
1485<td align="center">2</td>
1486<td align="center">3</td>
1487<td align="center">4</td>
1488</tr>
1489<tr>
1490<td align="center" colspan="3">1+2+3</td>
1491<td align="center">4</td>
1492</tr>
1493<tr>
1494<td align="center">1</td>
1495<td align="center" colspan="2">2+3</td>
1496<td align="center">4</td>
1497</tr>
1498<tr>
1499<td align="center" colspan="4">1+2+3+4</td>
1500</tr>
1501</table>
1502
1503<a id="toc117" name="toc117"></a>
1504<h2>Test: Empty cells are placed as expected</h2>
1505<table align="center" border="1">
1506<tr>
1507<td>0</td>
1508<td>1</td>
1509<td>2</td>
1510<td></td>
1511</tr>
1512<tr>
1513<td>4</td>
1514<td>5</td>
1515<td></td>
1516<td>7</td>
1517</tr>
1518<tr>
1519<td>8</td>
1520<td></td>
1521<td>A</td>
1522<td>B</td>
1523</tr>
1524<tr>
1525<td></td>
1526<td>D</td>
1527<td>E</td>
1528<td>F</td>
1529</tr>
1530</table>
1531
1532<a id="toc118" name="toc118"></a>
1533<h2>Test: Lines with different number of cells</h2>
1534<table align="center" border="1">
1535<tr>
1536<td>1</td>
1537</tr>
1538<tr>
1539<td>1</td>
1540<td>2</td>
1541</tr>
1542<tr>
1543<td>1</td>
1544<td>2</td>
1545<td>3</td>
1546</tr>
1547<tr>
1548<td>1</td>
1549<td>2</td>
1550<td>3</td>
1551<td>4</td>
1552</tr>
1553<tr>
1554<td>1</td>
1555<td>2</td>
1556<td>3</td>
1557<td>4</td>
1558<td>5</td>
1559</tr>
1560</table>
1561
1562<a id="toc119" name="toc119"></a>
1563<h2>Test: Empty cells + Span + Messy cell number = Fun!</h2>
1564<table align="center" border="1">
1565<tr>
1566<td align="right">Jan</td>
1567</tr>
1568<tr>
1569<td align="right" colspan="2">Fev</td>
1570</tr>
1571<tr>
1572<td align="right" colspan="3">Mar</td>
1573</tr>
1574<tr>
1575<td align="right" colspan="4">Apr</td>
1576</tr>
1577<tr>
1578<td align="right" colspan="5">May</td>
1579</tr>
1580<tr>
1581<td align="center">20%</td>
1582<td align="center">40%</td>
1583<td align="center">60%</td>
1584<td align="center">80%</td>
1585<td align="center">100%</td>
1586</tr>
1587</table>
1588
1589<table align="center" border="1">
1590<tr>
1591<td></td>
1592<td></td>
1593<td align="center">/</td>
1594<td></td>
1595<td></td>
1596</tr>
1597<tr>
1598<td></td>
1599<td align="center" colspan="3">/ / / / /</td>
1600<td></td>
1601</tr>
1602<tr>
1603<td align="center" colspan="5">/ / / / / / / / /</td>
1604</tr>
1605<tr>
1606<td></td>
1607<td align="center">o</td>
1608<td></td>
1609<td align="center">o</td>
1610<td></td>
1611</tr>
1612<tr>
1613<td></td>
1614<td></td>
1615<td align="right">.</td>
1616<td></td>
1617<td></td>
1618</tr>
1619<tr>
1620<td></td>
1621<td align="center" colspan="3">= = = =</td>
1622<td></td>
1623</tr>
1624</table>
1625
1626<table align="center" border="1">
1627<tr>
1628<td>01</td>
1629<td>02</td>
1630<td></td>
1631<td></td>
1632<td>05</td>
1633<td></td>
1634<td>07</td>
1635<td></td>
1636</tr>
1637<tr>
1638<td></td>
1639<td></td>
1640<td>11</td>
1641<td></td>
1642<td>13</td>
1643<td></td>
1644<td></td>
1645<td>16</td>
1646</tr>
1647<tr>
1648<td>17</td>
1649<td></td>
1650<td>19</td>
1651<td>20</td>
1652<td></td>
1653<td></td>
1654<td>23</td>
1655<td></td>
1656</tr>
1657<tr>
1658<td>25</td>
1659<td>26</td>
1660<td></td>
1661<td></td>
1662<td>29</td>
1663<td>30</td>
1664<td></td>
1665<td>32</td>
1666</tr>
1667<tr>
1668<td></td>
1669<td></td>
1670<td>35</td>
1671<td></td>
1672<td>37</td>
1673<td></td>
1674<td>39</td>
1675<td>40</td>
1676</tr>
1677</table>
1678
1679<a id="toc120" name="toc120"></a>
1680<h2>Test: Lots of cells at the same line</h2>
1681<table border="1">
1682<tr>
1683<td>0</td>
1684<td>1</td>
1685<td>2</td>
1686<td>3</td>
1687<td>4</td>
1688<td>5</td>
1689<td>6</td>
1690<td>7</td>
1691<td>8</td>
1692<td>9</td>
1693<td>A</td>
1694<td>B</td>
1695<td>C</td>
1696<td>D</td>
1697<td>E</td>
1698<td>F</td>
1699<td>0</td>
1700<td>1</td>
1701<td>2</td>
1702<td>3</td>
1703<td>4</td>
1704<td>5</td>
1705<td>6</td>
1706<td>7</td>
1707<td>8</td>
1708<td>9</td>
1709<td>A</td>
1710<td>B</td>
1711<td>C</td>
1712<td>D</td>
1713<td>E</td>
1714<td>F</td>
1715</tr>
1716</table>
1717
1718<a id="toc121" name="toc121"></a>
1719<h2>Test: Empty lines</h2>
1720<table border="1">
1721<tr>
1722<td></td>
1723</tr>
1724<tr>
1725<td></td>
1726</tr>
1727<tr>
1728<td></td>
1729</tr>
1730</table>
1731
1732<a id="toc122" name="toc122"></a>
1733<h2>Invalid: There must be at least one space around the pipe</h2>
1734<p>
1735|this|is|not|a|table|
1736</p>
1737<p>
1738|this| is| not| a| table|
1739</p>
1740<p>
1741|this |is |not |a |table |
1742</p>
1743<a id="toc123" name="toc123"></a>
1744<h2>Invalid: You must use spaces, not TABs</h2>
1745<p>
1746|	this	|	is	|	not	|	a	|	table	|
1747</p>
1748<hr class="light" />
1749<p></p>
1750<p>
1751The End.
1752</p>
1753</div>
1754
1755<!-- xhtml code generated by txt2tags (http://txt2tags.org) -->
1756<!-- cmdline: txt2tags /a/pessoal/sourceforge.net/txt2tags/src/doc/English/rules/rules.t2t -->
1757</body></html>