# How to use “input” on Linux (Fedora 16)? [closed]

This seems like a trivial thing, but I can't figure out how to use input properly on Fedora. When I used Windows 7, I would put the following into my document

\input{D:/Dropbox/Code_Library/LaTeX/custom_headings_1.tex}

The file is now located at /home/[user_name]/Home/Dropbox/Code_Library/LaTeX/custom_headings_1.tex

But when I try to use input{/home/[user_name]/Home/Dropbox/Code_Library/LaTeX/custom_headings_1.tex} I get a "file not found" error.

In retrospect, since I still use Windows regularly, doing this is probably not a good idea because I won't be able to compile documents on both platforms. Can any one suggest a better file inclusion system than putting a "custom_headings_1.tex" file in every new document's folder?

-

## closed as too localized by Stefan Kottwitz♦Apr 8 '12 at 20:10

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Does [user_name] have spaces? –  egreg Apr 8 '12 at 13:27
No, not at all. –  xiongtx Apr 8 '12 at 17:40

Using the same file on Windows and on a Unix system can be accomplished by the following code

\usepackage{ifplatform}
\ifwindows
\newcommand{\dropboxprefix}{D:/Dropbox/Code_Library/LaTeX}
\else
\newcommand{\dropboxprefix}{/home/[user_name]/Home/Dropbox/Code_Library/LaTeX}
\fi


and then

\input{\dropboxprefix/customheadings_1.tex}


should work on both systems.

About TeX not finding the file on the GNU/Linux platform only guesses can be cast: what does the shell command

kpsewhich /home/[user_name]/Home/Dropbox/Code_Library/LaTeX/custom_headings_1.tex


Of course in all this [user_name] should be replaced by the actual user name.