I would like to have on my draft-documents on the bottom something like compiled ch2.tex on July 21, 2011 at 18:46. My document has multiple files which I include by using \input.
I have the following preamble (I only kept the relevant part):
\documentclass[a4paper,11pt, leqno, draft]{scrbook} %draft
\usepackage{scrtime}
\usepackage{currfile}
\usepackage{fancyref}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{calc}
\fancyheadoffset[LE,RO]{\marginparsep+\marginparwidth}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\rightmark}
\fancyhead[RE]{\leftmark}
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{10pt} % and the line
}
\lfoot{\scriptsize{\texttt{compiled \currfilename \ on \today \ at \thistime}}}
\cfoot{}
\rfoot{}
\author{Jonas Teuwen}
\title{}
\begin{document}
\input{ch1.tex}
\input{ch2.tex}
\end{document}
The line that gives problems is the following:
\lfoot{\scriptsize{\texttt{compiled \currfilename \ on \today \ at \thistime}}}
It does work, it gives me the correct result, however, at the last page of ch1.tex at the bottom LaTeX already prints the line for ch2.tex. What is wrong?
Another small question: How do I automatically disable this part if the document is set as [final] instead of [draft]?