I've noticed a significant issue with the \input command, it seems. For some reason, I can't seem to prevent it from adding a space after it reads its input. Even if there is no newlines or spaces at the end of the file, LaTeX seems to be just driven to add a space.
Minimal working example is this:
\documentclass{article}
\begin{document}
A\input{TestInput.out}B
\end{document}
Where TestInput.out contains only the text "SomeText" and no special characters
This provides the output:
ASomeText B
Does anybody know how to prevent this? For a typesetting program, it's kind of weird to just arbitrarily add spaces IMO. I'd like to think there's an easy fix, but I'll take any portable, robust fix if it works.
\inputwhen they contain full paragraphs or definitions, so the problem of an empty line at the end shows rarely. One might do withA\input{test.out}\unskip B. – egreg May 11 '11 at 22:54\unskipafter pressing “Post Your Answer”. – Caramdir May 11 '11 at 23:00some words, then the result will besome words). – Caramdir May 12 '11 at 00:43\endlinecharis inserted at the end of each line (except when the line ends with a comment or a control sequence). – Harald Hanche-Olsen May 12 '11 at 07:00