Related: "Missing number, treated as zero" error with \includegraphics

So if I have an underscore in an image I include, say \includegraphics{my_file.pdf}, then there's no problem. But if I have \includepackage{underscore} in the preamble, then the underscore in the file name is handled differently, and it seems latex can't find the file. It produces the error

Missing number, treated as zero.

Is there a simple way to fix this other than changing my file names (which ultimately requires editing the files that produce the images since I'll be regenerating them from time to time).


1 Answer 1


Instead of \usepackage{underscore}, I should have used \usepackage[strings]{underscore}

You must log in to answer this question.

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