TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to plot a data file with spaces is the file path.

\draw[line width=0.4mm] plot[] file{/home/schlumpf/test folder/daten.txt};

My problem is the space in the file path. How can I plot this file without copying the file to another folder?

share|improve this question

All you have to do is place the filename within double quotes. The command should now read

\draw[line width=0.4mm] plot[] file{"/home/schlumpf/test folder/daten.txt"};

This works any time (or almost) you use a filename in a TeX command. It is the same thing as when you are working in a command line environment (Unix shell commands for example).

To avoid this type of problem, many people will refrain from using spaces or exotic symbols within file or folder names.

share|improve this answer
I tried that, but it didn't work. If I write the path in quotes, I get this warning and no plot: Plot data file `"/home/schlumpf/test folder/daten.txt"' not found. on input line 36. – Schlumpf Mar 25 '12 at 11:19

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.