Skip to content

Commit

Permalink
Update tables_symbols_math.adoc
Browse files Browse the repository at this point in the history
Adding header info

Signed-off-by: Kersten Richter <[email protected]>
  • Loading branch information
kersten1 authored May 8, 2024
1 parent b21cec6 commit 83aa561
Showing 1 changed file with 63 additions and 3 deletions.
66 changes: 63 additions & 3 deletions src/tables_symbols_math.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Asciidoc makes standard tables easy and also supports the creation of complex ta

=== Simple table

The following example shows a simple table with 2 rows and 2 columns. To indicate a new row, put a empty line between them.

[source]
----
[cols="1,1"]
Expand All @@ -33,10 +35,68 @@ Results in the following table.
|Cell in column 2, row 2
|===

=== Adding table headers

Headers can add additional information to your table, making them easier to understand.

You can add a header row by adding the first row of cells directly in a line.

----
[cols="1,1,1"]
|===
|Col 1, header row|Col 2, header row|Col 3, header row
|Cell in col 1, row 2
|Cell in col 2, row 2
|Cell in col 3, row 2
|===
----

Or you can use the `header` option.

----
[%header,cols="1,1,1"]
|===
|Col 1, header row
|Col 2, header row
|Col 3, header row
|Cell in col 1, row 2
|Cell in col 2, row 2
|Cell in col 3, row 2
|===
----

Either table renders with table headers.

One line
[cols="1,1,1"]
|===
|Col 1, header row|Col 2, header row|Col 3, header row

|Cell in col 1, row 2
|Cell in col 2, row 2
|Cell in col 3, row 2
|===


Headers option table

[%header,cols="1,1,1"]
|===
|Col 1, header row
|Col 2, header row
|Col 3, header row

|Cell in col 1, row 2
|Cell in col 2, row 2
|Cell in col 3, row 2
|===


=== More on examples
=== Asciidoc tables from CSV data.

AsciiDoc tables can also be created directly from CSV data. Just set the format block attribute to CSV and insert CSV data inside the block delimiters directly:
AsciiDoc tables can also be created directly from CSV data. Set the format block attribute to `csv` and insert the data inside the block delimiters directly:

[source,adoc]
----
Expand All @@ -48,7 +108,7 @@ The Lumineers,Ho Hey,Folk Rock
|===
----

The above renders as follows:
The previous example renders as follows:

[%header,format=csv]
|===
Expand Down

0 comments on commit 83aa561

Please sign in to comment.