Just to remind everyone of the amazing coffee stains package - coffee by Hanno Rein. This package makes it possible to add coffee stains to your document.
This question is for a generalization of coffee which would drain coffee on each and every page of your document. The stains should be random, and different on every page. Even further generalization is to add wine, ketchup, mustard stains. More difficult I think are nicotine (little burns?) and oil stains (which make the page a bit greasy and transparent).
A basic answer is easy I think: combine \everypage with pgf randomization and the coffee4.
Why would this be useful to anyone? I think heaps. Consider the common case by which an author makes an electronic version of his book available through the net, but is still interested in selling the printed and bound book. Adding stains to the electronic version would add teeny incentive to buying the printed copy.
EDIT
- Here is a related question on random watermark.
- Another related question is: Are there other "fun" packages like the "coffee stains" package?
- Yes, chocolate smears from inadequately licked fingers are adequate.
EDIT Here is a minimal, but non-working answer:
\documentclass{article}
\usepackage[a5paper]{geometry}
\usepackage{lipsum}
%\setlipsumdefault{1-145}
\usepackage{coffee4}
\usepackage{everypage}
\def\randomAngle{\pdfuniformdeviate{360}}
\AddEverypageHook{\cofeAm{1}{1.0}{\protect\randomAngle}{5.5cm}{3cm}}
\begin{document}
\lipsum
\end{document}
everypageinterface that allows arbitrary x,y placement.). However, I still only use his original 4 stains, and so doing it every page would get old, I think. I made two versions, with regular images and with transparant background images. While latter is preferable, I seemed to detect anti-aliasing artifacts. His reply: "Oh wow. That's amazing. I'm surprised you even found this after all those years. I think I might have to put this in a github repository after all." – Steven B. Segletes Apr 08 '15 at 17:21\coffee[<x-shift>]{<1-4>}, where<xshift>is applied atop the default horizontal shift. Alternately, I can use\atXY{<x>}{<y>}{\coffee{<1-4>}which does a ThisPageHook of the stain at the designated coordinate (upper left of stain). – Steven B. Segletes Apr 08 '15 at 17:22\pdfliterallanguage. No TikZ, no PStricks, no packages are needed. And I rounded the numbers during conversion, so the data is more compact. We needn't such accuracy for stains. You can compare 480 kB of coffeee4.sty with 128 kB in my result. Note that the body of all four macros of coffee.sty have to be stored in TeX memory. But the positioning macros is not solved here (for simplicity) and user can add these if he/she want. See http://petr.olsak.net/ftp/olsak/makra/fun-coffee.tex – wipet Apr 08 '15 at 20:16