I'm trying to create a Latex table from a CSV string. I saw a similar question , after which I started playing around with the csvsimple package (manual).

What I don't understand is the need for filecontents. When something like




is run, this creates a file on disk called example.csv. Is there a way to parse CSV from the string itself?


doesnt fly either.

  • 2
    You don't need the filecontents environment to parse CSV files. The filecontents is only used to show the example.
    – Leo Liu
    Sep 23, 2014 at 15:40
  • How do you define \mymacro?
    – egreg
    Sep 23, 2014 at 16:39
  • \mymacro would have just expanded to a comma-separated string, e.g. a,b,c,d . In any case, this seems to be a limitation of csvsimple, so for now I explicitly made files for all my csv strings.
    – icy
    Sep 23, 2014 at 20:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.