File: 5-5-1.ltx2

package info (click to toggle)
texlive-lang 2025.20250727-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,576,868 kB
  • sloc: xml: 69,499; perl: 62,535; python: 5,166; makefile: 4,837; sh: 4,456; ansic: 2,892; ruby: 1,031; lisp: 750; awk: 649; java: 159; sed: 142; csh: 25
file content (61 lines) | stat: -rw-r--r-- 1,754 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
%%
%% The LaTeX Companion, 3ed
%%
%% Example 5-5-1 on page I-410 in "draftwatermark --- Put a visible stamp on your document".
%%
%% Copyright (C) 2022 Frank Mittelbach
%%
%% It may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%%
%% See https://www.latex-project.org/lppl.txt for details.
%%

\documentclass{tlc3exa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{124.20126pt}


  \pagestyle{origplain}   % example class does not show page numbers with ``plain'' pagestyle
  \setcounter{page}{1}

  \tolerance=4000          % examples is very narrow ...
  \usepackage{microtype}   % so let's try to make this a bit better

  %--------------------------------------
  % For the book example we have to do some faking here. By default the
  % hpos and vpos are at the center of the page and so we mimic this
  % here. This is why we load the package internally and reset the keys:

  \setlength\textheight{94pt}
  \setlength\oddsidemargin{0pt}
  \setlength\evensidemargin{0pt}

  \RequirePackage{draftwatermark}
  \DraftwatermarkOptions{
    hpos=\dimexpr 1in + .5\textwidth ,
    vpos=\dimexpr 1in + \topmargin + \headheight+\headsep+ (\textheight+\footskip)/2 ,
  }

  % So the above should not be copied into your own document preamble.
  %--------------------------------------


%StartShownPreambleCommands
\usepackage{lipsum,xcolor}
\usepackage{draftwatermark}
\DraftwatermarkOptions
  {fontsize=25pt,colorspec=.6}

%StopShownPreambleCommands

\begin{document}
\lipsum[1][1-3]
\newpage
\DraftwatermarkOptions
  {color=blue!40, angle=-45,
   text=Private, scale=1.4 }
\lipsum[2][1] \par \lipsum[3]
\end{document}