I have encountered some strange behavior from \hfill when using \input for a section of my document.
A minimal working example is attached. doc1 shows the desired behavior without the use of \input. doc2 shows the observed behavior when including sec1 using \input: the \hfill on the last line is smaller than the normal \hfill, so the subsequent text is out of alignment with the text on the previous lines.
Any help solving this problem would be appreciated.
Would you mind posting a minimal working example here? I for my part am always quite reluctant to download zip archives... besides it makes me suspect that the example files are not really minimal (which may very well be uncalled-for...)
The working example contains 5 files, while the attachment upload limit is 4. The five files are as follows:
doc1.tex
doc1.pdf
doc2.tex
sec1.tex
doc2.pdf
Please follow the link Clemens posted, where you can read how to prepare a minimal working example (which only consists of one file). You can add your output and still won't reach the upload maximum.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
The error involves the use of \input, so a complete minimal working example consisting of one file is obviously impossible.
I have combined two of the files, so the desired and the buggy behavior are shown together. The new example is attached (including both the source and compiled PDF so the behavior can be easily observed).
\begin{filecontents}{\jobname doc.tex}
\section{inputted file}
blah \hfill December 2013\\
blah \hfill December 2012\\
blah \hfill December 2011% <- This is important
\end{filecontents}
\documentclass{article}
\begin{document}
\section{Section 1}
blah \hfill December 2013\\
blah \hfill December 2012\\
blah \hfill December 2011
\input{\jobname doc}
\end{document}
You need to be aware of the last line of the input document. The Line end is giving you a space. Comment this out using a percent sign (%).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.