CTAN
Comprehensive TeX Archive Network

CTAN Mark­down: Tables

The type­set­ting of ta­bles can be ac­com­plished sim­ply by draw­ing the ta­bles with bars sur­round­ing the cells and dashes for sep­a­rat­ing the head­line from the body. The dashed sep­a­ra­tion is re­quired for a ta­ble for be­ing rec­og­nized. Lead­ing and trail­ing whites­pace is ig­noed in the sep­a­rat­ing line. At least one dash has to oc­cur for each cell.

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

The outer bars are op­tional as long as the ta­ble has at least two columns.

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

The bars do not have to be prop­erly aligned in the same col­umn. This can be done purely for es­teth­i­cal rea­sons.

Align­n­ment of Columns

Usu­ally the columns are aligned to what­ever the de­fault of the browser is. YOu can con­trol the align­ment by plac­ing a colon at the be­gin­ning or end of the sep­a­rat­ing for­mat line.

:---
A colon only at the left end in­di­cates left align­ment of this col­umn.
---:
A colon only at the right end in­di­cates right align­ment of this col­umn.
:---:
A colon at both ends means cen­ter­ing of this col­umn.
| head 1 | head 2 | head 3 |
|:------:|-------:|:-------|
|centered|   right|left    |
|  cell  |    cell|cell    |  
head 1 head 2 head 3
cen­tered right left
cell cell cell

CTAN Mark­down

CTAN Mark­down Tester

The re­sult of the mark­down can in­ter­ac­tively be tested with our

Mark­down Tester
Guest Book Sitemap Contact Contact Author