summaryrefslogtreecommitdiff
path: root/vu-cs-standard-thesis/Latex/StyleFiles
diff options
context:
space:
mode:
authorMateusz Kwiatkowski <mati.rewa@gmail.com>2025-06-25 11:16:10 +0000
committernode <node@git-bridge-prod-0>2025-06-25 11:22:03 +0000
commit3e8e2ea55ae43a6463f8f1d793f132e09fa951ce (patch)
tree7885aedd39b6f201cbe7ff3e39ac9743befdfee8 /vu-cs-standard-thesis/Latex/StyleFiles
Update on Overleaf.
Diffstat (limited to 'vu-cs-standard-thesis/Latex/StyleFiles')
-rw-r--r--vu-cs-standard-thesis/Latex/StyleFiles/Icon♪0
-rw-r--r--vu-cs-standard-thesis/Latex/StyleFiles/watermark.sty87
2 files changed, 87 insertions, 0 deletions
diff --git a/vu-cs-standard-thesis/Latex/StyleFiles/Icon♪ b/vu-cs-standard-thesis/Latex/StyleFiles/Icon♪
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vu-cs-standard-thesis/Latex/StyleFiles/Icon♪
diff --git a/vu-cs-standard-thesis/Latex/StyleFiles/watermark.sty b/vu-cs-standard-thesis/Latex/StyleFiles/watermark.sty
new file mode 100644
index 0000000..4971307
--- /dev/null
+++ b/vu-cs-standard-thesis/Latex/StyleFiles/watermark.sty
@@ -0,0 +1,87 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{watermark}
+ [2002/01/29 v1.00 Watermarks (NCC)]
+%
+% The package provides watermarks on output pages. A watermark is
+% some text or picture printed at the background of paper. A watermark
+% is prepared in picture box stored at the beginning of running head.
+% So, the watermark material must be put on the page with LaTeX's \put and
+% \multiput commands.
+%
+% \watermark{BODY} sets a watermark to be printed on all pages
+% \leftwatermark{BODY} sets a watermark to be printed on every even page
+% if twoside mode is turned on. Otherwise, this
+% watermark is ignored. Odd-page watermark
+% leaves unchanged.
+% \rightwatermark{BODY} sets a watermark to be printed on every odd page
+% if twoside mode is turned on. Otherwise, this
+% watermark is printed on all pages. Even-page
+% watermark leaves unchanged.
+% \thiswatermark{BODY} sets a watermark for the current page only.
+%
+% Additionally, the package provides the command \thispageheading{HEADING}
+% which replaces a heading for the current page to specified heading.
+% Watermarks are also printed when a heading is replaced.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% We use the \@begindvi hook from the output routine.
+% This hook works only once at the beginning of dvi, but some packages
+% (e.g. hyperref) also use it for their own needs.
+% So, we redefine it at the beginning of document in such a way to
+% accurately save its behaviour after the first call when it can be
+% redefined by other packages.
+%
+\AtBeginDocument{
+ \let\WMK@begindvi\@begindvi
+ \def\@begindvi{\WMK@begindvi \WMK@insert
+ \global\let\WMK@begindvi\@begindvi % Save redefined behaviour and
+ \gdef\@begindvi{\WMK@begindvi\WMK@insert}% redefine \@begindvi once more
+ }%
+}
+%
+% The \WMK@insert command redefines current header and inserts the
+% \WMK@hook at the beginning of header. A box produced by this hook
+% has zero natural sizes.
+%
+\def\WMK@insert{\let\WMK@head\@thehead \def\@thehead{\WMK@hook\WMK@head}}
+\def\WMK@hook{%
+ \begin{picture}(0,0)\relax
+ \ifx\WMK@this\relax
+ \if@twoside
+ \ifodd\c@page\WMK@odd\else\WMK@even\fi
+ \else
+ \WMK@odd
+ \fi
+ \else
+ \WMK@this \global\let\WMK@this\relax
+ \fi
+ \end{picture}%
+}
+%
+% Define watermark producing commands
+%
+\newcommand{\watermark}[1]{\leftwatermark{#1}\rightwatermark{#1}}
+\newcommand{\leftwatermark}[1]{\long\gdef\WMK@even{#1}}
+\newcommand{\rightwatermark}[1]{\long\gdef\WMK@odd{#1}}
+\newcommand{\thiswatermark}[1]{\long\gdef\WMK@this{#1}}
+\watermark{}
+\let\WMK@this\relax
+%
+% Now we define \thispageheading{heading} command.
+% It replaces a heading on the current page to the
+% specified one and prepares it in \parbox. Watermarks are leaved unchanged.
+% The \ifWMK@savehead is needed to protect from multiple use of this command
+% on the same page.
+%
+\newif\ifWMK@savehead \WMK@saveheadfalse
+\newcommand{\thispageheading}[1]{%
+ \ifWMK@savehead \else
+ \global\WMK@saveheadtrue \global\let\WMK@savehook\WMK@hook
+ \fi
+ \long\gdef\WMK@hook{\WMK@savehook
+ \parbox[t]\textwidth{#1}\let\WMK@head\@empty
+ \global\WMK@saveheadfalse \global\let\WMK@hook\WMK@savehook
+ }%
+}
+\endinput