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'm going crazy...

I have a file I want to include which path is C:\Users\Matthieu\Documents\Folder withOneSpace\myFile.tex. (As you can see with the \, I'm on windows actually)

I tried the following but none works:

\input{C:/Users/Matthieu/Documents/Folder withOneSpace/myFile}
\input{C:/Users/Matthieu/Documents/Folder\ withOneSpace/myFile}
\input{C:/Users/Matthieu/Documents/Folder withOneSpace/myFile.tex}
\input{C:/Users/Matthieu/Documents/Folder\ withOneSpace/myFile.tex}

I also tried to put the file out of the folder with a space and it works (no surprise):

\input{C:/Users/Matthieu/Documents/myFile} --> Works

All I found is to put a \ before the space but it doesn't work at all. --> Please help ! :)

share|improve this question
\input{"File Name"} Use quotes – Steven B. Segletes Jul 17 '14 at 12:27
as Steven said " also it's generally easier just to use \input{myFile} and arrange that your folder is in the TEXINPUTS path that way your document is portable and avoids the problem entirely. – David Carlisle Jul 17 '14 at 12:30
Thanks guys, I tried with " before to post but it didn't works because my editor was configure to automatically replace " by some french quote... – Matthieu.P Jul 17 '14 at 12:48
up vote 9 down vote accepted

Use the double quote symbol ". In this case, the file File Name.tex contained the words Hello World

... and Repin Painting.jpg contained, well, "Barge Haulers on the Volga" (Russian: Burlaki na Volge, Бурлаки на Волге), best viewed while listening to Lydia Salnikova perform Ah Ty Step Shirokaya http://www.broadjam.com/artists/songs.php?artistID=81353&mediaID=529836.

\input{"File Name"}\par
\includegraphics[width=2in]{"Repin Painting"}

enter image description here

share|improve this answer
Thanks ! I also tried with " but it didn't works because my editor was configure to automatically replace " by some french quote... Now it works well – Matthieu.P Jul 17 '14 at 12:47
+1 for the musical divertimento. :) – jja Jul 17 '14 at 14:41

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.