diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty | 96 |
1 files changed, 57 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty b/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty index beea5bfb298..1e8b659687a 100644 --- a/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty +++ b/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty @@ -9,12 +9,12 @@ %% This is a generated file. %% %% Project: pagecolor -%% Version: 2011/08/08 v1.0c +%% Version: 2012/02/01 v1.0d %% -%% Copyright (C) 2011 by +%% Copyright (C) 2011 - 2012 by %% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de> %% -%% The usual disclaimer applys: +%% 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.) @@ -33,32 +33,37 @@ %% %% The Current Maintainer of this work is H.-Martin Muench. %% -%% This work consists of the main source file pagecolor.dtx -%% and the derived files -%% pagecolor.sty, pagecolor.pdf, pagecolor.ins, pagecolor.drv, -%% pagecolor-example.tex. +%% 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. %% -\NeedsTeXFormat{LaTeX2e}[2009/09/24] -\ProvidesPackage{pagecolor}[2011/08/08 v1.0c +\NeedsTeXFormat{LaTeX2e}[2011/06/27] +\ProvidesPackage{pagecolor}[2012/02/01 v1.0d Provides thepagecolor (HMM)] -%% Provides the \thepagecolor and \thepagecolornone commands. +%% Provides the \thepagecolor, \thepagecolornone, \newpagecolor{...}, +%% and \restorepagecolor commands. \RequirePackage{kvoptions}[2010/12/23]% v3.10 %% \RequirePackage{ either color or xcolor }: \@ifpackageloaded{color}{% \RequirePackage{color}[2005/11/14]% v1.0j - }{% else - \@ifpackageloaded{xcolor}{% ok - }{% else + }{% \else + \@ifpackageloaded{xcolor}{% OK + }{% \else \PackageWarning{pagecolor}{% The pagecolor package must be loaded after either\MessageBreak% package color or after package xcolor (at your\MessageBreak% option). Neither package was loaded before package\MessageBreak% pagecolor. Loading of package xcolor will now be\MessageBreak% tried automatically.\MessageBreak% + When the pagecolor package is used with option\MessageBreak% + pagecolor using a colour requiring e. g. x11names\MessageBreak% + option for xcolor package, this will not work!\MessageBreak% } - }% fi + }% \fi \RequirePackage{xcolor}[2007/01/21]% v2.11 - }% fi + }% \fi %% pagecolor may work with earlier versions of LaTeX and the %% packages, but this was not tested. Please consider updating %% your LaTeX and packages to the most recent version @@ -70,30 +75,32 @@ \let\origpagecolour\pagecolor -\renewcommand{\pagecolor}[1]{% - \edef\pagecolourtmpa{#1} - \def\pagecolourtmpb{none} +\renewcommand{\pagecolor}[1]{\@bsphack% + \edef\pagecolourtmpa{#1}% + \def\pagecolourtmpb{none}% \ifx\pagecolourtmpa\pagecolourtmpb \@ifundefined{nopagecolor}{% \PackageError{pagecolor}{% pagecolor=none requested but \string\nopagecolor\space unknown% }{% - \string\pagecolor{none} was used, but the command \string\nopagecolor\space% - is undefined.\MessageBreak% - Please use another colour. pagecolor=white will be used now.\MessageBreak% - } - \xdef\thepagecolor{white} - \xdef\thepagecolornone{white}% although it should be "none" - \origpagecolour{white} + \string\pagecolor{none} was used, but the command % + \string\nopagecolor\space is undefined.\MessageBreak% + Please use another colour. pagecolor=white will be used now.% + \MessageBreak% + }% + \gdef\thepagecolor{white}% + \gdef\thepagecolornone{white}% although it should be "none" + \origpagecolour{white}% }{% - \nopagecolor - } - \else - \xdef\thepagecolor{#1} - \xdef\thepagecolornone{#1} - \origpagecolour{\thepagecolor} - \fi - } + \nopagecolor% + }% + \else% + \xdef\thepagecolor{#1}% + \xdef\thepagecolornone{#1}% + \origpagecolour{\thepagecolornone}% + \fi% + \@esphack% +} \@ifundefined{nopagecolor}{% \PackageWarning{pagecolor}{% @@ -105,12 +112,13 @@ \@ifundefined{nopagecolor}{% no problem }{% \PackageError{pagecolor}{% - \string\nopagecolor\space defined after loading package\MessageBreak% + \string\nopagecolor\space defined after loading package% + \MessageBreak% pagecolor% - }{\string\nopagecolor\space was defined after loading the pagecolor - package.\MessageBreak% - Either define \string\nopagecolor\space earlier or load the pagecolor - package later.\MessageBreak% + }{\string\nopagecolor\space was defined after loading the % + pagecolor package.\MessageBreak% + Either define \string\nopagecolor\space earlier or load the % + pagecolor package later.\MessageBreak% } }% }% @@ -128,7 +136,8 @@ \@ifundefined{nopagecolor}{% \PackageWarning{pagecolor}{% Option pagecolor=none (maybe by default) used,\MessageBreak% - but \string\nopagecolor\space is unknown. Please use another\MessageBreak% + but \string\nopagecolor\space is unknown. Please use another% + \MessageBreak% option value; white will be used now.\MessageBreak% } \setkeys{pagecolor}{pagecolor=white}% @@ -138,6 +147,15 @@ \pagecolor{\pagecolor@pagecolor} +\newcommand{\newpagecolor}[1]{% +\xdef\pagecolourtmpc{\thepagecolornone}% +\pagecolor{#1}% +} + +\newcommand{\restorepagecolor}{\pagecolor{\pagecolourtmpc}} + +\gdef\pagecolourtmpc{\thepagecolor} + \endinput %% %% End of file `pagecolor.sty'. |