Skip to content

Latest commit

 

History

History
280 lines (193 loc) · 3.95 KB

tables.adoc

File metadata and controls

280 lines (193 loc) · 3.95 KB

Asciidoc Tables Examples

Striped Table

A1

B1

C1

A2

B2

C2

A3

B3

C3

Nested Table

Col 1 Col 2

Cell 1.1

Cell 1.2

Cell 2.1

Cell 2.2

Col1 Col2

C11

C12

Header Row: Defined

Name of Column 1 Name of Column 2

Cell in column 1, row 1

Cell in column 2, row 1

Cell in column 1, row 2

Cell in column 2, row 2

Header Row: Implicit

Name of Column 1 Name of Column 2

Cell in column 1, row 1

Cell in column 2, row 1

Cell in column 1, row 2

Cell in column 2, row 2

Table Width: Constrained to 75%

Name of Column 1 Name of Column 2 Name of Column 3

Cell in column 1, row 1

Cell in column 2, row 1

Cell in column 3, row 1

Cell in column 1, row 2

Cell in column 2, row 2

Cell in column 3, row 2

Table Width: Auto

Name of Column 1 Name of Column 2 Name of Column 3

Cell in column 1, row 1

Cell in column 2, row 1

Cell in column 3, row 1

Cell in column 1, row 2

Cell in column 2, row 2

Cell in column 3, row 2

Table Width: Full-width, Auto

Name of Column 1 Name of Column 2 Name of Column 3

Cell in column 1, row 1

Cell in column 2, row 1

Cell in column 3, row 1

Cell in column 1, row 2

Cell in column 2, row 2

Cell in column 3, row 2

Table Frame: Top and Bottom

Name of Column 1 Name of Column 2 Name of Column 3

Cell in column 1, row 1

Cell in column 2, row 1

Cell in column 3, row 1

Cell in column 1, row 2

Cell in column 2, row 2

Cell in column 3, row 2

Table Frame: Sides

Name of Column 1 Name of Column 2 Name of Column 3

Cell in column 1, row 1

Cell in column 2, row 1

Cell in column 3, row 1

Cell in column 1, row 2

Cell in column 2, row 2

Cell in column 3, row 2

Table Frame: None

Name of Column 1 Name of Column 2 Name of Column 3

Cell in column 1, row 1

Cell in column 2, row 1

Cell in column 3, row 1

Cell in column 1, row 2

Cell in column 2, row 2

Cell in column 3, row 2

Table Caption (part of TOC autogeneration)

Table A. A formal table
Name of Column 1 Name of Column 2

Cell in column 1, row 1

Cell in column 2, row 1

Cell in column 1, row 2

Cell in column 2, row 2

Table: Delimiter-Separated Values

CSV

Artist Track Genre

Baauer

Harlem Shake

Hip Hop

The Lumineers

Ho Hey

Folk Rock

TSV

Artist Track Genre

Robyn

Indestructable

Dance

The Piano Guys

Code Name Vivaldi

Classical

DSV

Artist Track Genre

Robyn

Indestructable

Dance

The Piano Guys

Code Name Vivaldi

Classical

Table: Shorthand Notation for Data Tables

CSV

Artist Track Genre

Baauer

Harlem Shake

Hip Hop

DSV

Artist Track Genre

Robyn

Indestructable

Dance

Styling Columns and Cells in Tables

We can use either the cols attribute to define a style for a whole column or specify per cell the style, using the following styles:

  • e: emphasized

  • a: Asciidoc markup

  • m: monospace

  • h: header style, all column values are styled as header

  • s: strong

  • l: literal, text is shown in monospace font and line breaks are kept

  • d: default

  • v: verse, keeps line breaks

Table 1. Table with column style e,a,m
Emphasized (e) Asciidoc (a) Monospaced (m)

Asciidoctor

Note
Awesome way to write documentation

It is just code

Table 2. Table with column style h,s,l
Header (h) Strong (s) Literal (l)

Asciidoctor

Awesome way to write documentation

 It is
just code
Table 3. Table with column style d,v
Default (d) Verse (v)

Asciidoctor

Awesome way to write documentation