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