Putting a LaTeX header on top of your manuscript

If you’re like me, you’ll have a lot of draft versions of your documents that you print out, and then you lose track of which version is the latest one. Wouldn’t it be nice to have the date and time of your document on the top of each page?

Using LaTeX’s fancyhdr package, as well as the time package, it’s pretty easy to put in a header the date and time at which the document was generated at the top of every page. Use the code below at the top of your document.

Just make sure you comment out the appropriate lines (\pagestyle{fancy} and \thispagestyle{fancy} before you make a camera-ready version.


% take the % away on next line to produce the final camera-ready version
% Be sure to remove \thispagestyle{fancy} as well after the \maketitle.

\fancyhead[CO, CE]{\texttt{-Manuscript Draft-}}
\fancyhead[RO, RE]{\texttt{\today, \myTime}}

\title{My paper's title}
\author{Author's name}

% You need this here, or else the first page won't have a header.

Abstract goes here

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s