Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have an input file like this:

some_entry 123
another_entry 456
yet_another_entry 789

and I want to typeset it as a table with:

\pgfplotstabletypeset[col sep=space]{FILENAME}

Problem is that LaTeX seems to interpret the underscores as a command to typeset subscript.

Escaping the underscores in the input file does not work.

share|improve this question
\begingroup\makeatletter\@makeother\_\pgfplotstabletypeset[col sep=space]{FILENAME}\endgroup might work –  egreg Apr 8 '12 at 16:09
add comment

1 Answer

\pgfplotstabletypeset[col sep=space,columns/colname1/.style={string type}]{FILENAME}

And the file should look like that:

colname1 colname2
some\_entry 123
another\_entry 456
yet_another\_entry 789
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.