---
in: |
  |a|b|c|
  |1|2|3|
  
  h3. A header after the table
html: |-
  <table>
  	<tr>
  		<td>a</td>
  		<td>b</td>
  		<td>c</td>
  	</tr>
  	<tr>
  		<td>1</td>
  		<td>2</td>
  		<td>3</td>
  	</tr>
  </table>
  <h3>A header after the table</h3>
latex: |+
  \begin{table}
    \centering
    \begin{tabular}{ l l l }
      a & b & c \\
      1 & 2 & 3 \\
    \end{tabular}
  \end{table}
  \subsubsection{A header after the table}
  
---
in: |
  |_. a|_. b|_. c|
  |1|2|3|
html: |-
  <table>
  	<tr>
  		<th>a</th>
  		<th>b</th>
  		<th>c</th>
  	</tr>
  	<tr>
  		<td>1</td>
  		<td>2</td>
  		<td>3</td>
  	</tr>
  </table>
---
in: |-
  |This|is|a|simple|table|
  |This|is|a|simple|row|
html: |-
  <table>
  	<tr>
  		<td>This</td>
  		<td>is</td>
  		<td>a</td>
  		<td>simple</td>
  		<td>table</td>
  	</tr>
  	<tr>
  		<td>This</td>
  		<td>is</td>
  		<td>a</td>
  		<td>simple</td>
  		<td>row</td>
  	</tr>
  </table>
latex: |+
  \begin{table}
    \centering
    \begin{tabular}{ l l l l l }
      This & is & a & simple & table \\
      This & is & a & simple & row \\
    \end{tabular}
  \end{table}
---
in: |-
  table{border:1px solid black}.
  |This|is|a|row|
  |This|is|a|row|
html: |-
  <table style="border:1px solid black;">
  	<tr>
  		<td>This</td>
  		<td>is</td>
  		<td>a</td>
  		<td>row</td>
  	</tr>
  	<tr>
  		<td>This</td>
  		<td>is</td>
  		<td>a</td>
  		<td>row</td>
  	</tr>
  </table>
---
in: '{background:#ddd}. |This|is|a|row|'
html: |-
  <table>
  	<tr style="background:#ddd;">
  		<td>This</td>
  		<td>is</td>
  		<td>a</td>
  		<td>row</td>
  	</tr>
  </table>
---
in: |-
  |a|b|c|
  | |2|3|
html: |-
  <table>
  	<tr>
  		<td>a</td>
  		<td>b</td>
  		<td>c</td>
  	</tr>
  	<tr>
  		<td> </td>
  		<td>2</td>
  		<td>3</td>
  	</tr>
  </table>
---
in: |-
  table{width: 200px; border:2px solid gray;}.
  |_=. Alignment|
  |=. centered|
  |=(. a bit right|
  |=). a bit left|
  |>). almost right|
  |<(. almost left|
  |>. right|
  |<. left|
html: |-
  <table style="width: 200px; border:2px solid gray;">
  	<tr>
  		<th style="text-align:center;">Alignment</th>
  	</tr>
  	<tr>
  		<td style="text-align:center;">centered</td>
  	</tr>
  	<tr>
  		<td style="padding-left:1em;text-align:center;">a bit right</td>
  	</tr>
  	<tr>
  		<td style="padding-right:1em;text-align:center;">a bit left</td>
  	</tr>
  	<tr>
  		<td style="padding-right:1em;text-align:right;">almost right</td>
  	</tr>
  	<tr>
  		<td style="padding-left:1em;text-align:left;">almost left</td>
  	</tr>
  	<tr>
  		<td style="text-align:right;">right</td>
  	</tr>
  	<tr>
  		<td style="text-align:left;">left</td>
  	</tr>
  </table>
---
in: |-
  |{background:#ddd}. Cell with gray background|Normal cell|
  |\2. Cell spanning 2 columns|
  |/2. Cell spanning 2 rows|one|
  |two|
  |>. Right-aligned cell|<. Left-aligned cell|
html: |-
  <table>
  	<tr>
  		<td style="background:#ddd;">Cell with gray background</td>
  		<td>Normal cell</td>
  	</tr>
  	<tr>
  		<td colspan="2">Cell spanning 2 columns</td>
  	</tr>
  	<tr>
  		<td rowspan="2">Cell spanning 2 rows</td>
  		<td>one</td>
  	</tr>
  	<tr>
  		<td>two</td>
  	</tr>
  	<tr>
  		<td style="text-align:right;">Right-aligned cell</td>
  		<td style="text-align:left;">Left-aligned cell</td>
  	</tr>
  </table>
latex: |+
  \begin{table}
    \centering
    \begin{tabular}{ l l }
      Cell with gray background & Normal cell \\
      \multicolumn{2}{ l l }{Cell spanning 2 columns} \\
      \multirow{2}{*}{Cell spanning 2 rows} & one \\
       & two \\
      Right-aligned cell & Left-aligned cell \\
    \end{tabular}
  \end{table}
---
name: row spanning mid-row
in: |-
  |1|2|3|
  |1|/3. 2|3|
  |1|3|
  |1|3|
  |1|2|3|
html: |-
  <table>
  	<tr>
  		<td>1</td>
  		<td>2</td>
  		<td>3</td>
  	</tr>
  	<tr>
  		<td>1</td>
  		<td rowspan="3">2</td>
  		<td>3</td>
  	</tr>
  	<tr>
  		<td>1</td>
  		<td>3</td>
  	</tr>
  	<tr>
  		<td>1</td>
  		<td>3</td>
  	</tr>
  	<tr>
  		<td>1</td>
  		<td>2</td>
  		<td>3</td>
  	</tr>
  </table>
latex: |+
  \begin{table}
    \centering
    \begin{tabular}{ l l l }
      1 & 2 & 3 \\
      1 & \multirow{3}{*}{2} & 3 \\
      1 &  & 3 \\
      1 &  & 3 \\
      1 & 2 & 3 \\
    \end{tabular}
  \end{table}
---
in: |
  {background:#ddd}. |S|Target|Complete|App|Milestone|
  |!/i/g.gif!|11/29/04|11/29/04|011|XML spec complete (KH is on schedule)|
  |!/i/g.gif!|11/22/04|11/22/04|070|Dialog pass 1 builds an index file|
  |!/i/g.gif!|11/24/04|11/24/04|070|Dialog pass 2 98% complete|
  |!/i/g.gif!|11/30/04|11/30/04|070|Feature complete. Passes end-to-end smoke test.|
  |!/i/w.gif!|12/02/04| |011|Dialog pass 1 and 2 complete (98+%)|
  |!/i/w.gif!|12/03/04| |081|Feature complete|
html: |-
  <table>
  	<tr style="background:#ddd;">
  		<td>S</td>
  		<td>Target</td>
  		<td>Complete</td>
  		<td>App</td>
  		<td>Milestone</td>
  	</tr>
  	<tr>
  		<td><img src="/i/g.gif" alt="" /></td>
  		<td>11/29/04</td>
  		<td>11/29/04</td>
  		<td>011</td>
  		<td><span class="caps">XML</span> spec complete (KH is on schedule)</td>
  	</tr>
  	<tr>
  		<td><img src="/i/g.gif" alt="" /></td>
  		<td>11/22/04</td>
  		<td>11/22/04</td>
  		<td>070</td>
  		<td>Dialog pass 1 builds an index file</td>
  	</tr>
  	<tr>
  		<td><img src="/i/g.gif" alt="" /></td>
  		<td>11/24/04</td>
  		<td>11/24/04</td>
  		<td>070</td>
  		<td>Dialog pass 2 98% complete</td>
  	</tr>
  	<tr>
  		<td><img src="/i/g.gif" alt="" /></td>
  		<td>11/30/04</td>
  		<td>11/30/04</td>
  		<td>070</td>
  		<td>Feature complete. Passes end-to-end smoke test.</td>
  	</tr>
  	<tr>
  		<td><img src="/i/w.gif" alt="" /></td>
  		<td>12/02/04</td>
  		<td> </td>
  		<td>011</td>
  		<td>Dialog pass 1 and 2 complete (98+%)</td>
  	</tr>
  	<tr>
  		<td><img src="/i/w.gif" alt="" /></td>
  		<td>12/03/04</td>
  		<td> </td>
  		<td>081</td>
  		<td>Feature complete</td>
  	</tr>
  </table>
---
name: combined table header and colspan
in: |-
  table(my_class).
  |_\2. a |_. b |_. c |
  | 1 | 2 | 3 | 4 |
html: |-
  <table class="my_class">
  	<tr>
  		<th colspan="2">a </th>
  		<th>b </th>
  		<th>c </th>
  	</tr>
  	<tr>
  		<td> 1 </td>
  		<td> 2 </td>
  		<td> 3 </td>
  		<td> 4 </td>
  	</tr>
  </table>
---
name: two adjacent tables
in: |-
  |a|b|c|
  
  |1|2|3|
html: |-
  <table>
  	<tr>
  		<td>a</td>
  		<td>b</td>
  		<td>c</td>
  	</tr>
  </table>
  <table>
  	<tr>
  		<td>1</td>
  		<td>2</td>
  		<td>3</td>
  	</tr>
  </table>
---
name: with cell attributes
in: "|[en]. lang-ok|{color:red;}. style-ok|(myclass). class-ok|"
html: |-
  <table>
  	<tr>
  		<td lang="en">lang-ok</td>
  		<td style="color:red;">style-ok</td>
  		<td class="myclass">class-ok</td>
  	</tr>
  </table>
---
name: with improper cell attributes
in: "|[en]lang-bad|{color:red;}style-bad|(myclass)class-bad|"
html: |-
  <table>
  	<tr>
  		<td>[en]lang-bad</td>
  		<td>{color:red;}style-bad</td>
  		<td>(myclass)class-bad</td>
  	</tr>
  </table>
---
name: with line breaks in the cell
in: |-
  |a|b
  b|
  |c
  c|d|
html: |-
  <table>
  	<tr>
  		<td>a</td>
  		<td>b<br />
  b</td>
  	</tr>
  	<tr>
  		<td>c<br />
  c</td>
  		<td>d</td>
  	</tr>
  </table>
---
name: with missing cells
desc: This is improper formatting, so as long as it doesn't choke, I don't care how it is handled
in: |-
  |a|b|
  |a|
  |a|b|
html: |-
  <table>
  	<tr>
  		<td>a</td>
  		<td>b</td>
  	</tr>
  	<tr>
  		<td>a</td>
  	</tr>
  	<tr>
  		<td>a</td>
  		<td>b</td>
  	</tr>
  </table>
---
name: with empty cells
desc: cells can be empty. Textile2 skips empties, but we don't want to do that.
in: |-
  ||b|
  |a||
  |a| |
html: |-
  <table>
  	<tr>
  		<td></td>
  		<td>b</td>
  	</tr>
  	<tr>
  		<td>a</td>
  		<td></td>
  	</tr>
  	<tr>
  		<td>a</td>
  		<td> </td>
  	</tr>
  </table>
  
