%%
%% This is file `pagecolor-example.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% pagecolor.dtx  (with options: `example')
%% 
%% This is a generated file.
%% 
%% Project: pagecolor
%% Version: 2017/05/29 v1.0i
%% 
%% Copyright (C) 2011 - 2017 by
%%     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
%% 
%% The usual disclaimer applies:
%% If it doesn't work right that's your problem.
%% (Nevertheless, send an e-mail to the maintainer
%%  when you find an error in this package.)
%% 
%% This work 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. This version of this license is in
%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% The Current Maintainer of this work is H.-Martin Muench.
%% 
%% This work consists of the main source file pagecolor.dtx,
%% the README, and the derived files
%%    pagecolor.sty, pagecolor.pdf,
%%    pagecolor.ins, pagecolor.drv,
%%    pagecolor-example.tex, pagecolor-example.pdf.
%% 
%% In memoriam
%%  Claudia Simone Barth + 1996/01/30
%%  Tommy Muench + 2014/01/02
%%  Hans-Klaus Muench + 2014/08/24
%% 
\documentclass[british]{article}[2014/09/29]% v1.4h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[%
 extension=pdf,%
 plainpages=false,%
 pdfpagelabels=true,%
 hyperindex=false,%
 pdflang={en},%
 pdftitle={pagecolor package example},%
 pdfauthor={H.-Martin Muench},%
 pdfsubject={Example for the pagecolor package},%
 pdfkeywords={LaTeX, pagecolor, thepagecolor, page colour,%
  H.-Martin Muench},%
 pdfview=Fit,pdfstartview=Fit,%
 pdfpagelayout=SinglePage%
]{hyperref}[2012/11/06]% v6.83m
\usepackage[x11names]{xcolor}[2007/01/21]% v2.11
 % The xcolor package would not be needed for just using
 % the base colours. The color package would be sufficient for that.
\definecolor{darkgreen}{rgb}{0.0, 0.3, 0.0}%
\usepackage[pagecolor={LightGoldenrod1},%
  nopagecolor={none}]{pagecolor}[2017/05/29]% v1.0i

\usepackage{afterpage}[2014/10/28]% v1.08
 % The afterpage package is generally not needed,
 % but the |\newpagecolor{somecolour}\afterpage{\restorepagecolor}|
 % construct shall be demonstrated.

\usepackage{lipsum}[2014/07/27]% v1.3
 % The lipsum package is generally not needed,
 % but some blind text is needed for the example.

\usepackage{hologo}[2012/04/26]% v1.10
 % The hologo package is only needed to write
 % \hologo{pdfTeX}, \hologo{LuaTeX}, and \hologo{XeTeX}.

\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\listfiles%
\begin{document}
\pagenumbering{arabic}
\section*{Example for pagecolor}

This example demonstrates the use of package\newline
\textsf{pagecolor}, v1.0i as of 2017/05/29 (HMM).\newline
The used options were\newline
\verb|pagecolor={LightGoldenrod1}| (\verb|pagecolor={none}|
would be the default), and
\verb|pagecolor={none}| (which is the default).\newline

\noindent For more details please see the documentation!\newline

\noindent {\color{darkgreen} Save per page about $200\unit{ml}$ water,
$2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\newline
Therefore please print only if this is really necessary.}\newline

\noindent The current page (background) colour is\newline
\verb|\thepagecolor|\ =\ \thepagecolor \newline
(and \verb|\thepagecolornone|\ =\ \thepagecolornone ,
which would only be different from \verb|\thepagecolor|,
when the page colour would be \verb|none|).

\pagebreak
\pagecolor{rgb:-green!40!yellow,3;green!40!yellow,2;red,1}

{\color{white} The current page (background) colour is\newline
\verb|\thepagecolor|\ =\ \thepagecolor . \newline}

{\color{\thepagecolor} And that makes this text practically invisible.
\newline}

{\color{white} Which made the preceding line of text practically
invisible.}

\pagebreak
\newpagecolor{red}

This page uses \verb|\newpagecolor{red}|.

\pagebreak
\restorepagecolor

{\color{white}And this page uses \verb|\restorepagecolor| to restore
the page colour to the value it had before the red page.}

\pagebreak
\pagecolor{none}

This page uses \verb|\pagecolor{none}|. If the \verb|\nopagecolor|
command is known (\hologo{pdfTeX} and \hologo{LuaTeX}; not yet for
dvips, dvipdfm(x) or \hologo{XeTeX}), the page colour is now
\verb|none| (because option \verb|nopagecolor={none}|), otherwise
\verb|white| (or the colour given with option \verb|nopagecolor={...}|):
\verb|\thepagecolor|\ =\ \thepagecolor\ and
\verb|\thepagecolornone|\ =\ \thepagecolornone .

\pagebreak
\restorepagecolor

{\color{white}\verb|\restorepagecolor| restored the page colour again.}

\pagebreak
\pagecolor{green}

This page is green due to \verb|\pagecolor{green}|.

\pagebreak
\newpagecolor{blue}\afterpage{\restorepagecolor}

{\color{white}\verb|\newpagecolor{blue}\afterpage{\restorepagecolor}|%
\newline
was used here, i.\,e.~this page is blue, and the next one will
automatically have the same page colour before it was changed to blue
here (i.\,e. green).}

\smallskip
{\color{red}\textbf{\lipsum[1-11]}}
\bigskip

The page colour was changed back at the end of the page -
in mid-sentence!

\end{document}
\endinput
%%
%% End of file `pagecolor-example.tex'.
