In a previous post we learned how to use data in CSV and DSV format.
Recently we can also include tab separated values (TSV) in a Asciidoctor table.
We must set the table attribute
format to the value
The data can be inside the document, but also defined in an external file which we add with the
In the following example markup we have a table with inline tab separated values. A second table includes an external file with tab delimited values:
= Tables Using the `format` attribute value `tsv` we can use tab-delimited data for table data. == TSV table [format=tsv, options="header"] |=== Writing tools Awesomeness Asciidoctor Oh yeah! MS Word No! |=== == Table with external data // We have an external file with // tab-delimited values. [%header,format=tsv] |=== Unresolved directive in
- include::tools.tsv |===
When we convert our Asciidoctor markup to HTML we get the following result:
Written with Asciidoctor 220.127.116.11.