Login  Register

Re: +1 Re: Table include macro - tab-delimited files

Posted by mojavelinux on Oct 28, 2018; 10:54pm
URL: https://discuss.asciidoctor.org/Table-include-macro-tab-delimited-files-tp5374p6558.html

To my knowledge, the only way to have a newline in a table cell sourced from TSV data is to enclose the value in quotes.

Cheers,

-Dan

On Tue, Aug 15, 2017 at 7:44 AM sturt [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi Dan,

Thank you for responding so quickly.

When including a TSV file, how could we force a new row (not only a new cell) at the end of a data line?

INTENT:
My specific intent was to have the tsv included without modification, no wrap, in monospace, with the columns lining up, looking like a formatted datafile, not a gridded table .

SOLUTION:
My final literal include below gave: monospace formatting, not lined up, without modification, which was sufficient for this dataset.
----
include::{datadir}data-7-cols-last-col-empty.txt[]
----

WORKING AS DESIGNED:
The cause of my original comment in this thread was my data.
It had an empty ending column, which therefore ended in a tab, making a "ragged table".

Therefore AsciiDoc is working as described in http://asciidoctor.org/docs/user-manual/#csv-and-tsv

The tsv include below works if I have "" as the last cell value of the data line, which I'll use in other circumstances.

[%header, format=tsv]
|===
include::{datadir}data-7-cols-empty-cells-as-double-quotes.txt[]
|===

Thanks again for your previous response and great work on AsciiDoc.

Best regards, Sturt.







If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Table-include-macro-tab-delimited-files-tp5374p5848.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux