9

I use the draftwatermark package to show some drafting information at the bottom of each page (the draft infos are included via svn-multi macros, but I just inserted text in this MWE for simplicity). As draftwatermark does not offer an option to position text, I simply redefine the the origin of the page from where the mark is drawn (from -1in to 330pt).

This works, but it is definitely not the most elegant solution, as it is dependent on font size, page dimensions etc. Ideally I would like to have something that always puts the bottom edge of the watermark around 10pt above the lower end of the page. Can this be done?

\documentclass{scrartcl}

\usepackage{lipsum}

\usepackage{draftwatermark}

\makeatletter
\renewcommand\sc@wm@print[1]{% redefine positioning of mark (-1in to 330pt)
 \if@sc@wm@stamp
          \setbox\@tempboxa\vbox to \z@{%
            \vskip 330pt \moveleft 1in \vbox{%
              \hbox to \z@{%
                #1\hss}}\vss}
          \dp\@tempboxa\z@
          \box\@tempboxa
          \fi}
\makeatother

\SetWatermarkAngle{0}
\SetWatermarkColor{black}
\SetWatermarkFontSize{10pt}

\SetWatermarkText{%
    \begin{minipage}{21cm}\centering
    Draft [Revision 269] 30-06-2012 at 07:41:41
    (c) Me, Myself and I \\
    http://127.0.0.1:9800/research/chapter1.tex
    \end{minipage}
        }


\begin{document}

\lipsum

\end{document} 
9

Here is an option using the eso-pic package:

enter image description here

\documentclass{scrartcl}% http://ctan.org/pkg/koma-script
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{url}% http://ctan.org/pkg/url
\usepackage{eso-pic}% http://ctan.org/pkg/eso-pic

\AddToShipoutPictureBG{% Add picture to background of every page
  \AtPageLowerLeft{%
    \raisebox{3\baselineskip}{\makebox[\paperwidth]{\begin{minipage}{21cm}\centering
      Draft [Revision 269] 30-06-2012 at 07:41:41
      \copyright\ Me, Myself and I \\
      \url{http://127.0.0.1:9800/research/chapter1.tex}
    \end{minipage}}}%
  }
}

\begin{document}
\lipsum
\end{document}

Similar solutions are available using a myriad of packages, including tikz and background, to name two, none of which would affect textual content. That is, they all allow for placement of (random) content in the background or foreground.

  • Thank you, very nice. I prefer using \raisebox{15pt} instead of {3\baselineskip} as the baselineskip can vary across pages. Also a \renewcommand{\baselinestretch}{1} can be useful inside the minipage to ensure that the plotted text looks the same on all pages. – Jörg Jul 3 '12 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.