/test/target/ok/table.rst

http://txt2tags.googlecode.com/ · ReStructuredText · 280 lines · 220 code · 60 blank · 0 comment · 0 complexity · 3a52775f73552e8fdb31e390fd777744 MD5 · raw file

  1. ************
  2. Simple table
  3. ************
  4. ========== ========== ==========
  5. Cell 1-1 Cell 1-2 Cell 1-3
  6. Cell 2-1 Cell 2-2 Cell 2-3
  7. Cell 3-1 Cell 3-2 Cell 3-3
  8. ========== ========== ==========
  9. *********************
  10. Simple table + border
  11. *********************
  12. +----------+----------+----------+
  13. | Cell 1-1 | Cell 1-2 | Cell 1-3 |
  14. +----------+----------+----------+
  15. | Cell 2-1 | Cell 2-2 | Cell 2-3 |
  16. +----------+----------+----------+
  17. | Cell 3-1 | Cell 3-2 | Cell 3-3 |
  18. +----------+----------+----------+
  19. **********************
  20. Simple table + heading
  21. **********************
  22. ========== ========== ==========
  23. Head 1-1 Head 1-2 Head 1-3
  24. ========== ========== ==========
  25. Cell 1-1 Cell 1-2 Cell 1-3
  26. Cell 2-1 Cell 2-2 Cell 2-3
  27. Cell 3-1 Cell 3-2 Cell 3-3
  28. ========== ========== ==========
  29. *******************************
  30. Simple table + heading + border
  31. *******************************
  32. +----------+----------+----------+
  33. | Head 1-1 | Head 1-2 | Head 1-3 |
  34. +==========+==========+==========+
  35. | Cell 1-1 | Cell 1-2 | Cell 1-3 |
  36. +----------+----------+----------+
  37. | Cell 2-1 | Cell 2-2 | Cell 2-3 |
  38. +----------+----------+----------+
  39. | Cell 3-1 | Cell 3-2 | Cell 3-3 |
  40. +----------+----------+----------+
  41. ****************************************
  42. Simple table + heading + border + footer
  43. ****************************************
  44. +----------+----------+----------+
  45. | Head 1-1 | Head 1-2 | Head 1-3 |
  46. +==========+==========+==========+
  47. | Cell 1-1 | Cell 1-2 | Cell 1-3 |
  48. +----------+----------+----------+
  49. | Cell 2-1 | Cell 2-2 | Cell 2-3 |
  50. +----------+----------+----------+
  51. | Cell 3-1 | Cell 3-2 | Cell 3-3 |
  52. +----------+----------+----------+
  53. | Foot 1-1 | Foot 1-2 | Foot 1-3 |
  54. +----------+----------+----------+
  55. *********************************************
  56. Simple table + heading + border + centralized
  57. *********************************************
  58. +----------+----------+----------+
  59. | Head 1-1 | Head 1-2 | Head 1-3 |
  60. +==========+==========+==========+
  61. | Cell 1-1 | Cell 1-2 | Cell 1-3 |
  62. +----------+----------+----------+
  63. | Cell 2-1 | Cell 2-2 | Cell 2-3 |
  64. +----------+----------+----------+
  65. | Cell 3-1 | Cell 3-2 | Cell 3-3 |
  66. +----------+----------+----------+
  67. **************
  68. Cell alignment
  69. **************
  70. +---------+---------+
  71. | ======= | ======= |
  72. +---------+---------+
  73. | < | > |
  74. +---------+---------+
  75. | = | = |
  76. +---------+---------+
  77. | > | < |
  78. +---------+---------+
  79. *****************
  80. Heading alignment
  81. *****************
  82. +---------+---------+
  83. | ======= | ======= |
  84. +=========+=========+
  85. | < | > |
  86. +---------+---------+
  87. | = | = |
  88. +---------+---------+
  89. | > | < |
  90. +---------+---------+
  91. *********************
  92. Column span for cells
  93. *********************
  94. +---+---+---+---+
  95. | 1 | 2 | 3 | 4 |
  96. +---+---+---+---+
  97. | 1 | 2 | 3 + 4 |
  98. +---+---+---+---+
  99. | 1 + 2 + 3 | 4 |
  100. +---+---+---+---+
  101. | 1 | 2 + 3 | 4 |
  102. +---+---+---+---+
  103. | 1 + 2 + 3 + 4 |
  104. +---+---+---+---+
  105. ************************
  106. Column span for headings
  107. ************************
  108. +---+---+---+---+
  109. | 1 | 2 | 3 | 4 |
  110. +===+===+===+===+
  111. | 1 | 2 | 3 + 4 |
  112. +---+---+---+---+
  113. | 1 + 2 + 3 | 4 |
  114. +---+---+---+---+
  115. | 1 | 2 + 3 | 4 |
  116. +---+---+---+---+
  117. | 1 + 2 + 3 + 4 |
  118. +---+---+---+---+
  119. ****************************
  120. Cell alignment + column span
  121. ****************************
  122. +---------+---------+---------+
  123. | ======= | ======= | ======= |
  124. +---------+---------+---------+
  125. | < | = |
  126. +---------+---------+---------+
  127. | = |
  128. +---------+---------+---------+
  129. | = | > |
  130. +---------+---------+---------+
  131. *******************************
  132. Heading alignment + column span
  133. *******************************
  134. +---------+---------+---------+
  135. | ======= | ======= | ======= |
  136. +=========+=========+=========+
  137. | < | = |
  138. +---------+---------+---------+
  139. | = |
  140. +---------+---------+---------+
  141. | = | > |
  142. +---------+---------+---------+
  143. ****************
  144. Some empty cells
  145. ****************
  146. +---+---+---+---+---+
  147. | A | B | C | D | |
  148. +---+---+---+---+---+
  149. | F | G | H | | J |
  150. +---+---+---+---+---+
  151. | K | L | | N | O |
  152. +---+---+---+---+---+
  153. | P | | R | S | T |
  154. +---+---+---+---+---+
  155. | | V | W | X | Y |
  156. +---+---+---+---+---+
  157. **********************************************
  158. Lines with different number of cells, increase
  159. **********************************************
  160. +---+---+---+---+---+
  161. | 1 | | | | |
  162. +---+---+---+---+---+
  163. | 1 | 2 | | | |
  164. +---+---+---+---+---+
  165. | 1 | 2 | 3 | | |
  166. +---+---+---+---+---+
  167. | 1 | 2 | 3 | 4 | |
  168. +---+---+---+---+---+
  169. | 1 | 2 | 3 | 4 | 5 |
  170. +---+---+---+---+---+
  171. **********************************************
  172. Lines with different number of cells, decrease
  173. **********************************************
  174. +---+---+---+---+---+
  175. | 1 | 2 | 3 | 4 | 5 |
  176. +---+---+---+---+---+
  177. | 1 | 2 | 3 | 4 | |
  178. +---+---+---+---+---+
  179. | 1 | 2 | 3 | | |
  180. +---+---+---+---+---+
  181. | 1 | 2 | | | |
  182. +---+---+---+---+---+
  183. | 1 | | | | |
  184. +---+---+---+---+---+
  185. **************
  186. One cell table
  187. **************
  188. ========
  189. Cell 1
  190. ========
  191. ***********************
  192. One cell table + border
  193. ***********************
  194. +--------+
  195. | Cell 1 |
  196. +--------+
  197. ************************
  198. One cell table + heading
  199. ************************
  200. ========
  201. Head 1
  202. ========
  203. *********************************
  204. One cell table + heading + border
  205. *********************************
  206. +--------+
  207. | Head 1 |
  208. +--------+
  209. ***********
  210. Empty lines
  211. ***********
  212. +---+
  213. | |
  214. +---+
  215. | |
  216. +---+
  217. | |
  218. +---+
  219. .. rst code generated by txt2tags (http://txt2tags.org)
  220. .. cmdline: txt2tags -q --no-rc -i table.t2t -t rst