2

I am using the draftwatermark package. According to the documentation, it is possible to set the horizental position of a watermark with the command \SetWatermarkHorCenter{⟨length⟩}. They say that <length> is a length and not a simple number. What does this mean? How can I enter a length equal to f.ex. 1cm or 10% of the page height?

  • A length is either a number with a length unit (pt or cm etc.) or specified as length register, which has then to be set to a length value (again, with unit). With the package calc you could say 0.1\paperheight however, since \paperheight is a length register (predefined, already) – user31729 Aug 7 '15 at 10:05
  • @ChristianHupfer 0.1\paperheight is legal in standard TeX. – egreg Aug 7 '15 at 10:18
  • @egreg: Yes, I confused with it with addition of lengths (using calc and not \dimexpr then) – user31729 Aug 7 '15 at 10:23
  • \SetWatermarkHorCenter{1cm} gives the error 'Undefined control sequence'. I will try to contact the author of the draftwatermarkpackage. – Karlo Aug 8 '15 at 13:06
  • See also github.com/callegar/LaTeX-draftwatermark. – Karlo Aug 10 '15 at 21:56
4

I updated the draftwatermark package to 1.2 and it works fine (PDFLaTeX) with the following setting.

\usepackage{draftwatermark}
\SetWatermarkText{\textsc{Confidential}}
\SetWatermarkScale{0.7}
\SetWatermarkAngle{0}
\SetWatermarkColor{red}
\SetWatermarkHorCenter{0.5\paperwidth}
\SetWatermarkVerCenter{0.5\paperheight}

Hope this helps?

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.