Skip to content

Commit

Permalink
docs: Restore literal tabs to the TSV examples in the rendered HTML
Browse files Browse the repository at this point in the history
Using the literalinclude directive to include an external file preserves
literal tabs (unless the tab-width option is used to expand them).  This
resolves the copy and paste issue noted in "docs: Restore literal tabs
to the TSV examples in the rST source" (1275eb3).
  • Loading branch information
tsibley committed Mar 10, 2023
1 parent e9267c4 commit 95c3ab3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
18 changes: 4 additions & 14 deletions docs/advanced-functionality/drag-drop-csv-tsv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@ Example:

A TSV file as follows can be dragged onto `nextstrain.org/zika <https://nextstrain.org/zika>`__ to add a "secret" color-by:

.. code:: text
strain secret
USVI/19/2016 A
USVI/28/2016 B
USVI/41/2016 C
USVI/42/2016 C
.. literalinclude:: ../assets/extra-data.tsv
:language: text

.. figure:: ../assets/extra-data.png
:alt: Auspice with extra data shown via TSV
Expand All @@ -27,13 +22,8 @@ A TSV file as follows can be dragged onto `nextstrain.org/zika <https://nextstra

A more complex metadata file may look like the following, which makes use of additional features available. This defines colours for the metadata (e.g. ``A`` is yellow, ``B`` is orange) as well as associating strains with (made up) geographic coordinates.

.. code:: text
strain secret secret__colour latitude longitude
USVI/19/2016 A #f4e409 0 -120
USVI/28/2016 B #f49015 0 -115
USVI/41/2016 C #710000 0 -100
USVI/42/2016 C #710000 0 -120
.. literalinclude:: ../assets/extra-data-2.tsv
:language: text

.. figure:: ../assets/extra-data-2.png
:alt: Auspice with extra data shown via TSV
Expand Down
5 changes: 5 additions & 0 deletions docs/assets/extra-data-2.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
strain secret secret__colour latitude longitude
USVI/19/2016 A #f4e409 0 -120
USVI/28/2016 B #f49015 0 -115
USVI/41/2016 C #710000 0 -100
USVI/42/2016 C #710000 0 -120
5 changes: 5 additions & 0 deletions docs/assets/extra-data.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
strain secret
USVI/19/2016 A
USVI/28/2016 B
USVI/41/2016 C
USVI/42/2016 C

0 comments on commit 95c3ab3

Please sign in to comment.