Giter Site home page Giter Site logo

Comments (1)

callegar avatar callegar commented on July 24, 2024

Proposed patch

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{draftwatermark_jg}%
[2010/09/24 1.1 Put a gray textual watermark on document pages (SC,JG)]
%\ProvidesPackage{draftwatermark}%
% [2006/06/30 1.0 Put a gray textual watermark on document pages]
\RequirePackage{everypage} \RequirePackage{graphicx}
\RequirePackage{color}
\newif\if@sc@wm@first
@sc@wm@firstfalse
\DeclareOption{firstpage}{%
@sc@wm@firsttrue}
\newif\if@sc@wm@final
@sc@wm@finalfalse
\DeclareOption{final}{%
@sc@wm@finaltrue}
\ProcessOptions
\newlength\sc@wm@fontsize
%% defaults
\def\sc@wm@angle{45}
\def\sc@wm@lightness{0.8}
\def\sc@wm@scale{1}
\setlength\sc@wm@fontsize{5cm}
\def\sc@wm@text{DRAFT}
\newcommand\SetWatermarkAngle[1]{%
\def\sc@wm@angle{#1}}
\newcommand\SetWatermarkLightness[1]{%
\def\sc@wm@lightness{#1}}
\newcommand\SetWatermarkFontSize[1]{%
\setlength\sc@wm@fontsize{#1}}
\newcommand\SetWatermarkScale[1]{%
\def\sc@wm@scale{#1}}
\newcommand\SetWatermarkText[1]{%
\def\sc@wm@text{#1}}
\newcommand\sc@watermark{%
\setlength{@tempdimb}{.5\paperwidth}%
\setlength{@tempdimc}{-.5\paperheight}%
\put(\strip@pt@tempdimb,\strip@pt@tempdimc){%
\makebox(0,0){\rotatebox{\sc@wm@angle}{%
\scalebox{\sc@wm@scale}{%
\textcolor[gray]{\sc@wm@lightness}{
\fontsize{\sc@wm@fontsize}{1.2\sc@wm@fontsize}
\selectfont
\sc@wm@text}}}}}}
\newcommand\sc@wm@print[1]{%
\if@sc@wm@final
\relax
\else
\setbox@tempboxa\vbox to \z@{%
\vskip -1in \moveleft 1in \vbox{%
\hbox to \z@{%
#1\hss}}\vss}
\dp@tempboxa\z@
\box@tempboxa%
\fi}
\if@sc@wm@first
\AddThispageHook{\sc@wm@print{\sc@watermark}}
\else
\AddEverypageHook{\sc@wm@print{\sc@watermark}}
\fi
\endinput
%%
%% End of file `draftwatermark_jg.sty'.

from latex-draftwatermark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.