13

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 ! :)

3
  • 5
    \input{"File Name"} Use quotes Commented Jul 17, 2014 at 12:27
  • 2
    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. Commented Jul 17, 2014 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
    Commented Jul 17, 2014 at 12:48

1 Answer 1

19

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.

\documentclass{article}
\usepackage{graphicx}
\begin{document}
Testing\par
\input{"File Name"}\par
\includegraphics[width=2in]{"Repin Painting"}
\end{document}

enter image description here

1
  • 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
    Commented Jul 17, 2014 at 12:47

You must log in to answer this question.

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