I read the answers to this question: Import a text file into LaTeX document, and am now wondering if it's possible to let TeX replace tabs or spaces in that text-file with & for example if you export some data in comma or tab separated values from another source.

I do realize that it's simple to do that in any any text editor, but it would be convenient if some changes needed to be done on the source, not having to modify that text file over and over after exporting.

  • 1
    If you can export your data as comma-separated values, then you may try using the csvtools package.
    – mpg
    Nov 16, 2010 at 23:48
  • 1
    @mpg isn't datatool the successor to cvstools? Nov 16, 2010 at 23:52
  • @Will Yeah it seems so. This seems to be the solution to that problem. Doesn't it qualify as an answer? Or might there be other ways of doing this?
    – Jóhann
    Nov 16, 2010 at 23:57
  • Alternatively, with write18 enabled might you be able to do some awk magic on the file before inputting it?
    – Seamus
    Aug 2, 2011 at 17:29

1 Answer 1


You want to use the fifinddo package, but its documentation isn't exactly obvious to me so I can't give you a minimal example :) I think you want §4 for details on how to use the package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .