You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspired by discussion in #619 I came to realization that there is no consistency ATM: .tsv "Text" examples come both in
proper TSV form
$> git grep -e ''| grep '\.md'
src/02-common-principles.md:onset duration response_time correct stop_trial go_trial
src/02-common-principles.md:200 200 0 n/a n/a n/a
src/03-modality-agnostic-files.md:filename acq_time
src/03-modality-agnostic-files.md:func/sub-control01_task-nback_bold.nii.gz 1877-06-15T13:45:30
src/03-modality-agnostic-files.md:func/sub-control01_task-motor_bold.nii.gz 1877-06-15T13:55:33
src/04-modality-specific-files/08-genetic-descriptor.md:participant_id age sex group genetic_id idh_mutation
src/04-modality-specific-files/08-genetic-descriptor.md:sub-control01 34 M control 124587 yes
src/04-modality-specific-files/08-genetic-descriptor.md:sub-control02 12 F control 548936 yes
src/04-modality-specific-files/08-genetic-descriptor.md:sub-patient01 33 F patient 489634 no
src/05-derivatives/03-imaging.md: anat/
src/05-derivatives/03-imaging.md: sub-001_space-orig_probseg.nii.gz
src/05-derivatives/03-imaging.md: sub-001_space-orig_probseg.json
and more often in some shape of "replace tab with some spaces" - some times with nice layout into a tabular form, some times not really (even canonical example had no tabs but varying number of spaces used for delimiting, #643 ). IMHO ideally
markdown sources should use TABs where TABs are intended to be used
rendering into HTML or PDF should do its best to signal that they are tabs while providing visually coherent display of the table.
I.e. ideally it should be a job of remake (some plugin) to do use TABS (ATM they are replaced by spaces by remake I guess), and just use HTML/CSS to provide nice visual alignment into the table (should be possible) while having TAB as the actual character so content could be copy pasted. Even though it is unlikely the actual entries would be copy pasted, I would expect some readers copy-paste headers (which also should be tab-delimited). Could even use (although not really needed and overkill) smth like https://www.datatables.net/, where copy pasting a row from that fancy table does produce tab delimited entries:
👇 this is what you could find in the source of the spec (md)
<!--
This block generates a table.
<insert some more docs>
-->
{{ MACROS___plot_tsv_example(
"""
header1 header2 header3
val11 val12 val13
val21 val22 val23
"""
)
}}
Which would then be turned to a standard table in html and pdf:
header1
header2
header3
val11
val12
val13
val21
val22
val23
that way we'd have the example nicely in source tsv (in the raw MD file) ... and in nice html/pdf tables for the part that people actually read.
Now the cherry on top for me would be if there was some html/css magic (for web version only) that if hovering over the table, there'd be a "copy button" that would copy the tsv source (not the rendered table).
But that would not be necessary as a first step IMHO.
Inspired by discussion in #619 I came to realization that there is no consistency ATM: .tsv "Text" examples come both in
proper TSV form
I.e. ideally it should be a job of remake (some plugin) to do use TABS (ATM they are replaced by spaces by remake I guess), and just use HTML/CSS to provide nice visual alignment into the table (should be possible) while having TAB as the actual character so content could be copy pasted. Even though it is unlikely the actual entries would be copy pasted, I would expect some readers copy-paste headers (which also should be tab-delimited). Could even use (although not really needed and overkill) smth like https://www.datatables.net/, where copy pasting a row from that fancy table does produce tab delimited entries:
The text was updated successfully, but these errors were encountered: