# watermark on first page in left margin (like arXiv)

The first page of articles on the arXiv have a grey watermark on the first page with the information about the file in it. I want to replicate this, in the easiest way possible. Obligatory TikZ solutions welcome (since I already normally have that loaded...

This is the sort of thing I would like to hack together myself, but I just don't know where to start... I tried looking at the source of an arXiv paper, but it seems that the watermark is added by their autoTeX thing, so it doesn't show up in the source file...

The text needs to be vertical, grey, and allowed to contain macros (like \today or \GITHash from the vc bundle.)

Bonus marks for an additional "every page" solution (but my primary aim is first page only). Actually, the ideal would be something that could be added to the page style "plain" so that it appears on the first page of every chapter...

-
It would still be interesting (to plain TeX users) to know how arXiv adds the watermark, because they add it even to plain TeX submissions. –  Mafra Aug 17 '11 at 10:04

I suspect that arxiv adds the watermark in postprocessing.

Obligatory TikZ solution:

\documentclass{article}
\usepackage[english]{babel}
\usepackage{blindtext,tikz}
\usetikzlibrary{calc}
\begin{document}

\tikz[overlay,remember picture]
{
\node at ($(current page.west)+(1.5,0)$) [rotate=90] {\Huge\textcolor{gray}{\today}};
}

\blinddocument
\end{document}


You could add that snippet for example to the \chapter command.

-
Your MWE needs a \usepackage{color} doesn't it? –  Seamus Dec 19 '10 at 18:19
@Saemus No, that is automatically loaded by tikz. –  Caramdir Dec 19 '10 at 20:32
I agree that the watermark is probably added in postprocessing, since even some of the uncompilable sources they provide seem to have it. –  Adrian Petrescu Dec 21 '10 at 5:40

You can use the background package to achieve this. The package uses the TikZ positiong system to position an image either on one page or on all the pages (great also if you just need draft to be printed on one or all the pages of a publication).

It uses any valid TikZ positioning command for example:

\SetBgPosition{0,0}
\SetBgPosition{current page.north}
\SetBgPosition{5cm,7cm}

-

I found an answer of my own that someone emailed me:

\usepackage{graphicx,eso-pic,xcolor}
\makeatletter
\setlength{\@tempdimb}{.5\paperwidth}%
\setlength{\@tempdimc}{.5\paperheight}%
\setlength{\unitlength}{1pt}%
\put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
\makebox(-500,200){\rotatebox{90}{\textcolor[gray]{0.70}%
{\Large \textsf{Draft of \today}}}}
}%
}
\makeatother


I don't understand why this works though... For completeness, I'll add it to the collection.

-
This seems to be similar to @Thorsten's solution. –  Caramdir Dec 19 '10 at 20:39
True, I hadn't actually checked the other solutions when I added this... –  Seamus Dec 20 '10 at 12:29
And it seems to contradict what you called "the ideal" in your initial post. Apart from the fact that it also doesn't involve »tikZ«. –  Thorsten Donig Dec 20 '10 at 18:10
-

Packages for the job have already been mentioned. You talked about something that only appears on the chapter pages. The code below shows how you could to do that.

\documentclass[11pt,a4paper,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[
margin=3cm
]{geometry}
\usepackage[x11names]{xcolor}
\usepackage{graphicx}
\usepackage{eso-pic}
\usepackage{fancyhdr}
\usepackage{blindtext}

\newcommand{\chapmark}{%
\AtPageCenter{%
\put(\LenToUnit{-0.45\paperwidth},0){%
\rotatebox[origin=c]{90}{\scalebox{3}{\textcolor{gray!50}{\fontfamily{phv}\selectfont\today}}}
}
}
}
}

\fancypagestyle{plain}{%
\fancyhf{}
\cfoot{\thepage}
}

% Setup for headers and footers (fancyhdr)
\fancyhf{}