Comments (1)
Proposed new code (by Claudio)
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{watermark}% .............. formely draftwatermark
[2008/05/11 1.0 Put a colored textual watermark on document pages]
\RequirePackage{everypage}
\RequirePackage{graphicx}
\RequirePackage{xcolor}% .................. Different package
\newif\if@sc@wm@first
@sc@wm@firstfalse
\DeclareOption{firstpage}{%
@sc@wm@firsttrue}
\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}
% ......................................... New commands
\def\sc@wm@color@model{gray}
\def\sc@wm@color{0.8}
\newcommand\SetWatermarkColor[2][grey]{%
\def\sc@wm@color@model{#1}\def\sc@wm@color{#2}%
}
% .........................................
\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[\sc@wm@color@model]{\sc@wm@color}{% ........ Modifications
\fontsize{\sc@wm@fontsize}{1.2\sc@wm@fontsize}
\selectfont
\sc@wm@text}}}}}}
\newcommand\sc@wm@print[1]{%
\setbox@tempboxa\vbox to \z@{%
\vskip -1in \moveleft 1in \vbox{%
\hbox to \z@{%
#1\hss}}\vss}
\dp@tempboxa\z@
\box@tempboxa}
\if@sc@wm@first
\AddThispageHook{\sc@wm@print{\sc@watermark}}
\else
\AddEverypageHook{\sc@wm@print{\sc@watermark}}
\fi
\endinput
%%
%% End of file `draftwatermark.sty'.
from latex-draftwatermark.
Related Issues (20)
- transparent watermark HOT 6
- How to use \SetWatermarkHorCenter{⟨length⟩} HOT 1
- automaticly react on "draft" option of the documentclass HOT 1
- ignoring pages HOT 4
- text appears tiny HOT 1
- [feature request] Provide a command to turn off watermarking HOT 2
- Watermark is incorrectly placed on the foreground of included PDFs HOT 8
- Error in documentation HOT 2
- New line (\\) not possible in text HOT 3
- Draftwatermark should get rid of everypage dependency HOT 1
- new line not working in the text option in [] HOT 3
- Example 6.1 in documentation does not work HOT 6
- In TeX Live 2020 version of package, commas in \SetWatermarkText{} create an error HOT 4
- A floating object distorts background watermark HOT 14
- Watermark text turns black when luacolor package is used (in TeX Live 2021) HOT 4
- some formatting lost (not sure it is draftwatermark fault) HOT 3
- Watermark on selected pages HOT 1
- Index in documentation is a mess
- Documentation should mention that development is on github
- Draftwatermark - conflicting with unitlength? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latex-draftwatermark.