1

This question already has an answer here:

It seems that \input appends a trailing space. MWE:

foo.tex

\documentclass{article}                                                         
\begin{document}
foo\input{bar.txt}baz
\end{document}

bar.txt

bar

Which, using pdflatex foo gives the output foobar baz, with a space in between. How do I remove it?

marked as duplicate by egreg, Werner, JLDiaz, Paul Gessler, Ian Thompson Jul 23 '14 at 14:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    \input{bar.txt}\unskip baz – egreg Jul 23 '14 at 13:53

Browse other questions tagged or ask your own question.