summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.tex')
-rw-r--r--Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.tex141
1 files changed, 84 insertions, 57 deletions
diff --git a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.tex b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.tex
index 7fc6792dc5e..29d45d74afa 100644
--- a/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.tex
+++ b/Master/texmf-dist/doc/latex/xwatermark/xwatermark-guide.tex
@@ -13,6 +13,10 @@
inputfile=true
]{amltxdoc}
+\useshortdoccmds
+\usepackage{ltxtools-review}
+
+
\makeindex
\ifdefTF\newgeometry{}{%
\let\newgeometry\@gobble
@@ -23,12 +27,9 @@
\begin{frontmatter}
\title{The \texttt{\color{blue}xwatermark} Package\titleref{t1}}
-\titlenote[t1]{The package is available at
- \iftogTF{pdf}{\url{\@titleurl}}{\url{\@shorttitleurl}}.
-}
-\version{1.5.1}
-\titleurl{http://www.ctan.org/tex-archive/macros/latex/contrib/xwatermark/}
-\shorttitleurl{http://www.ctan.org/}
+\titlenote[t1]{The package is available at \url{\titleurltext}.}
+\version{1.5.2}
+\titleurl{http://mirror.ctan.org/macros/latex/contrib/xwatermark/}
\author{Ahmed Musa\Email{amusa22@gmail.com}\\Preston, Lancashire, UK}
\let\abstractname\relax
@@ -37,38 +38,55 @@
outerframecolor=ForestGreen, align=justified, fillcolor=white,
width=\textwidth, boxalign=center, height=.25cm, depth=0cm,framebox]{%
\centering\xwmcolorbox[align=center, fillcolor=white, innerframecolor=blue, outerframecolor=orange, width=.5\hsize, height=2.5mm]{\textbf{Abstract}} \\[\baselineskip]
- The \pkg{xwatermark} package puts user-supplied watermarks (graphics and/or arbitrary texts) on select pages of documents using user-friendly key-value interfaces. It has more functionality and dynamism than, for example, the packages \pkg'{draftcopy, draftwatermark, watermark, draftmark, wallpaper}. More than one (graphics and/or text) watermark can be placed jointly or independently on the same document page or on select pages. Watermarks can be placed in the page background or foreground, and watermarks can conveniently be placed on select pages as rectangular or square tiles, depending on the user's choice. Some utility macros, namely, \ffx'{\xwmminipage, \xwmcolorbox, \makecolobox, \fancypagenos} are also provided by the package for handy use in creating watermarks and for other uses. Watermarks (especially wallpapers) take their toll on computer resources, especially speed and save stack size. The packages in the \pkg{xwatermark} bundle (and beyond) have been optimized as much as currently possible. In many instances more than one run of the document will be needed to get the watermarks on the desired pages, especially if the user calls \fx{\lastdocpage} to get the last page of the document.
+ The \pkg{xwatermark} package puts user-supplied watermarks (graphics and/or arbitrary texts) on select pages of documents using user-friendly key-value interfaces. It has more functionality and dynamism than, for example, the packages \pkg{draftcopy, draftwatermark, watermark, draftmark, wallpaper}. More than one (graphics and/or text) watermark can be placed jointly or independently on the same document page or on select pages. Watermarks can be placed in the page background or foreground, and watermarks can conveniently be placed on select pages as rectangular or square tiles, depending on the user's choice. Some utility macros, namely, \ffx'{\xwmminipage, \xwmcolorbox, \makecolobox, \fancypagenos} are also provided by the package for handy use in creating watermarks and for other uses. Watermarks (especially wallpapers) take their toll on computer resources, especially speed and save stack size. The packages in the \pkg{xwatermark} bundle (and beyond) have been optimized as much as currently possible. In many instances more than one run of the document will be needed to get the watermarks on the desired pages, especially if the user calls \fx{\lastdocpage} to get the last page of the document.
}
\end{abstract}
\end{frontmatter}
-\vspace{4\baselineskip}
-
\newpage
+\noindent
+
+\xwmcolorbox[framesep=5pt,framerule=2pt,fillcolor=white,
+ outerframecolor=purple,innerframecolor=brown,textalign=justified,
+ width=.97\textwidth]{%
+ \normalfont\small\color{black}\vspace*{-1ex}%
+ \begin{center}\colorbullet{red}\hspace{1cm}\licensename\hspace{1cm}%
+ \colorbullet{red}\end{center}\vspace*{1ex}%
+ This work (\ie, all the files in the \pkg{xwatermark} manifest) may be distributed and/or
+ modified under the conditions of the \lppl, either version~1.3 of this license or any later
+ version. The \lppl maintenance status of this software is \quoted{author-maintained}. This
+ software is provided \quoted{as it is}, without warranty of any kind, either expressed or
+ implied, including, but not limited to, the implied warranties of merchantability and
+ fitness for a particular purpose. \CopyrightYear
+}
-\begin{xwmshade}[fillcolor=white,framecolor=orange,framerule=1pt,framesep=2pt,
- width=\hsize]\tableofcontents
-\end{xwmshade}
+\xwmcolorbox[framesep=5pt,framerule=2pt,fillcolor=white,
+ outerframecolor=purple,innerframecolor=brown,textalign=justified,
+ width=.97\textwidth]{%
+ \begingroup
+ \hypersetup{linkcolor=blue}\tableofcontents
+ \endgroup
+}
\docsection(sec:intro){Introduction}
-\lletter{T}{he \pkg'{xwatermark}} puts user-specified watermarks (graphics and/or arbitrary texts) on select pages of documents. It has more functionality and dynamism than, for example, the packages \pkg'{draftcopy, draftwatermark, watermark, draftmark}. The advantages of \pkg'{xwatermark} over these earlier packages include:
+\lletter{T}{he \pkg'{xwatermark}} puts user-specified watermarks (graphics and/or arbitrary texts) on select pages of documents. It has more functionality and dynamism than, for example, the packages \pkg'{draftcopy, draftwatermark, watermark, draftmark,wallpaper}. The advantages of \pkg'{xwatermark} over these earlier packages include:
\begin{enum}
\item Both text and graphics watermarks are admissible within any watermark item or instance.
\item The user can dynamically customize the attributes (color, position, orientation, scale, the page(s)---first page, last page, all pages, odd pages, even pages, a particular page, and a range of pages---on which the watermark should appear) of each watermark.
\item Watermarks can be placed in the background and in the foreground of document pages by simple instructions.
\item Rectangular and square wallpapers can be produced from watermarks to suit user needs without effort.
-\item All the command options/keys are passed directly via user-friendly key-value interfaces, instead of being defined in the source file by several macros. There are only two main user commands: \ffx'{\newwatermark, \newwallpaper}. The user is relieved of the need to remember and deploy several different macros, except, of course, that function keys are used. The list of keys and their default values for these functions are given in \amref{sec:packageoptions}.
+\item All the command options/keys are passed directly via user-friendly key-value interfaces, instead of being defined in the source file by several macros. There are only two main user commands: \ffx'{\newwatermark, \newwallpaper}. The user is relieved of the need to remember and deploy several different macros, except, of course, that function keys are used. The list of keys and their default values for these functions are given in \sref{sec:packageoptions}.
\end{enum}
With the \pkg'{xcolor} (not loaded automatically by the \pkg'{xwatermark}), all colors (including \hx{white}, shades like \hx{-red!75!green!50}, and those defined within the user document) can be passed to this package. And, as mentioned above, both texts and pictures can be submitted and printed as watermarks on the same page, and on different positions.
There are global and local package options. These are listed and explained in
-\amref{sec:packageoptions}.
+\sref{sec:packageoptions}.
-Users who have since complained of not being able to conveniently place more than one watermark on the same page can now heave a sigh relieve: the current version of the package has enabled this functionality. You can now mix text and graphics watermarks and wallpapers and place as many of them as you like on the same page. This version of the package comes with an optimized looping macro and a key management system (the \pkg'{ltxkeys}) to enable several watermarks and wallpapers to be placed efficiently on the same document pages.
+Users who have since complained of not being able to conveniently place more than one watermark on the same page can now heave a sigh relieve: the current version of the package has enabled this functionality. You can now mix text and graphics watermarks and wallpapers and place as many of them as you like on the same page. This version of the package comes with optimized looping macros and a key management system (the \pkg'{ltxkeys}) to enable several watermarks and wallpapers to be placed efficiently on the same document pages. The \pkg'{ltxkeys} can be used for general key parsing.
\docsection(sec:user-interface){User interfaces}
@@ -77,7 +95,7 @@ Users who have since complained of not being able to conveniently place more tha
In style files the package may be loaded with \hx{\RequirePackage} and in document files with \hx{\usepackage} together with the package keys that can be passed as options.
-\Note Some of the keys are \quoted{option keys}, \ie, they can appear only in \hx{\documentclass} or \hx{\usepackage} and not as, or in, arguments of other functions or macros. The \quoted{non-option keys} are those that can't appear in \hx{\documentclass} or \hx{\usepackage} but in the arguments of other macros. If a key is a non-option key and the user submits it to \hx{\documentclass} or \hx{\usepackage}, the package will alert the user. The same thing can be expected when a key is an option key and is submitted outside of \hx{\documentclass} or \hx{\usepackage}. The \quoted{need value} keys are keys that can't be called without a user-supplied value.
+\ltsnote Some of the keys are \quoted{option keys}, \ie, they can appear only in \hx{\documentclass} or \hx{\usepackage} and not as, or in, arguments of other functions or macros. The \quoted{non-option keys} are those that can't appear in \hx{\documentclass} or \hx{\usepackage} but in the arguments of other macros. If a key is a non-option key and the user submits it to \hx{\documentclass} or \hx{\usepackage}, the package will alert the user. The same thing can be expected when a key is an option key and is submitted outside of \hx{\documentclass} or \hx{\usepackage}. The \quoted{need value} keys are keys that can't be called without a user-supplied value.
The package keys \ffx'{printwatermark, disablegeometry} are option keys, and hence can be called as follows:
@@ -86,11 +104,11 @@ The package keys \ffx'{printwatermark, disablegeometry} are option keys, and hen
\usepackage[printwatermark,disablegeometry]{xwatermark}
\finish{example}
-The other options may be submitted via user commands like \ffx'{\newwatermark, \newwallpaper}. Please see \amrefrange[tab:]{globaloptions,localoptions} for a full listing of all the available package and command options. By design, the boolean option \fx{printwatermark} should not appear in the macros \ffx'{\newwatermark, \newwallpaper} but as a package or \hx{\documentclass} option. It is disabled just before \hx{\begin{document}} and any attempt to pass it via \fx{\newwatermark} or \fx{\newwallpaper} thereafter will trigger an error.
+The other options may be submitted via user commands like \ffx'{\newwatermark, \newwallpaper}. Please see \srefrange[tab:]{globaloptions,localoptions} for a full listing of all the available package and command options. By design, the boolean option \fx{printwatermark} should not appear in the macros \ffx'{\newwatermark, \newwallpaper} but as a package or \hx{\documentclass} option. It is disabled just before \hx{\begin{document}} and any attempt to pass it via \fx{\newwatermark} or \fx{\newwallpaper} thereafter will trigger an error.
When boolean options (\eg, \ffx'{printwatermark,allpages}) are passed without values, they are assumed implicitly \hx{true} by the package.
-\Note When your watermark is not printed, first check that the option \fx{printwatermark} is \texttt{true}. This is one of the means to control the printing of watermarks. The others are through the following commands (more details are available in \amref{sec:dummywatermarks}):
+\ltsnote When your watermark is not printed, first check that the option \fx{printwatermark} is \texttt{true}. This is one of the means to control the printing of watermarks. The others are through the following commands (more details are available in \sref{sec:dummywatermarks}):
\start+'{newmacro}[\dummywatermark, \DiscardAllWatermarks, etc]
\dummywatermark, \DiscardAllWatermarks, \UseDummyWatermarks,
@@ -99,7 +117,7 @@ When boolean options (\eg, \ffx'{printwatermark,allpages}) are passed without va
\fxi*{\dummywatermark, \DiscardAllWatermarks,
\UseDummyWatermarks, \DiscardDummyWatermarks}
-The option \fx{textmark} implies text watermarks, for which all the font properties can be selected. It does not apply to graphics watermarks. For graphics watermarks you need the keys: \fx{picfile} (the graphics/picture filename, with its full path but without its extension), and \fx{picfileext} (the file extension). Admissible file extensions are \hhx'{ps,eps,pdf,png,mps,jpeg}; they should be submitted without the dot. The extensions \hhx'{ps,eps} are for \hx{dvi} files, while the rest are for \hx{pdf} runs. Additional information is needed (see \amref{sec:pic-watermark})\footnote{When the options \ffx'{align ,height, width, angle, scale, xpos, ypos, color} appear without prefixes such as \fx{pic} or \fx{text}, they refer to the text watermark and not the graphics watermark. The user can thus use these options in place of \ffx'{textalign,textheight,textwidth, textangle, textscale, textxpos, textypos, textcolor}, respectively. However, options referring to graphics watermarks must always be prefixed with \fx{pic} (\eg, picfile).}.
+The option \fx{textmark} implies text watermarks, for which all the font properties can be selected. It does not apply to graphics watermarks. For graphics watermarks you need the keys: \fx{picfile} (the graphics/picture filename, with its full path but without its extension), and \fx{picfileext} (the file extension). Admissible file extensions are \hhx'{ps,eps,pdf,png,mps,jpeg}; they should be submitted without the dot. The extensions \hhx'{ps,eps} are for \hx{dvi} files, while the rest are for \hx{pdf} runs. Additional information is needed (see \sref{sec:pic-watermark})\footnote{When the options \ffx'{align ,height, width, angle, scale, xpos, ypos, color} appear without prefixes such as \fx{pic} or \fx{text}, they refer to the text watermark and not the graphics watermark. The user can thus use these options in place of \ffx'{textalign,textheight,textwidth, textangle, textscale, textxpos, textypos, textcolor}, respectively. However, options referring to graphics watermarks must always be prefixed with \fx{pic} (\eg, picfile).}.
The following points should be noted about the values of the \fx{textmark}:
@@ -123,8 +141,8 @@ When specifying package options either in \hx{\usepackage} or \hx{\documentclass
\begin{enum}
\item Multiple lines are permitted but not blank lines.
\item Extra paces between options and words are ignored.
-\item Active characters (those of catcode~13) may be allowed (but see \amref{sec:activechar} for further comments).
-\item Options are mostly order-agnostic, except \fxi{graphicsoptions}, whose values take precedence over those supplied via other keys (see \amref{sec:graphicsoptions}).
+\item Active characters (those of catcode~13) may be allowed (but see \sref{sec:activechar} for further comments).
+\item Options are mostly order-agnostic, except \fxi{graphicsoptions}, whose values take precedence over those supplied via other keys (see \sref{sec:graphicsoptions}).
\end{enum}
@@ -149,14 +167,14 @@ The remaining options should ideally be set dynamically using the macro \fx{\new
The use syntax for the command \fx{\newwatermark} is as follows
\start{newmacro}[\newwatermark]
-\newwatermark[|A(key-val)]{|A(mark)}
-\newwatermark|R(*')[|A(key-val)]{|A(mark)}
+\newwatermark[|A(keyval)]{|A(mark)}
+\newwatermark|R(*')[|A(keyval)]{|A(mark)}
\finish{newmacro}
\fxi*{\newwatermark}
-where \ang{key-val} is the list of keys and their values (called the watermark attributes) and \ang{mark} is the text watermark. Graphics watermarks are to be specified with their file name, file extension, \etcc. The full lists of the available keys for the macro \fx{\newwatermark} and others are available in \amref{sec:packageoptions}.
+where \ang{keyval} is the list of keys and their values (called the watermark attributes) and \ang{mark} is the text watermark. Graphics watermarks are to be specified with their file name, file extension, \etcc. The full lists of the available keys for the macro \fx{\newwatermark} and others are available in \sref{sec:packageoptions}.
-The \stform of \fx{\newwatermark} puts the watermark in the foreground instead of the background, and the \pmform is ignored, \ie, no watermark is produced (see \amref{sec:dummywatermarks}).
+The \stform of \fx{\newwatermark} puts the watermark in the foreground instead of the background, and the \pmform is ignored, \ie, no watermark is produced (see \sref{sec:dummywatermarks}).
The macro \fx{\newwatermark} can be used as in
@@ -182,7 +200,7 @@ When you want the watermark on only one page of the document, you can convenient
In this way, you don't have to bother with locating in the source file the spot that corresponds to the page on which you want the watermark to appear. In fact, you can collect all the watermarks in the document preamble or in a configuration file with the command \fx{\newwatermark}.
-\Note Each call to \fx{\newwatermark} must contain the page(s) that will receive the watermark(s), otherwise the user will be alerted. The page specifiers are:
+\ltsnote Each call to \fx{\newwatermark} must contain the page(s) that will receive the watermark(s), otherwise the user will be alerted. The page specifiers are:
\start'{example}[page specifiers]
page=x, pages=x-y, pagex={x,y,z}, firstpage, lastpage, allpages,
@@ -211,7 +229,7 @@ page=x, pages=x-y, pagex={x,y,z}, firstpage, lastpage, allpages=true,
evenpages=true, oddpages=true
\finish{example}
-together with \fx{printwatermark}=\hx{true} but you don't want the mark on any particular page, we can simply set \fx{\newwatermark[other keys,textmark=]{}} or, to the same effect, we may set \fx{\newwatermark[other keys]{}}, where \quoted{other keys} may include the page specifiers\footnote{In the case of graphics watermarks, setting \ftfx{\newwatermark[other keys,picfile=]{}} will prompt a \quoted{no file} error.}. These both imply that the text watermark for the given page is empty. This can be useful when transiting from one watermark type to another. Moreover, since both picture and text marks can be submitted via one and the same command \fx{\newwatermark} (see \amref{sec:pic-text-mark}), this technique may be used to empty the text watermark for the given page or range of pages. For example,
+together with \fx{printwatermark}=\hx{true} but you don't want the mark on any particular page, we can simply set \fx{\newwatermark[other keys,textmark=]{}} or, to the same effect, we may set \fx{\newwatermark[other keys]{}}, where \quoted{other keys} may include the page specifiers\footnote{In the case of graphics watermarks, setting \ftfx{\newwatermark[other keys,picfile=]{}} will prompt a \quoted{no file} error.}. These both imply that the text watermark for the given page is empty. This can be useful when transiting from one watermark type to another. Moreover, since both picture and text marks can be submitted via one and the same command \fx{\newwatermark} (see \sref{sec:pic-text-mark}), this technique may be used to empty the text watermark for the given page or range of pages. For example,
\start{example}[\newwatermark]
\newwatermark[allpages,fontfamily=put,color=white,fontsize=3cm,scale=1,
@@ -238,7 +256,7 @@ However, both the picture and text marks will then share the same subset of the
\docsubsection{The usefulness of the \headhx{white} color}
-You can deploy the white color to great effect in designing text watermarks. Also, if you set \fx{allpages}=\hx{true} or \fx{evenpages}=\hx{true} or \fx{oddpages=true} together with \fx{printwatermark}=\hx{true} but you don't want the mark on any particular page, you can simply enter \fx{color=white} in the \fx{\newwatermark} on that page. This applies only to text watermarks, as such a declaration has no effect on picture watermarks. This may be convenient in circumstances where you may change your mind as to whether to place a watermark on a particular page or not. In this way you don't have to set \fx{\newwatermark[other keys,textmark=]{}} or remove (or comment out) the \fx{\newwatermark} command for that (or indeed any) page. See also \amref{sec:dummywatermarks}.
+You can deploy the white color to great effect in designing text watermarks. Also, if you set \fx{allpages}=\hx{true} or \fx{evenpages}=\hx{true} or \fx{oddpages=true} together with \fx{printwatermark}=\hx{true} but you don't want the mark on any particular page, you can simply enter \fx{color=white} in the \fx{\newwatermark} on that page. This applies only to text watermarks, as such a declaration has no effect on picture watermarks. This may be convenient in circumstances where you may change your mind as to whether to place a watermark on a particular page or not. In this way you don't have to set \fx{\newwatermark[other keys,textmark=]{}} or remove (or comment out) the \fx{\newwatermark} command for that (or indeed any) page. See also \sref{sec:dummywatermarks}.
\docsubsection(sec:dummywatermarks){Dummy watermarks}
@@ -253,7 +271,7 @@ When you don't need a watermark printed, you can simply replace its \fx{\newwate
\finish{newmacro}
\fxi*{\dummywatermark}
-And when you don't want any of your watermarks printed, you could simply issue the option \fx{printwatermark}=\hx{false} or call the command \fxi{\DiscardAllWatermarks}. These will simply turn all instances of \fx{\newwatermark} command into \fx{\dummywatermark}. In any run, you may decide to use some or all of the dummy watermarks. To use all dummy watermarks, you issue the command \fxi{\UseDummyWatermarks} before instances of \fx{\dummywatermark}. To again disregard all subsequent dummy watermarks, which is the default state, simply call the command \fxi{\DiscardDummyWatermarks}. These commands provide a convenient scheme for deciding the watermarks to be printed with minimal typing. For wallpapers, there is the corresponding command \fxi{\dummywallpaper}. Also, putting a prime sign (\RedPrime) on \fx{\newwatermark} or \fx{\newwallpaper} turns the command into a dummy mark, but only for that single instance. Subsequent \fx{\newwatermark} and \fx{\newwallpaper} without primes will produce watermarks and wallpapers.
+And when you don't want any of your watermarks printed, you could simply issue the option \fx{printwatermark}=\hx{false} or call the command \fxi{\DiscardAllWatermarks}. These will simply turn all instances of \fx{\newwatermark} command into \fx{\dummywatermark}. In any run, you may decide to use some or all of the dummy watermarks. To use all dummy watermarks, you issue the command \fxi{\UseDummyWatermarks} before the instances of \fx{\dummywatermark}. To again disregard all subsequent dummy watermarks, which is the default state, simply call the command \fxi{\DiscardDummyWatermarks}. These commands provide a convenient scheme for deciding the watermarks to be printed with minimal typing. For wallpapers, there is the corresponding command \fxi{\dummywallpaper}. Also, putting a prime sign (\Redprime) on \fx{\newwatermark} or \fx{\newwallpaper} turns the command into a dummy mark, but only for that single instance. Subsequent \fx{\newwatermark} and \fx{\newwallpaper} without primes will produce watermarks and wallpapers, respectively.
\docsection(sec:wallpapers){Wallpapers}
@@ -263,21 +281,21 @@ And when you don't want any of your watermarks printed, you could simply issue t
The command \fx{\newwallpaper} can be used to produce rectangular and square tiles on document pages. The use syntax for the command \fx{\newwallpaper} is
\start{newmacro}[\newwallpaper]
-\newwallpaper[|A(key-val)]{|A(mark)}
-\newwallpaper|R(*')[|A(key-val)]{|A(mark)}
+\newwallpaper[|A(keyval)]{|A(mark)}
+\newwallpaper|R(*')[|A(keyval)]{|A(mark)}
\finish{newmacro}
\fxi*{\newwallpaper}
-where \ang{key-val} is the list of keys and their values (called the attributes) and \ang{mark} is the text (and not graphics) watermark. Graphics watermarks are again to be specified with their file name, file extension, \etcc. The full lists of the available keys for the macro \fx{\newwallpaper} are available in \amref{tab:localoptions}.
+where \ang{keyval} is the list of keys and their values (called the attributes) and \ang{mark} is the text (and not graphics) watermark. Graphics watermarks are again to be specified with their file name, file extension, \etcc. The full lists of the available keys for the macro \fx{\newwallpaper} are available in \sref{tab:localoptions}.
-The \stform of \fx{\newwallpaper} puts the watermark in the foreground instead of the background, and the \pmform is ignored, \ie, no watermark is produced (see \amref{sec:dummywatermarks}).
+The \stform of \fx{\newwallpaper} puts the watermark in the foreground instead of the background, and the \pmform is ignored, \ie, no wallpaper is produced (see \sref{sec:dummywatermarks}).
-When you get unexpected tiles, you should consider enabling or disabling the keys \fx{squaretiles} (default \texttt{true}) and/or \fx{boxalign} (default \texttt{center}). The key \fx{boxalign} may assume one of the values in the set \ffx{t-l,t-r,b-l,b-r,s} or \ffx{top-left, top-right, bottom-left, bottom-right, center, justified}.
+When you get unexpected tiles, you first should consider enabling or disabling the keys \fx{squaretiles} (default \texttt{true}) and/or \fx{boxalign} (default \texttt{center}). The key \fx{boxalign} may assume one of the values in the set \ffx{t-l,t-r,b-l,b-r,s} or \ffx{top-left, top-right, bottom-left, bottom-right, center, justified}.
\docsection(sec:pic-watermark){Graphics watermarks}
-For graphics/picture watermarks, you need the \fx{picfile} (the graphics filename, with its full path but without its extension), \fx{picfileext} (the picture filename extension without the dot), \fx{picbb} (the picture bounding box), and \fx{picscale} (the picture scale)\footnote{These options have longer, easier to remember, names; see \amref{tab:localoptions}.}. Admissible file extensions are \fx{eps}, \fx{pdf}, \fx{png} and \fx{jpeg}; the latter three, but not the first, may be used in the case of \pdftex. The file extension should be passed without the dot. If the file extension is not passed to package, the package selects it automatically based on whether \pdftex mode is running or not (normal extensions are \fx{eps} for dvi mode and \fx{pdf} for \pdftex mode). In fact, the package does search hard on the given paths for other admissible file types with the base filename the user has specified. If you have the graphics file in both \fx{eps} and \pdf-compatible formats, then you don't have to bother about submitting the file extension to the package: it will automatically select the appropriate file extension, depending on the mode (\pdf or \texttt{dvi}) in which it is running.
+For graphics/picture watermarks, you need the \fx{picfile} (the graphics filename, with its full path but without its extension), \fx{picfileext} (the picture filename extension without the dot), \fx{picbb} (the picture bounding box), and \fx{picscale} (the picture scale)\footnote{These options have longer, easier to remember, names; see \sref{tab:localoptions}.}. Admissible file extensions are \fx{eps}, \fx{pdf}, \fx{png} and \fx{jpeg}; the latter three, but not the first, may be used in the case of \pdftex. The file extension should be passed without the dot. If the file extension is not passed to package, the package selects it automatically based on whether \pdftex mode is running or not (normal extensions are \fx{eps} for dvi mode and \fx{pdf} for \pdftex mode). In fact, the package does search hard on the given paths for other admissible file types with the base filename the user has specified. If you have the graphics file in both \fx{eps} and \pdf-compatible formats, then you don't have to bother about submitting the file extension to the package: it will automatically select the appropriate file extension, depending on the mode (\pdf or \texttt{dvi}) in which it is running.
\docsubsection(sec:graphicsoptions)
@@ -305,11 +323,11 @@ draft, type, ext, read, command
It should be noted that \fx{\GraphicsOptions} isn't a key but a stand-alone command with the following syntax:
\start{newmacro}[\GraphicsOptions]
-\GraphicsOptions{|A(key-val)}
+\GraphicsOptions{|A(keyval)}
\finish{newmacro}
\fxi*{\GraphicsOptions}
-where \ang{key-val} are admissible keys for the command \hx{\includegraphics} and their user-supplied values. The values so suggested by \fx{\GraphicsOptions} override those given via the keys of the \pkg{xwatermark}, including \fx{graphicsoptions}. Such values remain in force until they are changed later by another call to \fx{\GraphicsOptions}.
+where \ang{keyval} are admissible keys for the command \hx{\includegraphics} and their user-supplied values. The values so suggested by \fx{\GraphicsOptions} override those given via the keys of the \pkg{xwatermark}, including \fx{graphicsoptions}. Such values remain in force until they are changed later by another call to \fx{\GraphicsOptions}.
An example follows:
@@ -368,7 +386,7 @@ The package is set to inherit the \hx{\documentclass} options, if the options ap
and vice versa. It should, however, be noted that some package options and keys are restricted either to the \hhx'{\documentclass,\usepackage} (this applies to the so-called \quoted{option keys}) or to the various user macros (in the case of \quoted{non-option keys}). Normally, the package will alert the user to the wrong call of any of the options and keys.
-If you don't need the watermark on any page of your document, simply replace the option \fx{printwatermark} (=\hx{true}) with \fx{printwatermark}=\hx{false} in \hx{\usepackage} or \hx{\documentclass}. If you have specified \fx{printwatermark} (=\hx{true}) in the \hx{\documentclass} options list but you still don't need the watermark on any page of your document, then you would have to use the tools of \amref{sec:dummywatermarks}.
+If you don't need the watermark on any page of your document, simply replace the option \fx{printwatermark} (=\hx{true}) with \fx{printwatermark}=\hx{false} in \hx{\usepackage} or \hx{\documentclass}. If you have specified \fx{printwatermark} (=\hx{true}) in the \hx{\documentclass} options list but you still don't need the watermark on any page of your document, then you would have to use the tools of \sref{sec:dummywatermarks}.
\docsubsection<Size of the watermark>{The size of the watermark}
@@ -391,12 +409,12 @@ Acceptable units of length include \hx{mm} (millimeter), \hx{cm} (centimeter), \
If you discover that the watermark is wrongly positioned on the page(s) of your document, as some users have had course to complain, the chances are that you have submitted wrong coordinates (values of \fx{xpos} and \fx{ypos}) to the package or the watermark's width (\fx{textwidth} or \fx{picwidth}) is not optimal or both reasons. The package does not take responsibility for this and will normally not warn you in this respect. Since the output file provides a direct and simple indication of the occurrence of the anomaly, no attempt has been made in the package to warn users in this regard. If you do not specify the keys \fx{xpos} and/or \fx{ypos} at all in the call to \fx{\newwatermark}, their default values will be used by the package. Also, if you list these keys without their values in the call to \fx{\newwatermark}, their default values (\fx{xpos=0} and \fx{ypos=0}, which yield the center of paper) will be assumed by the package. The default value of the watermark's width is \hx{\paperheight}, and not \hx{\paperwidth} as might be expected.
-When the \pkg'{geometry} is loaded together with the \pkg'{xwatermark}, page layout scale changes by the \pkg'{geometry} may result in the watermarks being positioned slightly away from the intended position. See \amref{sec:geometry} for further details.
+When the \pkg'{geometry} is loaded together with the \pkg'{xwatermark}, page layout scale changes by the \pkg'{geometry} may result in the watermarks being positioned slightly away from the intended position. See \sref{sec:geometry} for further details.
\docsubsection{Wrong size of the watermark}
-When you discover that your text or graphics watermark is not of the size you expect, then you should check the global and local scale and width of the watermark. It is most likely that the chosen combination is wrong or inconsistent. Global and local package options are described in \amref{sec:packageoptions}. For example, choosing \fx{scale=0.7} and \fx{width=\paperwidth} may yield something unexpected. So will mixing inconsistent global and local scales or width, or both.
+When you discover that your text or graphics watermark is not of the size you expect, then you should check the global and local scale and width of the watermark. It is most likely that the chosen combination is wrong or inconsistent. Global and local package options are described in \sref{sec:packageoptions}. For example, choosing \fx{scale=0.7} and \fx{width=\paperwidth} may yield something unexpected. So will mixing inconsistent global and local scales or width, or both.
\docsubsection{Breaking the watermark into lines}
@@ -416,7 +434,7 @@ More complex examples are available in the example source and \pdf files that sh
\docsubsection{The alignment of the watermark}
-The alignment of the watermark is controlled by the keys \ffx'{align, textalign, boxalign}. The first two are equivalent and may be set to \fx{center}, \fx{left}, \fx{right} or \fx{justified}. The default is \fx{center}. This is particularly useful for putting arbitrary texts (that are not necessarily watermarks) on pages of documents. The admissible values for the key \fx{boxalign} are given in \amref{tab:localoptions}.
+The alignment of the watermark is controlled by the keys \ffx'{align, textalign, boxalign}. The first two are equivalent and may be set to \fx{center}, \fx{left}, \fx{right} or \fx{justified}. The default is \fx{center}. This is particularly useful for putting arbitrary texts (that are not necessarily watermarks) on pages of documents. The admissible values for the key \fx{boxalign} are given in \sref{tab:localoptions}.
\docsubsection{Locating the page center}
@@ -479,7 +497,7 @@ To make it easier for users to create paragraph boxes and color boxes of texts a
\docsubsection(sec:minipage){The \headfx{\xwmminipage} macro}
-The \fx{\xwmminipage} macro is a \hx{minipage} environment that may be used for framing watermarks. It accepts verbatim material. Like the \fx{\newwatermark} macro, this macro is called with key-value pairs as follows (see \amref{tab:localoptions} for a full listing of the available keys):
+The \fx{\xwmminipage} macro is a \hx{minipage} environment that may be used for framing watermarks. It accepts verbatim material. Like the \fx{\newwatermark} macro, this macro is called with key-value pairs as follows (see \sref{tab:localoptions} for a full listing of the available keys):
\start{newmacro}[\xwmminipage]
\xwmminipage[key=value list]{balanced text}
@@ -487,7 +505,7 @@ The \fx{\xwmminipage} macro is a \hx{minipage} environment that may be used for
\finish{newmacro}
\fxi*{\xwmminipage}
-The \fx{textcolor} key in \fx{\xwmminipage} is the color of the text. In the case of \fx{\xwmcolorbox}, four color values are expected: \ffx'{textcolor, fillcolor, outerframecolor, innerframecolor}. Texts with commas need to be enclosed in braces when submitted to these macros. The default values of the keys of these macros are described in \amref{sec:localoptions}.
+The \fx{textcolor} key in \fx{\xwmminipage} is the color of the text. In the case of \fx{\xwmcolorbox}, four color values are expected: \ffx'{textcolor, fillcolor, outerframecolor, innerframecolor}. Texts with commas need to be enclosed in braces when submitted to these macros. The default values of the keys of these macros are described in \sref{sec:localoptions}.
The macros \ffx'{\xwmminipage,\xwmcolorbox} can be nested within and among themselves, \eg,
@@ -540,7 +558,7 @@ Notice here that the macro \fx{\makecolorbox} calls the macro \fx{\xwmcolorbox}.
\docsection(sec:fancypagenos){The \headfx{\fancypagenos} macro}
-The macro \fx{\fancypagenos}, which has the following syntax, can be used to position and format page numbers in the desired fashion. Its keys and their default values are described in \amref{tab:localoptions}. Page numbers produced by \fx{\fancypagenos} will, by default, appear in the foreground, so that they can be seen on top of watermarks. If you want the page numbers to appear in the background, then set \fx{sendtoback}=\hx{true} as one of the key-value pairs in the call to \fx{\fancypagenos}.
+The macro \fx{\fancypagenos}, which has the following syntax, can be used to position and format page numbers in the desired fashion. Its keys and their default values are described in \sref{tab:localoptions}. Page numbers produced by \fx{\fancypagenos} will, by default, appear in the foreground, so that they can be seen on top of watermarks. If you want the page numbers to appear in the background, then set \fx{sendtoback}=\hx{true} as one of the key-value pairs in the call to \fx{\fancypagenos}.
\start{newmacro}[\fancypagenos]
\fancypagenos[key=value pairs]
@@ -566,8 +584,8 @@ After the effects of the \pkg'{geometry} are re-introduced (\ie, after setting t
Because the \pkg'{geometry} stipulates that the command \hx{\Gm@dorg} can be issued only in the document preamble, the switch \fx{disablegeometry} can appear as option only in \hx{\documentclass} or \hx{\usepackage{xwatermark}}. But it matters not which of the two packages (\pkg{geometry, xwatermark}) is loaded first. To call \hx{\Gm@dorg}, the \pkg'{xwatermark} uses the hook \hx{\BeforeStartOfDocument} from the \pkg'{catoptions}. \hx{\AtBeginDocument}, a native \latex hook, is inapplicable in this case.
-\docsection{Support for \deadunexpandable{\acro{UNICODE}} and
- \deadunexpandable{\acro{UTF}} encodings}
+\docsection{Support for \ltsneverexpand{\acro{UNICODE}} and
+ \ltsneverexpand{\acro{UTF}} encodings}
The \pkg'{xwatermark} can be used with any font encoding, provided the \fx{fontfamily} is properly declared before use. For example, with the following declarations on \XeTeX, Rembrandt Wolpert (\url{wolpert@uark.edu}) obtained some \fx{.pdf} outputs that he is willing to share with other users:
@@ -596,7 +614,7 @@ It doesn't matter what the user declares as a \fx{fontfamily} provided he/she de
For graphics watermarks, the watermark image, or any other image that is repeated in the document, has the potential to make the processed version of the document surprisingly large. The problem is that the default mechanisms of graphics usage add the image at every point it is to be used, and when processed, the image appears in the output file at each such point.
-See the \acro{UKTUG FAG}, version~3.20 (2010), entry number~146, page~95, for the available solutions to this problem. As described by this reference, if the \texttt{PostScript} version of the file is destined for conversion to \pdf, either by a ghostscript-based mechanism such as \hx{ps2pdf} or by, for example, Acrobat Distiller, the issue is not as important, since the distillation mechanism will amalgamate graphics objects whether or not the \texttt{PostScript} has them amalgamated. \pdftex does the same job with graphics, automatically converting multiple insertions into pointers to graphics objects.
+See the \acro{UKTUG FAG}, version~3.20 (2010), entry number~146, page~95, for the available solutions to this problem. As described by this reference, if the \texttt{PostScript} version of the file is destined for conversion to \pdf, either by a ghostscript-based mechanism such as \hx{ps2pdf} or by, for example, Acrobat Distiller, the issue is not as important, since the distillation mechanism will amalgamate graphics objects whether or not the \texttt{PostScript} has them amalgamated. \pdftex does the same job with graphics, automatically converting multiple insertions into pointers to graphics objects. See also the \hx{\pdfxform} command and instructions about \hx{XObject}s in \pdftex user manual.
\docsection{Further examples of use of \headpkg{xwatermark} package}
@@ -611,20 +629,26 @@ We categorize the package options and keys into global and local. Global options
\docsubsection(sec:globaloptions){Global options}
-The global package options are listed and described in the following \amref{tab:globaloptions}.
+The global package options are listed and described in the following \sref{tab:globaloptions}.
+\begingroup
+\small
\ifboolTF{amd@inputfile}{%
\InputDocument{tab-globaloptions}
}{}
+\endgroup
\docsubsection(sec:localoptions){Local options}
-Local package options are those associated with the commands \ffx'{\newwatermark, \newwallpaper, \xwmminipage, \xwmcolorbox, \makecolorbox, \fancypagenos}. They are described in the following \amref{tab:localoptions}.
+Local package options are those associated with the commands \ffx'{\newwatermark, \newwallpaper, \xwmminipage, \xwmcolorbox, \makecolorbox, \fancypagenos}. They are described in the following \sref{tab:localoptions}.
+\begingroup
+\small
\ifboolTF{amd@inputfile}{%
\InputDocument{tab-localoptions}
}{}
+\endgroup
\docsection(sec:version-hist){Version history}
@@ -632,21 +656,24 @@ Local package options are those associated with the commands \ffx'{\newwatermark
The following change history highlights significant changes that affect user utilities and interfaces; changes of technical nature are not documented in this section. The \stsign on the right-hand side of the following lists means the subject features in the package but is not reflected anywhere in this user guide.
\begin{versionhist}
+ \begin{version}{1.5.2}{2011/10/20}
+ \item To match changes in \pkg'{ltxkeys} \vsecref*
+ \end{version}
\begin{version}{1.5.1}{2011/07/20}
- \item Following user request, two new keys were introduced for the macro \fx{\fancypagenos}. \vsecref{sec:fancypagenos}
+ \item Following user request, two new keys were introduced for the macro \fx{\fancypagenos} \vsecref{sec:fancypagenos}
\end{version}
\begin{version}{1.5.0}{2011/07/10}
- \item Introduced the \pkg'{ltxkeys}, a highly robust and optimized module for general creation and management of keys. \vsecref*
+ \item Introduced the \pkg'{ltxkeys}, a highly robust and optimized module for general creation and management of keys \vsecref*
\item Provisions for placing more than one watermark on the same page. \vsecref{sec:newwatermarks}
- \item Introduced wallpaper functionalities. \vsecref{sec:wallpapers}
- \item Adaptable and flexible fancy page numbers. \vsecref{sec:fancypagenos}
+ \item Introduced wallpaper functionalities \vsecref{sec:wallpapers}
+ \item Adaptable and flexible fancy page numbers \vsecref{sec:fancypagenos}
\end{version}
\end{versionhist}
\newpage
-\indexpreamble{Index numbers refer to page numbers.}
-\indexpreambleformat{\centering}
-\indexcolumns\tw@
+\ltsindexpreamble{Index numbers refer to page numbers.}
+\ltsindexpreambleformat{\centering}
+\ltsindexcolumns\tw@
\printindex
\end{document}