Posted by
brianrepko on
Mar 14, 2017; 1:21pm
URL: https://discuss.asciidoctor.org/Table-include-macro-tab-delimited-files-tp5374p5376.html
Hi Dan,
Thanks for the quick reply. A ticket for allowing `\t` as separator would be great.
In addition, I think a ticket for an include macro option to preserve tabs is also
needed. Tabs are troublesome in regular editors - in order to do what you have
in the gist. However, they are quite common for external example data files
(particularly in bioinformatics). So the combination of separator and include is
what is needed, I feel. You could even bundle that all up in a format="tsv" if it
was common enough.
Thanks again!!
-brian
----- Original message -----
Subject: Re: Table include macro - tab-delimited files
Date: Mon, 13 Mar 2017 21:20:36 -0700 (MST)
Tables can, in fact, use tabs as a delimiter. (The name of the attribute is separator). The only caveat is that you must specify the value using a literal tab character, not an escape code.
I put the example in a gist so as not to lose the formatting (and to demonstrate it in action)
I'll add an enhancement to Asciidoctor to allow the separator to be specified using the escape code, \t.
[separator=\t]
Cheers,
-Dan
On Mon, Mar 13, 2017 at 3:44 PM, brianrepko [via Asciidoctor :: Discussion]
<[hidden email]> wrote:
My understanding is that one cannot include a tab-delimited file as table data.
I've tried changing separator - and tried an include1 macro as well since include converts tabs to spaces.
Am I missing something? Tables cannot use tabs as a delimiter?
-brian
If you reply to this email, your message will be added to the discussion below:
To start a new topic under Asciidoctor :: Discussion, email
[hidden email]
To unsubscribe from Asciidoctor :: Discussion,
click here.
--
If you reply to this email, your message will be added to the discussion below:
To unsubscribe from Table include macro - tab-delimited files,
click here.