ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
Subject: Re: Feature request: Creating tables from (tab-separated) values
Date: Sun, 23 Apr 2006 19:15:05 +0200	[thread overview]
Message-ID: <444BB619.5010906@elvenkind.com> (raw)
In-Reply-To: <6faad9f00604211902m5c88d10apcd5c208f1825f51c@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

Hi,

Here is a quick hack that converts csv to commalist values.
Perhaps it helpful for someone. Documentation blurb:


  This module parses CSV data (somewhat) safely. After

  \def\dataline{a,,\j,a",a\j a",t{f},",","""","a""b"}
  \convertcsvdata\dataline\to \myascii
  \message{\meaning\myascii}

  output is:

  macro:->{a},{},{\j },{a"},{a\j a"},{t{f}},{,},{"},{a"b}

  The result is detokenized, like would be with \type{\convertargument}.
  Therefore, you will need to run \type{\scantokens} over the list
  items if the CVS data was actually \TeX{} code.

Cheers,
Taco

[-- Attachment #2: t-asciidata.tex --]
[-- Type: application/x-tex, Size: 2121 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

      parent reply	other threads:[~2006-04-23 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-22  2:02 Mojca Miklavec
2006-04-22 18:02 ` Peter Münster
2006-04-23 11:13   ` Mojca Miklavec
2006-04-23 16:31     ` Peter Münster
2006-04-23 17:15 ` Taco Hoekwater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=444BB619.5010906@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).