I'm going to write a lecture note . I'd like to make create a watermark like this but i don't know how to do it. Can you help me to draw this watermark?
Best Answer
Welcome! You can do that e.g. with eso-pic and tikz. The distance to this watermark to the text is specified in ([xshift=-1ex]current page text area.west).
\documentclass{article}
\usepackage{tikzpagenodes}
\usepackage{eso-pic}
\usepackage{lipsum}%<- only to add some text
\AddToShipoutPicture{\begin{tikzpicture}[overlay,remember picture]
\node[anchor=south,rotate=90,pink,font=\sffamily\Huge]
(AE) at ([xshift=-1ex]current page text area.west){Albert Einstein};
\draw[very thick,pink] (AE.east) -- ++ (0,4)
(AE.west) -- ++ (0,-4);
\end{tikzpicture}}
\begin{document}
\section{Blub}
\lipsum[1-10]
\end{document}
For different "watermarks" on even vs. odd pages, you can use
\documentclass{article}
\usepackage{tikzpagenodes}
\usepackage{eso-pic}
\usepackage{lipsum}%<- only to add some text
\AddToShipoutPicture{\begin{tikzpicture}[overlay,remember picture]
\ifodd\value{page}
\node[anchor=south,rotate=90,pink,font=\sffamily\Huge]
(AE) at ([xshift=-1em]current page text area.west){Albert Einstein};
\draw[very thick,pink] (AE.east) -- ++ (0,4)
(AE.west) -- ++ (0,-4);
\else
\node[anchor=south,rotate=-90,pink,font=\sffamily\Huge]
(CFG) at ([xshift=1em]current page text area.east){Carl Friedrich Gauss};
\draw[very thick,pink] (CFG.west) -- ++ (0,4)
(CFG.east) -- ++ (0,-4);
\fi
\end{tikzpicture}}
\begin{document}
\section{Blub}
\lipsum[1-20]
\end{document}
Here a funny idea: Just place some watermark/copyright text on top or below of a dot or other punctuation mark. It is invisible for the naked eye if it uses the same color as the text but can be extracted using copy and paste. You can also give it a dark gray color, so you still have a chance to read it on screen.
Here some principal solution:
\documentclass{article}
\usepackage{graphicx}
\usepackage{xcolor}
\newcommand\watermark[1]{%
#1%
\sbox0{#1}%
\llap{%
\makebox[\wd0][c]{% hor. centering
\raisebox{.5\ht0}{% approx. vert. centering
\csname Gin@isotrue\endcsname% = "keepaspectratio"
\resizebox*{.8\ht0}{.8\ht0}{% Scale down (the height is also used for the width to avoid the surrounding spaces)
\parbox{10em}{% Allow line breaks
\color{black!90}%
This PDF was created by John Doe for Jane Doe.
}%
}}}}%
}
\begin{document}
Text text text.
Text text text\watermark.
\end{document}
The dot will then look like this: (note the hard to see text)
Best Answer
Welcome! You can do that e.g. with
eso-pic
andtikz
. The distance to this watermark to the text is specified in([xshift=-1ex]current page text area.west)
.For different "watermarks" on even vs. odd pages, you can use