texlive[57099] Master/texmf-dist: draftwatermark (7dec20)
commits+karl at tug.org
commits+karl at tug.org
Tue Dec 8 23:05:54 CET 2020
Revision: 57099
http://tug.org/svn/texlive?view=revision&revision=57099
Author: karl
Date: 2020-12-08 23:05:54 +0100 (Tue, 08 Dec 2020)
Log Message:
-----------
draftwatermark (7dec20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/draftwatermark/README.md
trunk/Master/texmf-dist/doc/latex/draftwatermark/draftwatermark.pdf
trunk/Master/texmf-dist/source/latex/draftwatermark/draftwatermark.dtx
trunk/Master/texmf-dist/source/latex/draftwatermark/draftwatermark.ins
trunk/Master/texmf-dist/tex/latex/draftwatermark/draftwatermark.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-1.tex
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-2.tex
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-3.tex
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-4.tex
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-5.tex
trunk/Master/texmf-dist/tex/latex/draftwatermark/draftwatermark-2x.sty
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark1.tex
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark2.tex
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark3.tex
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark4.tex
trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark5.tex
Modified: trunk/Master/texmf-dist/doc/latex/draftwatermark/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/README.md 2020-12-08 22:04:48 UTC (rev 57098)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/README.md 2020-12-08 22:05:54 UTC (rev 57099)
@@ -6,28 +6,38 @@
"CONFIDENTIAL" across document pages. The package may remind in some sense
`draftcopy` by Dr. Juergen Vollmer, but its implementation is lighter (as the
reduced code footprint shows) and does not rely on postscript specials, making
-the package fully compatible with pdfLaTeX, XeLaTeX and LuaLaTeX. The package
-depends on `everypage.sty` by the same author.
+the package fully compatible with pdfLaTeX, XeLaTeX and LuaLaTeX.
The package focus is on simplicity, for complex layouts please consider
-`scrlayer.sty` in the KOMA script bundle.
+`scrlayer.sty` in the KOMA script bundle or directly employing the new
+LaTeX hooks `shiphout/background` and `shipout/foreground`.
The `draftwatermark` package is copyright 2006, 2012, 2020 by Sergio Callegari
<sergio.callegari at gmail.com>.
-This work consists of this `README.md` file, as well as files `draftwatermark.dtx`,
-`draftwatermark.ins` and the derived file `draftwatermark.sty`.
+This work consists of this `README.md` file, as well as files:
+- `draftwatermark.dtx`,
+- `draftwatermark.ins`
+and the derived files.
-To install the package, run LaTeX on the installation script
+To install the package, run TeX/LaTeX on the installation script
`draftwatermark.ins` and follow the instructions provided by the script itself.
-This work may be distributed and/or modified under the conditions of the LaTeX
-Project Public License version 1.3. This license is available at
-<https://www.latex-project.org/lppl/> and it is part of all distributions of
-LaTeX version 2005/12/01 or later.
-This work has the LPPL maintenance status "author-maintained".
+## License
+Package `draftwatermark` may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, version 1.3. This license is
+available at <https://www.latex-project.org/lppl/lppl-1-3c/>.
+
+
+## Maintenace status
+
+This work has the LPPL maintenance status "maintained".
+
+
+## Development and bug tracking
+
Development happens on github at
<https://github.com/callegar/LaTeX-draftwatermark>. Please refer to that site
for bug tracking.
Modified: trunk/Master/texmf-dist/doc/latex/draftwatermark/draftwatermark.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-1.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-1.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -0,0 +1,31 @@
+%%
+%% This is file `test_draftwatermark-1.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% draftwatermark.dtx (with options: `samplecode-modern')
+%%
+\documentclass{article}
+\usepackage[svgnames]{xcolor}
+\usepackage[T1]{fontenc}
+\usepackage[firstpageonly, color={[gray]{0.5}},
+ text=DRAFT\\COPY]{draftwatermark}
+\usepackage{mathptmx}
+\usepackage{lipsum}
+\title{Sample document for the draftwatermark package}
+\author{}
+
+\begin{document}
+\maketitle
+
+\section{One}
+\lipsum[1-3]
+
+\section{Two}
+\lipsum[4-6]
+
+\end{document}
+\endinput
+%%
+%% End of file `test_draftwatermark-1.tex'.
Property changes on: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-1.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-2.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-2.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -0,0 +1,34 @@
+%%
+%% This is file `test_draftwatermark-2.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% draftwatermark.dtx (with options: `samplecode-legacy')
+%%
+\documentclass{article}
+\usepackage[svgnames]{xcolor}
+\usepackage[T1]{fontenc}
+\usepackage[firstpage]{draftwatermark}
+\usepackage{mathptmx}
+\usepackage{lipsum}
+
+\SetWatermarkLightness{0.5}
+\SetWatermarkText{DRAFT\\COPY}
+
+\title{Sample document for the draftwatermark package}
+\author{}
+
+\begin{document}
+\maketitle
+
+\section{One}
+\lipsum[1-3]
+
+\section{Two}
+\lipsum[4-6]
+
+\end{document}
+\endinput
+%%
+%% End of file `test_draftwatermark-2.tex'.
Property changes on: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-2.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-3.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-3.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -0,0 +1,33 @@
+%%
+%% This is file `test_draftwatermark-3.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% draftwatermark.dtx (with options: `samplecode-anchor')
+%%
+\documentclass{article}
+\usepackage[svgnames]{xcolor}
+\usepackage[T1]{fontenc}
+\usepackage[firstpage, anchor=tr, color=red,
+ pos={\dimexpr\paperwidth-5mm, 5mm},
+ angle=-45, fontsize=32pt]{draftwatermark}
+\usepackage{mathptmx}
+\usepackage{lipsum}
+\title{Sample document for the draftwatermark package}
+\author{}
+
+\DraftwatermarkOptions{text=\bfseries DRAFT}
+\begin{document}
+\maketitle
+
+\section{One}
+\lipsum[1-3]
+
+\section{Two}
+\lipsum[4-6]
+
+\end{document}
+\endinput
+%%
+%% End of file `test_draftwatermark-3.tex'.
Property changes on: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-3.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-4.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-4.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-4.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -0,0 +1,39 @@
+%%
+%% This is file `test_draftwatermark-4.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% draftwatermark.dtx (with options: `samplecode-dynamic')
+%%
+\documentclass{article}
+\usepackage[svgnames]{xcolor}
+\usepackage[T1]{fontenc}
+\usepackage[color=red, fontsize=32pt]{draftwatermark}
+\usepackage{mathptmx}
+\usepackage{lipsum}
+\title{Sample document for the draftwatermark package}
+\author{}
+
+\DraftwatermarkOptions{%
+ angle=0,
+ text={\ifodd\thepage ODD\else EVEN\fi},
+ hpos={\ifodd\thepage \dimexpr\paperwidth-5mm\else 5mm\fi},
+ vpos=5mm,
+ vanchor=t,
+ hanchor={\ifodd\thepage r\else l\fi}
+}
+
+\begin{document}
+\maketitle
+
+\section{One}
+\lipsum[1-3]
+
+\section{Two}
+\lipsum[4-6]
+
+\end{document}
+\endinput
+%%
+%% End of file `test_draftwatermark-4.tex'.
Property changes on: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-4.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-5.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-5.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-5.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -0,0 +1,43 @@
+%%
+%% This is file `test_draftwatermark-5.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% draftwatermark.dtx (with options: `samplecode-custom')
+%%
+\documentclass{article}
+\usepackage[svgnames]{xcolor}
+\usepackage[T1]{fontenc}
+\usepackage{draftwatermark}
+\usepackage{mathptmx}
+\usepackage[scaled]{helvet}
+\usepackage{lipsum}
+\title{Sample document for the draftwatermark package}
+\author{}
+
+\newsavebox\wmbox
+\savebox\wmbox{%
+ {\color[rgb]{1,0.8,0.8}\sffamily \fbox{DRAFT}}}
+\newcommand\MyWM{%
+ \ifodd\thepage
+ \hspace*{\dimexpr \paperwidth -\wd\wmbox-10mm}%
+ \usebox{\wmbox}%
+ \else
+ \usebox{\wmbox}%
+ \fi}
+
+\DraftwatermarkOptions{anchor=lt, pos={5mm, 5mm}, markcmd=\MyWM}
+\begin{document}
+\maketitle
+
+\section{One}
+\lipsum[1-3]
+
+\section{Two}
+\lipsum[4-6]
+
+\end{document}
+\endinput
+%%
+%% End of file `test_draftwatermark-5.tex'.
Property changes on: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark-5.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark1.tex 2020-12-08 22:04:48 UTC (rev 57098)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark1.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -1,46 +0,0 @@
-%%
-%% This is file `test_draftwatermark1.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% draftwatermark.dtx (with options: `samplecode-modern')
-%%
-\documentclass{article}
-\usepackage[named]{xcolor}
-\usepackage[T1]{fontenc}
-\usepackage[firstpageonly, color={[gray]{0.5}},
- text=DRAFT\\COPY]{draftwatermark}
-\usepackage{mathptmx}
-\usepackage{lipsum}
-\title{Sample document for the draftwatermark package}
-\author{}
-
-\begin{document}
-\maketitle
-
-\section{One}
-\lipsum[1-3]
-
-\section{Two}
-\lipsum[4-6]
-
-\end{document}
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-\endinput
-%%
-%% End of file `test_draftwatermark1.tex'.
Deleted: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark2.tex 2020-12-08 22:04:48 UTC (rev 57098)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark2.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -1,49 +0,0 @@
-%%
-%% This is file `test_draftwatermark2.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% draftwatermark.dtx (with options: `samplecode-legacy')
-%%
-\documentclass{article}
-\usepackage[named]{xcolor}
-\usepackage[T1]{fontenc}
-\usepackage[firstpage]{draftwatermark}
-\usepackage{mathptmx}
-\usepackage{lipsum}
-
-\SetWatermarkLightness{0.5}
-\SetWatermarkText{DRAFT\\COPY}
-
-\title{Sample document for the draftwatermark package}
-\author{}
-
-\begin{document}
-\maketitle
-
-\section{One}
-\lipsum[1-3]
-
-\section{Two}
-\lipsum[4-6]
-
-\end{document}
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-\endinput
-%%
-%% End of file `test_draftwatermark2.tex'.
Deleted: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark3.tex 2020-12-08 22:04:48 UTC (rev 57098)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark3.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -1,48 +0,0 @@
-%%
-%% This is file `test_draftwatermark3.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% draftwatermark.dtx (with options: `samplecode-anchor')
-%%
-\documentclass{article}
-\usepackage[named]{xcolor}
-\usepackage[T1]{fontenc}
-\usepackage[firstpage, anchor=tr, color=red,
- pos={\dimexpr\paperwidth-5mm, 5mm},
- angle=-45, fontsize=32pt]{draftwatermark}
-\usepackage{mathptmx}
-\usepackage{lipsum}
-\title{Sample document for the draftwatermark package}
-\author{}
-
-\DraftwatermarkOptions{text=\bfseries DRAFT}
-\begin{document}
-\maketitle
-
-\section{One}
-\lipsum[1-3]
-
-\section{Two}
-\lipsum[4-6]
-
-\end{document}
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-\endinput
-%%
-%% End of file `test_draftwatermark3.tex'.
Deleted: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark4.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark4.tex 2020-12-08 22:04:48 UTC (rev 57098)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark4.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -1,54 +0,0 @@
-%%
-%% This is file `test_draftwatermark4.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% draftwatermark.dtx (with options: `samplecode-dynamic')
-%%
-\documentclass{article}
-\usepackage[named]{xcolor}
-\usepackage[T1]{fontenc}
-\usepackage[color=red, fontsize=32pt]{draftwatermark}
-\usepackage{mathptmx}
-\usepackage{lipsum}
-\title{Sample document for the draftwatermark package}
-\author{}
-
-\DraftwatermarkOptions{%
- angle=0,
- text={\ifodd\thepage ODD\else EVEN\fi},
- hpos={\ifodd\thepage \dimexpr\paperwidth-5mm\else 5mm\fi},
- vpos=5mm,
- vanchor=t,
- hanchor={\ifodd\thepage r\else l\fi}
-}
-
-\begin{document}
-\maketitle
-
-\section{One}
-\lipsum[1-3]
-
-\section{Two}
-\lipsum[4-6]
-
-\end{document}
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-\endinput
-%%
-%% End of file `test_draftwatermark4.tex'.
Deleted: trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark5.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark5.tex 2020-12-08 22:04:48 UTC (rev 57098)
+++ trunk/Master/texmf-dist/doc/latex/draftwatermark/test_draftwatermark5.tex 2020-12-08 22:05:54 UTC (rev 57099)
@@ -1,58 +0,0 @@
-%%
-%% This is file `test_draftwatermark5.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% draftwatermark.dtx (with options: `samplecode-custom')
-%%
-\documentclass{article}
-\usepackage[named]{xcolor}
-\usepackage[T1]{fontenc}
-\usepackage{draftwatermark}
-\usepackage{mathptmx}
-\usepackage[scaled]{helvet}
-\usepackage{lipsum}
-\title{Sample document for the draftwatermark package}
-\author{}
-
-\newsavebox\wmbox
-\savebox\wmbox{%
- {\color[rgb]{1,0.8,0.8}\sffamily \fbox{DRAFT}}}
-\newcommand\MyWM{%
- \ifodd\thepage
- \hspace*{\dimexpr \paperwidth -\wd\wmbox-10mm}%
- \usebox{\wmbox}%
- \else
- \usebox{\wmbox}%
- \fi}
-
-\DraftwatermarkOptions{anchor=lt, pos={5mm, 5mm}, markcmd=\MyWM}
-\begin{document}
-\maketitle
-
-\section{One}
-\lipsum[1-3]
-
-\section{Two}
-\lipsum[4-6]
-
-\end{document}
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-\endinput
-%%
-%% End of file `test_draftwatermark5.tex'.
Modified: trunk/Master/texmf-dist/source/latex/draftwatermark/draftwatermark.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/draftwatermark/draftwatermark.dtx 2020-12-08 22:04:48 UTC (rev 57098)
+++ trunk/Master/texmf-dist/source/latex/draftwatermark/draftwatermark.dtx 2020-12-08 22:05:54 UTC (rev 57099)
@@ -8,14 +8,16 @@
% a contribution to the LaTeX2e system.
% ---------------------------------------------
%
-% It may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3. This license is at
-% https://www.latex-project.org/lppl/ and is part
-% of all distributions of LaTeX version 2005/12/01 or later.
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, version 1.3c.
+% This license is in
+% https://www.latex-project.org/lppl/lppl-1-3c/
+% and is part of all distributions of LaTeX later than
+% 2008-05-04.
%
-% This work has the LPPL maintenance status "author-maintained".
+% This work has the LPPL maintenance status "maintained".
%
-% This program consists of the files listed in the README file
+% This program consists of the files listed in the README.md file
% included in the package.
%
%<*driver>
@@ -27,41 +29,9 @@
\usepackage{textcomp}
\usepackage{url}
\EnableCrossrefs
-
-\setcounter{IndexColumns}{2}
-\setlength{\IndexMin}{3cm}
-
-\DoNotIndex{\\}
-\DoNotIndex{\begin, \end, \begingroup, \endgroup}
-\DoNotIndex{\csname, \endcsname}
-\DoNotIndex{\if, \else, \fi}
-\DoNotIndex{\ifx, \fi}
-\DoNotIndex{\ifodd, \fi}
-\DoNotIndex{\@car, \@empty, \@ifnextchar, \@nil, \@onelevel at sanitize,
- \@tempboxa, \@tempdima, \@tempdimb, \@tfor}
-\DoNotIndex{\AddEverypageHook, \AddThispageHook, \addtolength, \author}
-\DoNotIndex{\bfseries, \box}
-\DoNotIndex{\color}
-\DoNotIndex{\DeclareBoolOption, \DeclareComplementaryOption,
- \DeclareStringOption, \def, \define at key, \dimexpr, \DisableKeyvalOption,
- \do, \documentclass, \dp}
-\DoNotIndex{\edef, \expandafter}
-\DoNotIndex{\fbox, \fontsize}
-\DoNotIndex{\hbox, \hspace, \hss, \ht}
-\DoNotIndex{\let, \lipsum}
-\DoNotIndex{\maketitle, \MyWM}
-\DoNotIndex{\newcommand, \newsavebox, \NeedsTeXFormat}
-\DoNotIndex{\PackageError, \paperheight, \paperwidth,
- \ProcessKeyvalOptions, \ProvidesPackage}
-\DoNotIndex{\relax, \RequirePackage, \rotatebox}
-\DoNotIndex{\savebox, \sbox, \scalebox, \section, \selectfont, \setkeys,
- \setlength, \sffamily, \shortstack}
-\DoNotIndex{\thepage, \title}
-\DoNotIndex{\usebox, \usepackage}
-\DoNotIndex{\vbox, \vspace, \vss}
-\DoNotIndex{\wd, \wmbox}
-
\CodelineIndex
+\RecordChanges
+\CodelineIndex
%\RecordChanges
\begin{document}
\DocInput{draftwatermark.dtx}
@@ -70,13 +40,48 @@
%
% \fi
%
-% \CheckSum{291}
+% \CheckSum{576}
%
% \def\filename{draftwatermark.dtx}
-% \def\fileversion{2.2}
-% \def\filedate{2020/06/29}
-% \def\docdate{2020/06/29}
+% \def\fileversion{3.0}
+% \def\filedate{2020/12/08}
+% \def\docdate{2020/12/08}
%
+% \DoNotIndex{\\}
+% \DoNotIndex{\begin, \end, \begingroup, \endgroup}
+% \DoNotIndex{\csname, \endcsname}
+% \DoNotIndex{\if, \else, \fi}
+% \DoNotIndex{\ifx, \fi}
+% \DoNotIndex{\ifodd, \fi}
+% \DoNotIndex{\@car, \@empty, \@ifnextchar, \@ifundefined, \@nil,
+% \@onelevel at sanitize, \@tempboxa, \@tempdima, \@tempdimb, \@tfor}
+% \DoNotIndex{\AddEverypageHook, \AddThispageHook, \AddToHook, \AddToHookNext,
+% \addtolength, \author}
+% \DoNotIndex{\bfseries, \box}
+% \DoNotIndex{\color}
+% \DoNotIndex{\DeclareBoolOption, \DeclareComplementaryOption,
+% \DeclareStringOption, \def, \define at key, \depth, \dimexpr,
+% \DisableKeyvalOption, \do, \documentclass, \dp}
+% \DoNotIndex{\edef, \endinput, \expandafter}
+% \DoNotIndex{\fbox, \fontsize}
+% \DoNotIndex{\hbox, \hspace, \hss, \ht}
+% \DoNotIndex{\let, \lipsum}
+% \DoNotIndex{\maketitle, \MyWM, \MessageBreak}
+% \DoNotIndex{\newcommand, \newsavebox, \NeedsTeXFormat}
+% \DoNotIndex{\PackageError, \PackageWarningNoLine, \paperheight,
+% \paperwidth, \ProcessKeyvalOptions, \ProvidesPackage, \put}
+% \DoNotIndex{\raisebox, \relax, \RequirePackage, \RequirePackageWithOptions,
+% \rotatebox}
+% \DoNotIndex{\savebox, \sbox, \scalebox, \section, \selectfont, \setkeys,
+% \SetupKeyvalOptions, \setlength, \sffamily, \shortstack}
+% \DoNotIndex{\thepage, \title}
+% \DoNotIndex{\usebox, \usepackage}
+% \DoNotIndex{\vbox, \vspace, \vss}
+% \DoNotIndex{\wd, \wmbox}
+%
+% \setcounter{IndexColumns}{2}
+% \setlength{\IndexMin}{3cm}
+%
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
% \newcommand*{\Lopt}[1]{\texttt {#1}} ^^A typeset an option
% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
@@ -97,28 +102,30 @@
% \maketitle
%
% \begin{abstract}
-% The \Lpack{draftwatermark} package extends \LaTeX\ providing a means
-% to add a watermark (typically textual and light gray, but possibly
-% more sophisticated) on the pages of a document (either on every page,
-% on the first page, or on selected pages). Typical usage may consist in
-% writing words such as ``DRAFT'' or ``CONFIDENTIAL'' across the
-% pages. The package may remind in some sense \Lpack{draftcopy} by
-% Dr.~Juergen Vollmer, but its implementation is lighter (as the reduced
-% code footprint shows) and does not rely on postscript specials, making
-% the package fully compatible with \hologo{pdfLaTeX}, \hologo{XeLaTeX}
-% and \hologo{LuaLaTeX}. The \Lpack{draftwatermark} package depends on
-% \Lpack{everypage} by the same author. Its feature set is somehow
-% restricted because the emphasis is on the simplicity of the
-% interface. For complex layouts, \Lpack{scrlayer.sty} from the
-% \emph{KOMA script} bundle may represent a valuable alternative.
+% The \Lpack{draftwatermark} package extends \hologo{LaTeX} providing a
+% means to add a watermark (typically textual and light gray, but
+% possibly more sophisticated) on the pages of a document (either on
+% every page, on the first page, or on selected pages). Typical usage
+% may consist in writing words such as ``DRAFT'' or ``CONFIDENTIAL''
+% across the pages. The package may remind in some sense
+% \Lpack{draftcopy} by Dr.~Juergen Vollmer, but its implementation is
+% lighter (as the reduced code footprint shows) and does not rely on
+% postscript specials, making the package fully compatible with
+% \hologo{pdfLaTeX}, \hologo{XeLaTeX} and \hologo{LuaLaTeX}. Its feature
+% set is somehow restricted because the emphasis is on the simplicity of
+% the interface. For complex layouts, consider \Lpack{scrlayer.sty} from
+% the \emph{KOMA script} bundle or directly using the new \hologo{LaTeX}
+% shipout hooks.
% \end{abstract}
%
% \section{Introduction}
-%
-% This package extends \LaTeX\ providing a means to add a textual, usually
-% light gray (but possibly colored) watermark on every page, the first
-% page, or selected pages of a document. Typical usage may consist in
-% writing words such as ``DRAFT'' or ``CONFIDENTIAL'' across document
+%
+% \changes{R1.0}{2006/06/30}{Initial release.}%
+% \changes{R1.1}{2012/01/06}{Many small fixes in the documentation.}
+% This package extends \hologo{LaTeX} providing a means to add a textual,
+% usually light gray (but possibly colored) watermark on every page, the
+% first page, or selected pages of a document. Typical usage may consist
+% in writing words such as ``DRAFT'' or ``CONFIDENTIAL'' across document
% pages.
%
% The package may remind in some sense \Lpack{draftcopy} by Dr.~Juergen
@@ -162,11 +169,10 @@
% other packages affecting the page building, e.g., with respect to the
% stacking order of the objects on the page. For any complex layout, or
% when the Z-ordering is important, the recommendation is to look at the
-% \Lpack{scrlayer} package in the \emph{KOMA script} bundle.
+% \Lpack{scrlayer} package in the \emph{KOMA script} bundle or to rely
+% directly on the new shipout hook mechanism provided by \hologo{LaTeX}.
%
-% For the actual page building \Lpack{draftwatermark} depends on the
-% \Lpack{everypage} package by the same author.
-%
+%
% \section{User interface}
% When loaded, \Lpack{draftwatermark} sets up a number of defaults
% (detailed later and modifiable by specific commands) and immediately
@@ -185,7 +191,8 @@
% |\usepackage[<options>]{draftwatermark}|
% \end{quote}
%
-% \DescribeMacro{\DraftwatermarkOptions}
+% \DescribeMacro{\DraftwatermarkOptions}
+% \changes{R2.0}{2020/03/08}{Introduction of a keyval option mechanism.}
% The package behavior can also be dynamically changed \emph{after the
% package is loaded} by the command |\DraftwatermarkOptions{<options>}|
% that can be used anywhere in the document source. In either case,
@@ -198,11 +205,13 @@
% command is a bit quirky, hence when specifying options with the
% |<key>=<value>| syntax, some values that are accepted by
% |\DraftwatermarkOptions| may cause issues when specifying options with
-% |\usepackage|.
-% \medskip
+% |\usepackage|. \medskip
%
% The available options are:
% \begin{itemize}
+% \changes{R1.1}{2012/01/06}{Introduce the ``stamp'', ``nostamp'' and
+% ``final'' options to control whether the watermark should actually
+% be printed.}^^A
% \item \verb!firstpageonly=true|false!\\
% If no value is provided, |true| is assumed. Default is |false|.\\
% Instructs \Lpack{draftwatermark} to only apply the watermark on the
@@ -322,21 +331,21 @@
% fact, sufficiently large to get the word ``DRAFT'', rotated at
% 45\textdegree, take about half of the page width.
%
-% Nonetheless asking for a large font may not work, if \LaTeX\ has not
-% been set up to use \emph{scalable} fonts. For this reason, the
-% recommendation is to always use \Lpack{draftwatermark} on \LaTeX\ or
-% \hologo{pdfLaTeX} together with other packages that trigger the usage of
-% fully scalable fonts (practical examples may be \Lpack{newtx} or
+% Nonetheless asking for a large font may not work, if \hologo{LaTeX} has
+% not been set up to use \emph{scalable} fonts. For this reason, the
+% recommendation is to always use \Lpack{draftwatermark} on \hologo{LaTeX}
+% or \hologo{pdfLaTeX} together with other packages that trigger the usage
+% of fully scalable fonts (practical examples may be \Lpack{newtx} or
% \Lpack{mathptmx}, etc.). An even better alternative is to use modern
% \TeX\ engines, as in \hologo{XeLaTeX} or \hologo{LuaLaTeX} with
% \Lpack{fontspec}. In any case, recall that even with scalable fonts,
-% \LaTeX\ may be unable to deal with extremely large font sizes (e.g.,
-% $\gg 5\,\mathrm{cm}$). If really large letters are required for the
-% watermark, a suitable combination of |fontsize| and |scale| may be
+% \hologo{LaTeX} may be unable to deal with extremely large font sizes
+% (e.g., $\gg 5\,\mathrm{cm}$). If really large letters are required for
+% the watermark, a suitable combination of |fontsize| and |scale| may be
% needed.
%
-% One can immediately realize when \LaTeX\ is unable to deal with the
-% package default or selected |fontsize| from two things: (i) a font
+% One can immediately realize when \hologo{LaTeX} is unable to deal with
+% the package default or selected |fontsize| from two things: (i) a font
% warning from \LaTeX; and (ii) a tiny watermark text whose size seems not
% to react to the |fontsize| option. In this case, either switch to
% scalable fonts or select a small |fontsize| (e.g., |12pt|) together with
@@ -352,21 +361,21 @@
% (e.g., |\bfseries|). In fact, it is also possible to use a command to
% include an image as the text. In case line breaks are present, the text
% is left, right, center aligned according to the |alignment| option. A
-% word of caution is necessary, though. To use \LaTeX\ commands in the
-% watermark text, please configure the latter via the
+% word of caution is necessary, though. To use \hologo{LaTeX} commands in
+% the watermark text, please configure the latter via the
% |\DraftwatermarkOptions| command. Trying to do so by passing options to
% the \Lpack{draftwatermark} package via the |\usepackage| mechanism may
-% fail due to how \LaTeX\ parses option strings. Also note that the text
-% may need to be surrounded by braces.
+% fail due to how \hologo{LaTeX} parses option strings. Also note that the
+% text may need to be surrounded by braces.
%
% If the watermark text includes line breaks, \Lpack{draftwatermark} will
% use a very thin interline space, according to the fact that the
-% multi-line text is managed by surrounding the it with a \LaTeX\
+% multi-line text is managed by surrounding the it with a \hologo{LaTeX}
% |shortstack| command.
%
-% Also, note that the watermark typesetting happens inside a \TeX\
-% group, to make sure that any parameter setting you do in the |text|
-% token list can stay local.
+% Also, note that the watermark typesetting happens inside a \TeX\ group,
+% to make sure that any parameter setting you do in the |text| token list
+% can stay local.
%
% As a further remark, observe that in order to only put a watermark on
% selected pages, an alternative to changing the |stamp| configuration
@@ -391,18 +400,21 @@
% anchoring.
%
% As a final remark, observe that the specification of the positioning
-% coordinates can be based on \LaTeX\ macros. For instance, one can set
-% the horizontal position |hpos| at |0.5\paperwidth| (for centering) or at
-% |\dimexpr\paperwidth-5mm| (for placement at the right hand side of the
-% page). Interestingly, \Lpack{draftwatermark} re-evaluates the
+% coordinates can be based on \hologo{LaTeX} macros. For instance, one can
+% set the horizontal position |hpos| at |0.5\paperwidth| (for centering)
+% or at |\dimexpr\paperwidth-5mm| (for placement at the right hand side of
+% the page). Interestingly, \Lpack{draftwatermark} re-evaluates the
% positioning coordinates on every page. This means that positions based
% on |\paperwidth| or |\paperheight| should dynamically adjust if the page
-% size is changed through the document. To some extent, this is also true
+% size is changed through the document.
+% \changes{R2.1}{2020/05/11}{Let anchor directives be re-evaluated on
+% every page.}^^A
+% To some extent, this is also true
% of the anchor options. For instance, one may set the horizontal anchor
% |hanchor| at |\ifodd\thepage r\else l\fi| causing the anchor point to
% alternate between |r| and |l| at every new page. In conjunction with a
% similarly conditional |hpos| setting, for instance
-% |\ifodd\thepage \dimexpr\paperwidth-5mm\else 5mm\fi|, this enables
+% |\ifodd\thepage \dimexpr\paperwidth-5mm \else 5mm\fi|, this enables
% interesting effects, like placing the watermark close to the right side
% of the page on odd pages and to the left side of the page on even
% pages. Obviously, this kind of setting is only applicable with the
@@ -442,8 +454,33 @@
%
% \end{sloppy}
%
-% \section{Compatibility notes for package version 2.0 and later}
+% \section{Compatibility notes}
%
+% \subsection{Compatibility notes for package version 3.0 and later}
+%
+% \changes{R3.0}{2020/12/08}{Remove dependency on package
+% \Lpack{everypage}.}^^A
+% Version 3.0 of the package takes advantage of the new functionalities
+% introduced in \hologo{LaTeX} with the Fall 2020 release and gets rid of
+% its dependency on \Lpack{everypage}. In principle, this could result in
+% behavioral differences in corner cases.
+%
+% \changes{R3.0}{2020/12/08}{Automatically load legacy code for older
+% \hologo{LaTeX} formats.}^^A
+% For users of versions of \hologo{LaTeX} before Fall 2020,
+% \Lpack{draftwatermarks} falls back to its own legacy code base, now
+% packaged as \Lpack{draftwatermark-2x}.
+%
+% It is worth remarking that there is no advantage in trying to explicitly
+% load \Lpack{draftwatermark-2x} on a modern \hologo{LaTeX} to try to get
+% the past behavior. In fact, even if the old code base uses
+% \Lpack{everypage}, on modern \hologo{LaTeX} formats, the latter tries
+% itself to rely on the new \hologo{LaTeX} functionalities rather than its
+% own legacy mechanisms.
+%
+% \subsection{Compatibility notes for package version 2.0 and later}
+%
+% \changes{R2.0}{2020/03/08}{Complete package overhaul.}
% Version 2.0 of the package is an almost complete rewrite with respect to
% version 1.2. Specifically, all the configuration mechanism has been
% overhauled, by moving to an interface based on configuration keys and
@@ -465,6 +502,8 @@
% Command |\SetWatermarkAngle{<real>}| is the same as\\
% |\DraftwatermarkOptions{angle=<real>}|.
% \item \DescribeMacro{\SetWatermarkColor}^^A
+% \changes{R1.1}{2012/01/06}{Add support for specifying color
+% of textual watermark.}^^A
% Command |\SetWatermarkColor[<model>]{<color spec>}| is the same as\\
% |\DraftwatermarkOptions{color={[<model>]{<color spec>}}}|.
% \item \DescribeMacro{\SetWatermarkLightness}^^A
@@ -478,14 +517,18 @@
% Command |\SetWatermarkScale{<real>}| is the same as\\
% |\DraftwatermarkOptions{scale=<real>}|.
% \item \DescribeMacro{\SetWatermarkHorCenter}^^A
+% \changes{R1.2}{2015/02/19}{Add support for specifying the watermark
+% horizontal position.}^^A
% Command |\SetWatermarkHorCenter{<length>}| is the same as\\
% |\DraftwatermarkOptions{hpos=<length>, hanchor=c}|.
% \item \DescribeMacro{\SetWatermarkVerCenter}^^A
+% \changes{R1.2}{2015/02/19}{Add support for specifying the watermark
+% vertical position.}^^A
% Command |\SetWatermarkVerCenter{<length>}| is the same as\\
% |\DraftwatermarkOptions{vpos=<length>, vanchor=m}|.
% \item \DescribeMacro{\SetWatermarkText}^^A
% Command |\SetWatermarkText{<text>}| is the same as\\
-% |\DraftwatermarkOptions{text=<text>}|.
+% |\DraftwatermarkOptions{text={<text>}}|.
% \end{itemize}
%
% Note that the legacy interface supports only a subset of what is
@@ -503,7 +546,7 @@
% \fi
% \begin{macrocode}
\documentclass{article}
-\usepackage[named]{xcolor}
+\usepackage[svgnames]{xcolor}
\usepackage[T1]{fontenc}
\usepackage[firstpageonly, color={[gray]{0.5}},
text=DRAFT\\COPY]{draftwatermark}
@@ -526,7 +569,6 @@
% \iffalse
%</samplecode-modern>
% \fi
-% \makeatletter \c at CodelineNo\z@ \makeatother
%
% This produces a two pages document with placeholder content, putting a
% page-centered watermark on the first page only. The watermark is made a
@@ -541,7 +583,7 @@
% \fi
% \begin{macrocode}
\documentclass{article}
-\usepackage[named]{xcolor}
+\usepackage[svgnames]{xcolor}
\usepackage[T1]{fontenc}
\usepackage[firstpage]{draftwatermark}
\usepackage{mathptmx}
@@ -567,7 +609,6 @@
% \iffalse
%</samplecode-legacy>
% \fi
-% \makeatletter \c at CodelineNo\z@ \makeatother
%
% \subsection{Things that cannot be done with the legacy interface}
%
@@ -581,7 +622,7 @@
% \fi
% \begin{macrocode}
\documentclass{article}
-\usepackage[named]{xcolor}
+\usepackage[svgnames]{xcolor}
\usepackage[T1]{fontenc}
\usepackage[firstpage, anchor=tr, color=red,
pos={\dimexpr\paperwidth-5mm, 5mm},
@@ -606,7 +647,6 @@
% \iffalse
%</samplecode-anchor>
% \fi
-% \makeatletter \c at CodelineNo\z@ \makeatother
%
% Another interesting possibility of the modern interface derives from the
% fact that the positioning and anchoring options are re-evaluated for
@@ -619,7 +659,7 @@
% \fi
% \begin{macrocode}
\documentclass{article}
-\usepackage[named]{xcolor}
+\usepackage[svgnames]{xcolor}
\usepackage[T1]{fontenc}
\usepackage[color=red, fontsize=32pt]{draftwatermark}
\usepackage{mathptmx}
@@ -650,7 +690,6 @@
% \iffalse
%</samplecode-dynamic>
% \fi
-% \makeatletter \c at CodelineNo\z@ \makeatother
%
% \subsection{Maximum freedom with a custom watermarking command}
%
@@ -662,7 +701,7 @@
% \fi
% \begin{macrocode}
\documentclass{article}
-\usepackage[named]{xcolor}
+\usepackage[svgnames]{xcolor}
\usepackage[T1]{fontenc}
\usepackage{draftwatermark}
\usepackage{mathptmx}
@@ -697,7 +736,6 @@
% \iffalse
%</samplecode-custom>
% \fi
-% \makeatletter \c at CodelineNo\z@ \makeatother
%
%
% \section{Development and support}
@@ -711,23 +749,10 @@
% requests that, from the present document, would evidently require moving
% against some fundamental design decisions.
%
-% \section{Changelog}
-%
-% \begin{description}
-% \item[1.0 - 2006/06/30] Initial version.
-% \item[1.1 - 2012/01/06] Add support for colored watermarks; options to
-% disable watermarking; many small fixes in the documentation.
-% \item[1.2 - 2015/02/19] Add support for watermark position.
-% \item[2.0 - 2020/03/08] Configuration management overhaul; introduction
-% of a legacy interface for compatibility.
-% \item[2.1 - 2020/05/11] Allow anchor information to be re-evaluated on
-% every page.
-% \item[2.2 - 2020/06/29] Make line breaks in watermark text work.
-% \end{description}
-%
% \StopEventually {}
%
% \section{Implementation}
+% \subsection{Implementation of \Lpack{draftwatermark}}
%
% Announce the name and version of the package, which requires
% \LaTeXe.
@@ -737,10 +762,280 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{draftwatermark}%
- [2020/06/29 2.2 Put a gray textual watermark on document pages]
+ [2020/12/08 3.0 Put a gray textual watermark on document pages]
+% \end{macrocode}
+% \changes{R3.0}{2020/12/08}{Automatically load legacy code for older
+% \hologo{LaTeX} formats.}^^A
+% Depending on the actual functionalities provided by \hologo{LaTeX}
+% consider loading \Lpack{draftwatermark-2x}. If so doing, warn about this,
+% and hand over the operation to that package.
+% \begin{macrocode}
+\@ifundefined{AddToHook}{%
+ \PackageWarningNoLine{draftwatermark}{%
+ You appear to be running a version of LaTeX\MessageBreak
+ unsupported by current draftwatermark.\MessageBreak
+ Forcing fallback to `draftwatermark-2x` that\MessageBreak
+ uses an older code base}%
+ \RequirePackageWithOptions{draftwatermark-2x}%
+ \endinput}{}
+% \end{macrocode}
+%
+% Require the needed packages.
+% \begin{macrocode}
+\RequirePackage{kvoptions}
+\RequirePackage{graphicx}
+\RequirePackage{color}
+% \end{macrocode}
+%
+% Define the configuration options and default values.
+% \begin{macrocode}
+\DeclareBoolOption[false]{firstpageonly}
+\define at key{draftwatermark}{firstpage}[true]{%
+ \csname draftwatermark at firstpageonly#1\endcsname}
+\DeclareBoolOption[true]{stamp}
+\DeclareComplementaryOption{nostamp}{stamp}
+\DeclareComplementaryOption{final}{stamp}
+\DeclareStringOption[45]{angle}
+\DeclareStringOption[1]{scale}
+\DeclareStringOption[DRAFT]{text}
+\DeclareStringOption[0.5\paperwidth]{hpos}
+\DeclareStringOption[0.5\paperheight]{vpos}
+\DeclareStringOption[0.25\paperwidth]{fontsize}
+\DeclareStringOption[gray]{colormodel}
+\DeclareStringOption[0.8]{colorspec}
+\DeclareStringOption[c]{hanchor}
+\DeclareStringOption[m]{vanchor}
+\DeclareStringOption[c]{alignment}
+\DeclareStringOption[\DraftwatermarkStdMark]{markcmd}
+\define at key{draftwatermark}{pos}{%
+ \draftwatermark at processpos #1\@nil}
+\define at key{draftwatermark}{anchor}{%
+ \draftwatermark at processanchor{#1}}
+\define at key{draftwatermark}{color}{%
+ \draftwatermark at processcolor #1\@nil}
+% \end{macrocode}
+%
+% Set up some helper marcros to process the options. These should be
+% rather self-explanatory.
+% \begin{macrocode}
+\def\draftwatermark at processpos#1,#2\@nil{%
+ \def\draftwatermark at hpos{#1}%
+ \def\draftwatermark at vpos{#2}}
+\def\draftwatermark at processanchor#1{%
+ \def\draftwatermark at tempa{#1}
+ \@onelevel at sanitize \draftwatermark at tempa
+ \expandafter \@tfor \expandafter \draftwatermark at tempb
+ \expandafter :\expandafter =\draftwatermark at tempa
+ \do
+ {%
+ \if \draftwatermark at tempb l%
+ \def \draftwatermark at hanchor{l}%
+ \else \if \draftwatermark at tempb c%
+ \def \draftwatermark at hanchor{c}%
+ \else \if \draftwatermark at tempb r%
+ \def \draftwatermark at hanchor{r}%
+ \else \if \draftwatermark at tempb t%
+ \def \draftwatermark at vanchor{t}%
+ \else \if \draftwatermark at tempb m%
+ \def \draftwatermark at vanchor{m}%
+ \else \if \draftwatermark at tempb b%
+ \def \draftwatermark at vanchor{b}
+ \else
+ \PackageError{draftwatermark}{%
+ Illegal anchor directive `\draftwatermark at tempb'}%
+ {Directive has been ingnored.}%
+ \fi\fi\fi\fi\fi\fi
+ }}
+
+\def\draftwatermark at processcolor{%
+ \@ifnextchar[
+ \draftwatermark at processcolor@ii\draftwatermark at processcolor@i}
+
+\def\draftwatermark at processcolor@i#1\@nil{%
+ \def\draftwatermark at colormodel{}%
+ \def\draftwatermark at colorspec{#1}}
+
+\def\draftwatermark at processcolor@ii[#1]#2\@nil{%
+ \def\draftwatermark at colormodel{#1}%
+ \def\draftwatermark at colorspec{#2}}
+
% \end{macrocode}
%
+% Process the package options\dots
+% \begin{macrocode}
+\ProcessKeyvalOptions*
+% \end{macrocode}
+%
+% \dots\, and then disable the |firstpageonly| and |firstpage| options,
+% that can only be used at the package loading time.
+% \begin{macrocode}
+\DisableKeyvalOption{draftwatermark}{firstpageonly}
+\DisableKeyvalOption{draftwatermark}{firstpage}
+
+% \end{macrocode}
+%
+% \begin{macro}{\DraftwatermarkOptions}
+% Set up a command to modify the configuration as needed.
+% \begin{macrocode}
+\newcommand\DraftwatermarkOptions[1]{\setkeys{draftwatermark}{#1}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% Introduce the legacy interface.
+% \begin{macro}{\SetWatermarkAngle}
+% Legacy command to set the rotation angle for the standard watermark
+% \begin{macrocode}
+\newcommand\SetWatermarkAngle[1]{\DraftwatermarkOptions{angle=#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\SetWatermarkFontSize}
+% Legacy command to set the font size for the standard watermark
+% \begin{macrocode}
+\newcommand\SetWatermarkFontSize[1]{\DraftwatermarkOptions{fontsize=#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\SetWatermarkScale}
+% Legacy command to set the scale for the standard watermark
+% \begin{macrocode}
+\newcommand\SetWatermarkScale[1]{\DraftwatermarkOptions{scale=#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\SetWatermarkHorCenter}
+% \begin{macro}{\SetWatermarkVerCenter}
+% Legacy commands to set the horizontal and vertical position for the
+% standard watermark, also forcing it to be centered there.
+% \begin{macrocode}
+\newcommand\SetWatermarkHorCenter[1]{%
+ \DraftwatermarkOptions{hpos=#1, hanchor=c}}
+\newcommand\SetWatermarkVerCenter[1]{%
+ \DraftwatermarkOptions{vpos=#1, vanchor=m}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\SetWatermarkText}
+% \changes{R2.3}{2020/12/06}{Fix legacy interface to accept
+% text including commas.}^^A
+% Legacy command to set the text of the standard watermark
+% \begin{macrocode}
+\newcommand\SetWatermarkText[1]{\DraftwatermarkOptions{text={#1}}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\SetWatermarColor}
+% \begin{macro}{\SetWatermarkLightness}
+% Legacy commands to set the color for the
+% standard watermark.
+% \begin{macrocode}
+\newcommand\SetWatermarkColor[2][]{%
+ \DraftwatermarkOptions{colormodel=#1, colorspec=#2}}
+\newcommand\SetWatermarkLightness[1]{%
+ \DraftwatermarkOptions{colormodel=gray, colorspec=#1}}
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DraftwatermarkStdMark}
+% The command to generate the standard watermark
+% \changes{R2.2}{2020/06/29}{Wrap watermark text in a shortstack to make
+% line breaks possible.}
+% \begin{macrocode}
+\newcommand\DraftwatermarkStdMark{%
+ \rotatebox{\draftwatermark at angle}{%
+ \scalebox{\draftwatermark at scale}{%
+ \begingroup
+ \ifx\draftwatermark at colormodel\@empty
+ \color{\draftwatermark at colorspec}%
+ \else
+ \color[\draftwatermark at colormodel]{\draftwatermark at colorspec}%
+ \fi
+ \setlength{\@tempdima}{\draftwatermark at fontsize}%
+ \fontsize{\@tempdima}{1.2\@tempdima}\selectfont
+ \shortstack[\draftwatermark at alignment]{\draftwatermark at text}%
+ \endgroup}}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% The code to actually print the watermark
+% \begin{macrocode}
+\newcommand\draftwatermark at printwm[1]{%
+ \sbox\@tempboxa{\raisebox{\depth}{#1}}%
+ \setlength{\@tempdima}{\draftwatermark at hpos}%
+ \setlength{\@tempdimb}{-\draftwatermark at vpos}%
+ \edef \draftwatermark at tempa{\draftwatermark at hanchor}%
+ \@onelevel at sanitize \draftwatermark at tempa
+ \expandafter\def\expandafter\draftwatermark at tempb
+ \expandafter{\expandafter\@car \draftwatermark at tempa\@nil}%
+ \if \draftwatermark at tempb r%
+ \addtolength\@tempdima{-\wd\@tempboxa}%
+ \else\if \draftwatermark at tempb c%
+ \addtolength\@tempdima{-0.5\wd\@tempboxa}%
+ \else\if \draftwatermark at tempb l%
+ \relax
+ \else
+ \PackageError{draftwatermark}{%
+ Illegal anchor directive `\draftwatermark at tempb'}%
+ {Anchoring to left side.}%
+ \fi\fi\fi
+ \edef \draftwatermark at tempa{\draftwatermark at vanchor}%
+ \@onelevel at sanitize \draftwatermark at tempa
+ \expandafter\def\expandafter\draftwatermark at tempb
+ \expandafter{\expandafter\@car \draftwatermark at tempa\@nil}%
+ \if \draftwatermark at tempb b%
+ \relax
+ \else\if \draftwatermark at tempb m%
+ \addtolength\@tempdimb{-0.5\ht\@tempboxa}%
+ \else\if \draftwatermark at tempb t%
+ \addtolength\@tempdimb{-\ht\@tempboxa}%
+ \else
+ \PackageError{draftwatermark}{%
+ Illegal anchor directive `\draftwatermark at tempb'}%
+ {Anchoring to top side.}%
+ \fi\fi\fi
+ \put(\@tempdima,\@tempdimb){\usebox\@tempboxa}%
+}
+
+% \end{macrocode}
+%
+% A wrapper to make the watermark printing conditional
+% \begin{macrocode}
+\newcommand\draftwatermark at print[1]{%
+ \ifdraftwatermark at stamp
+ \draftwatermark at printwm{#1}%
+ \fi}
+% \end{macrocode}
+%
+% \dots\, and finally the code to set up the \Lpack{everypage} hooks to
+% assure that the watermark printing commands are called when needed
+% \begin{macrocode}
+\ifdraftwatermark at firstpageonly
+ \AddToHookNext{shipout/background}{%
+ \draftwatermark at print{\draftwatermark at markcmd}}%
+\else
+ \AddToHook{shipout/background}{%
+ \draftwatermark at print{\draftwatermark at markcmd}}%
+\fi
+% \end{macrocode}
+% \iffalse
+%</draftwatermark>
+% \fi
+%
+% \subsection{Implementation of \Lpack{draftwatermark-2x}}
+%
+% Announce the name and version of the package, which requires
+% \LaTeXe.
+% \iffalse
+%<*draftwatermark-2x>
+% \fi
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{draftwatermark}%
+ [2020/12/06 2.3 Put a gray textual watermark on document pages]
+
+% \end{macrocode}
+%
% Require the needed packages.
% \begin{macrocode}
\RequirePackage{kvoptions}
@@ -749,6 +1044,11 @@
\RequirePackage{color}
% \end{macrocode}
+% Set up options and assumptions for the \Lpack{kvoptions} package
+% \begin{macrocode}
+\SetupKeyvalOptions{family=draftwatermark, prefix=draftwatermark@}
+
+% \end{macrocode}
%
% Define the configuration options and default values.
% \begin{macrocode}
@@ -879,9 +1179,11 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\SetWatermarkText}
+% \changes{R2.3}{2020/12/06}{Fix legacy interface to accept
+% text including commas.}^^A
% Legacy command to set the text of the standard watermark
% \begin{macrocode}
-\newcommand\SetWatermarkText[1]{\DraftwatermarkOptions{text=#1}}
+\newcommand\SetWatermarkText[1]{\DraftwatermarkOptions{text={#1}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\SetWatermarColor}
@@ -985,30 +1287,31 @@
\AddEverypageHook{\draftwatermark at print{\draftwatermark at markcmd}}
\fi
% \end{macrocode}
-
-
% \iffalse
-%</draftwatermark>
+%</draftwatermark-2x>
% \fi
%
+%
% \Finale
+% \PrintChanges
+% \pagebreak[1]
% \PrintIndex
%
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
\endinput
%%% Local Variables:
Modified: trunk/Master/texmf-dist/source/latex/draftwatermark/draftwatermark.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/draftwatermark/draftwatermark.ins 2020-12-08 22:04:48 UTC (rev 57098)
+++ trunk/Master/texmf-dist/source/latex/draftwatermark/draftwatermark.ins 2020-12-08 22:05:54 UTC (rev 57099)
@@ -7,12 +7,14 @@
%% a contribution to the LaTeX2e system.
%% ---------------------------------------------
%%
-%% It may be distributed and/or modified under the conditions of the LaTeX
-%% Project Public License, version 1.3. The license is at
-%% https://www.latex-project.org/lppl/ and is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, version 1.3c.
+%% This license is in
+%% https://www.latex-project.org/lppl/lppl-1-3c/
+%% and is part of all distributions of LaTeX later than
+%% 2008-05-04.
%%
-%% This work has the LPPL maintenance status "author-maintained".
+%% This work has the LPPL maintenance status "maintained".
%%
%% This program consists of the files listed in the README.md file
%% included in the package.
@@ -43,35 +45,39 @@
This program consists of the files listed in the README.md file included
in the package.
-Any modified versions of this file must be renamed with new filenames distinct
-from draftwatermark.sty.
+Any modified versions of this file must be renamed with new filenames
+distinct from \outFileName.
For distribution of the original source see the terms for copying and
-modification in the file draftwatermark.dtx.
+modification in the file \inFileName.
-This generated file may be distributed as long as the original source files, as
-listed above, are part of the same distribution. (The sources need not
+This generated file may be distributed as long as the original source files,
+as listed above, are part of the same distribution. (The sources need not
necessarily be in the same archive or directory.)
\endpreamble
\Msg{*** Generating the LaTeX2e package files ***}
+\usedir{tex/latex/draftwatermark}
\generate{\file{draftwatermark.sty}{%
- \from{draftwatermark.dtx}{draftwatermark}}}
+ \from{draftwatermark.dtx}{draftwatermark}}}
+\generate{\file{draftwatermark-2x.sty}{%
+ \from{draftwatermark.dtx}{draftwatermark-2x}}}
\preamble
\endpreamble
\Msg{*** Generating the example files ***}
-\generate{\file{test_draftwatermark1.tex}{%
+\usedir{doc/latex/draftwatermark/examples}
+\generate{\file{test_draftwatermark-1.tex}{%
\from{draftwatermark.dtx}{samplecode-modern}}}
-\generate{\file{test_draftwatermark2.tex}{%
+\generate{\file{test_draftwatermark-2.tex}{%
\from{draftwatermark.dtx}{samplecode-legacy}}}
-\generate{\file{test_draftwatermark3.tex}{%
+\generate{\file{test_draftwatermark-3.tex}{%
\from{draftwatermark.dtx}{samplecode-anchor}}}
-\generate{\file{test_draftwatermark4.tex}{%
+\generate{\file{test_draftwatermark-4.tex}{%
\from{draftwatermark.dtx}{samplecode-dynamic}}}
-\generate{\file{test_draftwatermark5.tex}{%
+\generate{\file{test_draftwatermark-5.tex}{%
\from{draftwatermark.dtx}{samplecode-custom}}}
%\ReportTotals
@@ -84,14 +90,18 @@
\Msg{* \space\space draftwatermark.sty}
\Msg{*}
\Msg{*}
-\Msg{* To produce the documentation run draftwatermark.dtx}
-\Msg{* through LaTeX (or maybe pdfLaTeX).}
+\Msg{* To produce the documentation:
+run draftwatermark.dtx}
+\Msg{* - run draftwatermark.dtx through LaTeX}
\Msg{* Process draftwatermark.idx file by:}
\Msg{* \space\space\space\space makeindex -s gind.ist draftwatermark}
-%\Msg{* Process draftwatermark.glo file by:}
-%\Msg{* \space\space\space\space makeindex -s gglo.ist -o draftwatermark.gls
-% draftwatermark.glo}
+\Msg{* Process draftwatermark.glo file by:}
+\Msg{* \space\space\space\space makeindex -s gglo.ist -o draftwatermark.gls
+ draftwatermark.glo}
\Msg{* Re run through LaTeX the draftwatermark.dtx file as necessary}
+\Msg{* You may then want to move the test_draftwatermark*.tex files produced by}
+\Msg{* processing this ins file together with the documentation (e.g., in an}
+\Msg{* examples subdirectory}
\Msg{*}
\Msg{***********************************************************}
Added: trunk/Master/texmf-dist/tex/latex/draftwatermark/draftwatermark-2x.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/draftwatermark/draftwatermark-2x.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/draftwatermark/draftwatermark-2x.sty 2020-12-08 22:05:54 UTC (rev 57099)
@@ -0,0 +1,200 @@
+%%
+%% This is file `draftwatermark-2x.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% draftwatermark.dtx (with options: `draftwatermark-2x')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% Copyright 2006, 2020
+%% Sergio Callegari <sergio.callegari at gmail.com>
+%%
+%% ------------------------------------------------
+%% This file is part of the draftwatermark package,
+%% a contribution to the LaTeX2e system.
+%% ------------------------------------------------
+%%
+%% This program consists of the files listed in the README.md file included
+%% in the package.
+%%
+%% Any modified versions of this file must be renamed with new filenames
+%% distinct from draftwatermark-2x.sty.
+%%
+%% For distribution of the original source see the terms for copying and
+%% modification in the file draftwatermark.dtx.
+%%
+%% This generated file may be distributed as long as the original source files,
+%% as listed above, are part of the same distribution. (The sources need not
+%% necessarily be in the same archive or directory.)
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{draftwatermark}%
+ [2020/12/06 2.3 Put a gray textual watermark on document pages]
+
+\RequirePackage{kvoptions}
+\RequirePackage{everypage}[2007/06/20]
+\RequirePackage{graphicx}
+\RequirePackage{color}
+
+\SetupKeyvalOptions{family=draftwatermark, prefix=draftwatermark@}
+
+\DeclareBoolOption[false]{firstpageonly}
+\define at key{draftwatermark}{firstpage}[true]{%
+ \csname draftwatermark at firstpageonly#1\endcsname}
+\DeclareBoolOption[true]{stamp}
+\DeclareComplementaryOption{nostamp}{stamp}
+\DeclareComplementaryOption{final}{stamp}
+\DeclareStringOption[45]{angle}
+\DeclareStringOption[1]{scale}
+\DeclareStringOption[DRAFT]{text}
+\DeclareStringOption[0.5\paperwidth]{hpos}
+\DeclareStringOption[0.5\paperheight]{vpos}
+\DeclareStringOption[0.25\paperwidth]{fontsize}
+\DeclareStringOption[gray]{colormodel}
+\DeclareStringOption[0.8]{colorspec}
+\DeclareStringOption[c]{hanchor}
+\DeclareStringOption[m]{vanchor}
+\DeclareStringOption[c]{alignment}
+\DeclareStringOption[\DraftwatermarkStdMark]{markcmd}
+\define at key{draftwatermark}{pos}{%
+ \draftwatermark at processpos #1\@nil}
+\define at key{draftwatermark}{anchor}{%
+ \draftwatermark at processanchor{#1}}
+\define at key{draftwatermark}{color}{%
+ \draftwatermark at processcolor #1\@nil}
+
+\def\draftwatermark at processpos#1,#2\@nil{%
+ \def\draftwatermark at hpos{#1}%
+ \def\draftwatermark at vpos{#2}}
+
+\def\draftwatermark at processanchor#1{%
+ \def\draftwatermark at tempa{#1}
+ \@onelevel at sanitize \draftwatermark at tempa
+ \expandafter \@tfor \expandafter \draftwatermark at tempb
+ \expandafter :\expandafter =\draftwatermark at tempa
+ \do
+ {%
+ \if \draftwatermark at tempb l%
+ \def \draftwatermark at hanchor{l}%
+ \else \if \draftwatermark at tempb c%
+ \def \draftwatermark at hanchor{c}%
+ \else \if \draftwatermark at tempb r%
+ \def \draftwatermark at hanchor{r}%
+ \else \if \draftwatermark at tempb t%
+ \def \draftwatermark at vanchor{t}%
+ \else \if \draftwatermark at tempb m%
+ \def \draftwatermark at vanchor{m}%
+ \else \if \draftwatermark at tempb b%
+ \def \draftwatermark at vanchor{b}
+ \else
+ \PackageError{draftwatermark}{%
+ Illegal anchor directive `\draftwatermark at tempb'}%
+ {Directive has been ingnored.}%
+ \fi\fi\fi\fi\fi\fi
+ }}
+
+\def\draftwatermark at processcolor{%
+ \@ifnextchar[
+ \draftwatermark at processcolor@ii\draftwatermark at processcolor@i}
+
+\def\draftwatermark at processcolor@i#1\@nil{%
+ \def\draftwatermark at colormodel{}%
+ \def\draftwatermark at colorspec{#1}}
+
+\def\draftwatermark at processcolor@ii[#1]#2\@nil{%
+ \def\draftwatermark at colormodel{#1}%
+ \def\draftwatermark at colorspec{#2}}
+
+\ProcessKeyvalOptions*
+\DisableKeyvalOption{draftwatermark}{firstpageonly}
+\DisableKeyvalOption{draftwatermark}{firstpage}
+
+\newcommand\DraftwatermarkOptions[1]{\setkeys{draftwatermark}{#1}}
+
+\newcommand\SetWatermarkAngle[1]{\DraftwatermarkOptions{angle=#1}}
+\newcommand\SetWatermarkFontSize[1]{\DraftwatermarkOptions{fontsize=#1}}
+\newcommand\SetWatermarkScale[1]{\DraftwatermarkOptions{scale=#1}}
+\newcommand\SetWatermarkHorCenter[1]{%
+ \DraftwatermarkOptions{hpos=#1, hanchor=c}}
+\newcommand\SetWatermarkVerCenter[1]{%
+ \DraftwatermarkOptions{vpos=#1, vanchor=m}}
+\newcommand\SetWatermarkText[1]{\DraftwatermarkOptions{text={#1}}}
+\newcommand\SetWatermarkColor[2][]{%
+ \DraftwatermarkOptions{colormodel=#1, colorspec=#2}}
+\newcommand\SetWatermarkLightness[1]{%
+ \DraftwatermarkOptions{colormodel=gray, colorspec=#1}}
+
+\newcommand\DraftwatermarkStdMark{%
+ \rotatebox{\draftwatermark at angle}{%
+ \scalebox{\draftwatermark at scale}{%
+ \begingroup
+ \ifx\draftwatermark at colormodel\@empty
+ \color{\draftwatermark at colorspec}%
+ \else
+ \color[\draftwatermark at colormodel]{\draftwatermark at colorspec}%
+ \fi
+ \setlength{\@tempdima}{\draftwatermark at fontsize}%
+ \fontsize{\@tempdima}{1.2\@tempdima}\selectfont
+ \shortstack[\draftwatermark at alignment]{\draftwatermark at text}%
+ \endgroup}}}
+
+\newcommand\draftwatermark at printwm[1]{%
+ \sbox\@tempboxa{#1}%
+ \setlength{\@tempdima}{\draftwatermark at hpos}%
+ \setlength{\@tempdimb}{\draftwatermark at vpos}%
+ \edef \draftwatermark at tempa{\draftwatermark at hanchor}%
+ \@onelevel at sanitize \draftwatermark at tempa
+ \expandafter\def\expandafter\draftwatermark at tempb
+ \expandafter{\expandafter\@car \draftwatermark at tempa\@nil}%
+ \if \draftwatermark at tempb r%
+ \addtolength\@tempdima{-\wd\@tempboxa}%
+ \else\if \draftwatermark at tempb c%
+ \addtolength\@tempdima{-0.5\wd\@tempboxa}%
+ \else\if \draftwatermark at tempb l%
+ \relax
+ \else
+ \PackageError{draftwatermark}{%
+ Illegal anchor directive `\draftwatermark at tempb'}%
+ {Anchoring to left side.}%
+ \fi\fi\fi
+ \edef \draftwatermark at tempa{\draftwatermark at vanchor}%
+ \@onelevel at sanitize \draftwatermark at tempa
+ \expandafter\def\expandafter\draftwatermark at tempb
+ \expandafter{\expandafter\@car \draftwatermark at tempa\@nil}%
+ \if \draftwatermark at tempb b%
+ \addtolength\@tempdimb{-\ht\@tempboxa}%
+ \addtolength\@tempdimb{-\dp\@tempboxa}%
+ \else\if \draftwatermark at tempb m%
+ \addtolength\@tempdimb{-0.5\ht\@tempboxa}%
+ \addtolength\@tempdimb{-0.5\dp\@tempboxa}%
+ \else\if \draftwatermark at tempb t%
+ \relax
+ \else
+ \PackageError{draftwatermark}{%
+ Illegal anchor directive `\draftwatermark at tempb'}%
+ {Anchoring to top side.}%
+ \fi\fi\fi
+ \vbox to 0pt {%
+ \vspace*{-1in}%
+ \vspace*{\@tempdimb}%
+ \hbox to 0pt {%
+ \hspace*{-1in}%
+ \hspace*{\@tempdima}%
+ \usebox\@tempboxa
+ \hss}%
+ \vss}}
+
+\newcommand\draftwatermark at print[1]{%
+ \ifdraftwatermark at stamp
+ \draftwatermark at printwm{#1}%
+ \fi}
+\ifdraftwatermark at firstpageonly
+ \AddThispageHook{\draftwatermark at print{\draftwatermark at markcmd}}
+\else
+ \AddEverypageHook{\draftwatermark at print{\draftwatermark at markcmd}}
+\fi
+\endinput
+%%
+%% End of file `draftwatermark-2x.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/draftwatermark/draftwatermark-2x.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/draftwatermark/draftwatermark.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/draftwatermark/draftwatermark.sty 2020-12-08 22:04:48 UTC (rev 57098)
+++ trunk/Master/texmf-dist/tex/latex/draftwatermark/draftwatermark.sty 2020-12-08 22:05:54 UTC (rev 57099)
@@ -19,25 +19,30 @@
%% This program consists of the files listed in the README.md file included
%% in the package.
%%
-%% Any modified versions of this file must be renamed with new filenames distinct
-%% from draftwatermark.sty.
+%% Any modified versions of this file must be renamed with new filenames
+%% distinct from draftwatermark.sty.
%%
%% For distribution of the original source see the terms for copying and
%% modification in the file draftwatermark.dtx.
%%
-%% This generated file may be distributed as long as the original source files, as
-%% listed above, are part of the same distribution. (The sources need not
+%% This generated file may be distributed as long as the original source files,
+%% as listed above, are part of the same distribution. (The sources need not
%% necessarily be in the same archive or directory.)
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{draftwatermark}%
- [2020/06/29 2.2 Put a gray textual watermark on document pages]
-
+ [2020/12/08 3.0 Put a gray textual watermark on document pages]
+\@ifundefined{AddToHook}{%
+ \PackageWarningNoLine{draftwatermark}{%
+ You appear to be running a version of LaTeX\MessageBreak
+ unsupported by current draftwatermark.\MessageBreak
+ Forcing fallback to `draftwatermark-2x` that\MessageBreak
+ uses an older code base}%
+ \RequirePackageWithOptions{draftwatermark-2x}%
+ \endinput}{}
\RequirePackage{kvoptions}
-\RequirePackage{everypage}[2007/06/20]
\RequirePackage{graphicx}
\RequirePackage{color}
-
\DeclareBoolOption[false]{firstpageonly}
\define at key{draftwatermark}{firstpage}[true]{%
\csname draftwatermark at firstpageonly#1\endcsname}
@@ -62,7 +67,6 @@
\draftwatermark at processanchor{#1}}
\define at key{draftwatermark}{color}{%
\draftwatermark at processcolor #1\@nil}
-
\def\draftwatermark at processpos#1,#2\@nil{%
\def\draftwatermark at hpos{#1}%
\def\draftwatermark at vpos{#2}}
@@ -118,7 +122,7 @@
\DraftwatermarkOptions{hpos=#1, hanchor=c}}
\newcommand\SetWatermarkVerCenter[1]{%
\DraftwatermarkOptions{vpos=#1, vanchor=m}}
-\newcommand\SetWatermarkText[1]{\DraftwatermarkOptions{text=#1}}
+\newcommand\SetWatermarkText[1]{\DraftwatermarkOptions{text={#1}}}
\newcommand\SetWatermarkColor[2][]{%
\DraftwatermarkOptions{colormodel=#1, colorspec=#2}}
\newcommand\SetWatermarkLightness[1]{%
@@ -139,9 +143,9 @@
\endgroup}}}
\newcommand\draftwatermark at printwm[1]{%
- \sbox\@tempboxa{#1}%
+ \sbox\@tempboxa{\raisebox{\depth}{#1}}%
\setlength{\@tempdima}{\draftwatermark at hpos}%
- \setlength{\@tempdimb}{\draftwatermark at vpos}%
+ \setlength{\@tempdimb}{-\draftwatermark at vpos}%
\edef \draftwatermark at tempa{\draftwatermark at hanchor}%
\@onelevel at sanitize \draftwatermark at tempa
\expandafter\def\expandafter\draftwatermark at tempb
@@ -162,27 +166,18 @@
\expandafter\def\expandafter\draftwatermark at tempb
\expandafter{\expandafter\@car \draftwatermark at tempa\@nil}%
\if \draftwatermark at tempb b%
- \addtolength\@tempdimb{-\ht\@tempboxa}%
- \addtolength\@tempdimb{-\dp\@tempboxa}%
+ \relax
\else\if \draftwatermark at tempb m%
\addtolength\@tempdimb{-0.5\ht\@tempboxa}%
- \addtolength\@tempdimb{-0.5\dp\@tempboxa}%
\else\if \draftwatermark at tempb t%
- \relax
+ \addtolength\@tempdimb{-\ht\@tempboxa}%
\else
\PackageError{draftwatermark}{%
Illegal anchor directive `\draftwatermark at tempb'}%
{Anchoring to top side.}%
\fi\fi\fi
- \vbox to 0pt {%
- \vspace*{-1in}%
- \vspace*{\@tempdimb}%
- \hbox to 0pt {%
- \hspace*{-1in}%
- \hspace*{\@tempdima}%
- \usebox\@tempboxa
- \hss}%
- \vss}}
+ \put(\@tempdima,\@tempdimb){\usebox\@tempboxa}%
+}
\newcommand\draftwatermark at print[1]{%
\ifdraftwatermark at stamp
@@ -189,26 +184,12 @@
\draftwatermark at printwm{#1}%
\fi}
\ifdraftwatermark at firstpageonly
- \AddThispageHook{\draftwatermark at print{\draftwatermark at markcmd}}
+ \AddToHookNext{shipout/background}{%
+ \draftwatermark at print{\draftwatermark at markcmd}}%
\else
- \AddEverypageHook{\draftwatermark at print{\draftwatermark at markcmd}}
+ \AddToHook{shipout/background}{%
+ \draftwatermark at print{\draftwatermark at markcmd}}%
\fi
-
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
\endinput
%%
%% End of file `draftwatermark.sty'.
More information about the tex-live-commits
mailing list.