CTAN Comprehensive TeX Archive Network

CTAN Markdown: Tables

The typesetting of tables can be accomplished simply by drawing the tables with bars surrounding the cells and dashes for separating the headline from the body. The dashed separation is required for a table for being recognized. Leading and trailing whitespace is ignoed in the separating line. At least one dash has to occur for each cell.

| head 1 | head 2 |
|  ----  |  ----  |
|  123   |   456  |
|  7     |    8   |  
head 1 head 2
123 456
7 8

The outer bars are optional as long as the table has at least two columns.

head 1 | head 2 
 ----  |  ----  
 123   |   456    
head 1 head 2
123 456

The bars do not have to be properly aligned in the same column. This can be done purely for estethical reasons.

Alignnment of Columns

Usually the columns are aligned to whatever the default of the browser is. YOu can control the alignment by placing a colon at the beginning or end of the separating format line.

:---
A colon only at the left end indicates left alignment of this column.
---:
A colon only at the right end indicates right alignment of this column.
:---:
A colon at both ends means centering of this column.
| head 1 | head 2 | head 3 |
|:------:|-------:|:-------|
|centered|   right|left    |
|  cell  |    cell|cell    |  
head 1 head 2 head 3
centered right left
cell cell cell

CTAN Markdown

CTAN Markdown Tester

The result of the markdown can interactively be tested with our

Markdown Tester
Guest Book Sitemap Contact Contact Author