Theses and articles typically go through many versions, ding-dong to-and-fro between supervisors and co-authors. Some people keep track of the version number (or date-last-modified) by giving each draft a different file name. Personally, though, I tend to get inconsistent with the file naming, especially when it's 2:30am. So I figured it might work better for me if the date-last-modified was printed in the PDF of the thesis/article draft itself.
One could always put the date in the header or footer, but there might already be some content in those regions. Besides, it's probably not a good idea to mess with the formattings for a journal article. Instead, I put
\today
in a watermark, so the date would get updated I compile my draft:\usepackage{draftwatermark} \usepackage{datetime} \ddmmyydate \SetWatermarkLightness{.9} \SetWatermarkText{Draft\string@\today} \SetWatermarkScale{.6}
The colour, lightness, font and other attributes of the watermark are configurable. I also used the
datetime
package to configure the date formatting. Here’s how the output looks like (a page from my thesis draft):
Thanks! question: How to create watermark with two lines, say the date is under the word "draft"?
ReplyDeleteYou could try something like
Delete\SetWatermarkText{\parbox{6em}{\centering Draft\\\today}}
o.k. following your suggestion I tried
Delete\SetWatermarkText{\parbox{6em}{\textcolor{cyan}{\centering DRAFT\\\today}}}
and it works perfect. Thanks again :)
You're welcome. You can also do
Delete\SetWatermarkColor{cyan}
instead of using a \textcolor in the watermark text. Makes the code a little more readable. :)
You will have incorrect spacing with
ReplyDelete{\textcolor{cyan}{\centering DRAFT\\\today}}}
Changing to
\SetWatermarkText{\parbox{6em}{\centering\textcolor{cyan}{DRAFT\\\today}}}
will resolve it.
Indeed, this makes the spacing better. Thank you.
DeleteHow can I change '7. August 2015' into '7/08/2015'?
ReplyDeleteHave a look at the datetime (now obsolete) or datetime2 (this one's newer) packages.
Deletee.g. you might use
\usepackage{datetime}
\ddmmyydate
If using datetime2, you'll need to call \DTMsetstyle instead:
\usepackage{datetime2}
\DTMsetstyle{ddmmyyyy}