# [texhax] \input adds an extra space if the included file contains a command?

Aleksandar Zec zealeksanman at gmail.com
Thu Oct 7 01:02:04 CEST 2010

Hello,

If you create these two files, t.tex and i.tex

----- t.tex -----
\documentclass{article}
\newcommand{\text}[1]{#1}
\begin{document}
X\input{i}X
\end{document}
-----------------

----- i.tex -----
\text{test}
-----------------

the result will look like this:

Xtest X

i.e. there is an extra space where it (IMHO) shouldn't be. I can't see
how I instructed LaTeX to insert it. Is this behaviour intentional and
how can I avoid it?