diff options
author | Karl Berry <karl@freefriends.org> | 2015-06-23 18:18:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-06-23 18:18:51 +0000 |
commit | 2a28908e80aaca3ef066f84e9d219cd68b8b54aa (patch) | |
tree | 867ce588251bfa2cf452f250ae152f14f6218214 /Master/texmf-dist/tex | |
parent | c4d53b195d165e5e3b159ce5610dc66098eae735 (diff) |
pagecolor (21jun15)
git-svn-id: svn://tug.org/texlive/trunk@37646 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty | 193 |
1 files changed, 133 insertions, 60 deletions
diff --git a/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty b/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty index 81b5fe7ee6b..9d0ef98d18d 100644 --- a/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty +++ b/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty @@ -9,9 +9,9 @@ %% This is a generated file. %% %% Project: pagecolor -%% Version: 2012/02/23 v1.0e +%% Version: 2015/06/22 v1.0g %% -%% Copyright (C) 2011 - 2012 by +%% Copyright (C) 2011 - 2015 by %% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de> %% %% The usual disclaimer applies: @@ -39,12 +39,18 @@ %% pagecolor.ins, pagecolor.drv, %% pagecolor-example.tex, pagecolor-example.pdf. %% -\NeedsTeXFormat{LaTeX2e}[2011/06/27] -\ProvidesPackage{pagecolor}[2012/02/23 v1.0e +%% In memoriam +%% Claudia Simone Barth + 1996/01/30 +%% Tommy Muench + 2014/01/02 +%% Hans-Klaus Muench + 2014/08/24 +%% +\NeedsTeXFormat{LaTeX2e}[2014/05/01] +\ProvidesPackage{pagecolor}[2015/06/20 v1.0g Provides thepagecolor (HMM)] %% Provides the \thepagecolor, \thepagecolornone, \newpagecolor{...}, -%% and \restorepagecolor commands. -\RequirePackage{kvoptions}[2010/12/23]% v3.10 +%% and \restorepagecolor commands and the a replacement for the +%% \nopagecolor command, if it is not available. +\RequirePackage{kvoptions}[2011/06/30]% v3.11 %% \RequirePackage{ either color or xcolor }: \@ifpackageloaded{xcolor}{% xcolor loaded \@ifpackagelater{xcolor}{2007/01/21}{% @@ -52,12 +58,12 @@ }{% else: older package version \PackageWarning{pagecolor}{% It is requested version `2007/01/21' of package\MessageBreak% - xcolor, but only an older version is available.\MessageBreak% + xcolor, but only an older version is available\MessageBreak% }% }% }{% xcolor not loaded \@ifpackageloaded{color}{% - \RequirePackage{color}[2005/11/14]% v1.0j + \RequirePackage{color}[2014/10/28]% v1.1a }{% \else \PackageWarning{pagecolor}{% The pagecolor package must be loaded after either\MessageBreak% @@ -72,33 +78,80 @@ }% \fi \RequirePackage{xcolor}[2007/01/21]% v2.11 }% \fi +\RequirePackage{ifpdf}[2011/01/30]% v2.3 +\RequirePackage{ifluatex}[2010/03/01]% v1.3 %% 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 %% (if they are not already the most recent version). \SetupKeyvalOptions{family=pagecolor,prefix=pagecolor@} -\DeclareStringOption[none]{pagecolor}% \pagecolor@pagecolor +\DeclareStringOption[none]{pagecolor}% \pagecolor@pagecolor +\DeclareStringOption[none]{nopagecolor}% \pagecolor@nopagecolor \ProcessKeyvalOptions* +%% \nopagecolor is only available for pdf(La)TeX and Lua(La)TeX +%% but not for dvips, dvipdfm(x), Xe(La)TeX,... +\def\pagecolourtmpa{0} +\ifluatex\def\pagecolourtmpa{1}\fi +\ifpdf\def\pagecolourtmpa{1}\fi +\def\pagecolourtmpb{1} +\ifx\pagecolourtmpa\pagecolourtmpb\relax% +\else% + \PackageInfo{pagecolor}{\string\nopagecolor\space is undefined}% + \def\pagecolourtmpb{none}% + \edef\pagecolourtmpa{\pagecolor@nopagecolor}% + \ifx\pagecolourtmpa\pagecolourtmpb% + \PackageWarning{pagecolor}{% + Option nopagecolor=none requested but \string\nopagecolor\space% + unknown:\MessageBreak% + By option nopagecolor the "colour" to be used with% + \string\nopagecolor\MessageBreak% + is set. The current value is "none" (maybe by default),\MessageBreak% + but command \string\nopagecolor\space is undefined.\MessageBreak% + Therefore the colour cannot be "none".\MessageBreak% + Please change the option accordingly!\MessageBreak% + As first aid nopagecolor is now set to white\MessageBreak% + }% + \setkeys{pagecolor}{nopagecolor=white}% + \fi% + \edef\pagecolourtmpa{\pagecolor@pagecolor}% + \ifx\pagecolourtmpa\pagecolourtmpb% + \PackageWarning{pagecolor}{% + Option pagecolor=none (maybe by default) used,\MessageBreak% + but \string\nopagecolor\space is unknown.\MessageBreak% + Please use anotheroption value;\MessageBreak% + \pagecolor@nopagecolor\space\MessageBreak% + will be used now\MessageBreak% + }% + \setkeys{pagecolor}{pagecolor={\pagecolor@nopagecolor}}% + \fi% + \@ifundefined{nopagecolor}{% + \newcommand{\nopagecolor}{\pagecolor{\pagecolor@nopagecolor}}% + }{\renewcommand{\nopagecolor}{\pagecolor{\pagecolor@nopagecolor}}% + }% +\fi% + \let\origpagecolour\pagecolor \renewcommand{\pagecolor}[1]{\@bsphack% \edef\pagecolourtmpa{#1}% \def\pagecolourtmpb{none}% - \ifx\pagecolourtmpa\pagecolourtmpb + \ifx\pagecolourtmpa\pagecolourtmpb\relax% \@ifundefined{nopagecolor}{% - \PackageError{pagecolor}{% - pagecolor=none requested but \string\nopagecolor\space unknown% - }{% - \string\pagecolor{none} was used, but the command % + \PackageWarning{pagecolor}{% + pagecolor=none requested but \string\nopagecolor\space% + unknown:\MessageBreak% + \string\pagecolor{none} was used, but the command\MessageBreak% \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}% + Please use another colour.\MessageBreak% + pagecolor=\pagecolor@nopagecolor \MessageBreak% + will be used now\MessageBreak% + }% + \xdef\thepagecolor{\pagecolor@nopagecolor}% + \xdef\thepagecolornone{\pagecolor@nopagecolor}% + % although it should be "none" + \origpagecolour{\pagecolor@nopagecolor}% }{% \nopagecolor% }% @@ -110,49 +163,69 @@ \@esphack% } -\@ifundefined{nopagecolor}{% - \PackageWarning{pagecolor}{% - \string\nopagecolor\space is undefined.\MessageBreak% - (As long as it is neither used anywhere\MessageBreak% - \space nor defined later, that will be no problem.)\MessageBreak% - } - \AtEndDocument{% - \@ifundefined{nopagecolor}{% no problem - }{% - \PackageError{pagecolor}{% - \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% - } + +\AtBeginDocument{% + \let\orignopagecolour\nopagecolor\relax% + \@ifpackageloaded{crop}{% crop loaded + \@ifpackagelater{crop}{2003/05/21}{% + % later than 2003/05/20 v1.9 might be OK + \PackageWarning{pagecolor}{% + \string\nopagecolor\space did not work with package\MessageBreak% + crop 2003/05/20 v1.9. A newer version is used, \MessageBreak% + which the pagecolor package does not know how to handle.\MessageBreak% + Please contact the maintainer of the pagecolor package!\MessageBreak% + }% + % Let us just hope everything got fixed: + \renewcommand{\nopagecolor}{% + \xdef\thepagecolor{white}% + \xdef\thepagecolornone{none}% + \orignopagecolour% + % That will not have any effect except when things got fixed! + }% + }{% else: older package version + \PackageWarning{pagecolor}{% + \string\nopagecolor\space does not work with\MessageBreak% + the used crop package. Using\MessageBreak% + \pagecolor@nopagecolor\MessageBreak% + as nopagecolor now\MessageBreak% + }% + \def\pagecolourtmpb{none}% + \edef\pagecolourtmpa{\pagecolor@nopagecolor}% + \ifx\pagecolourtmpa\pagecolourtmpb% + \PackageWarning{pagecolor}{% + Option nopagecolor=none requested \MessageBreak% + but this does not work with the crop package.\MessageBreak% + By option nopagecolor the "colour" to be used with % + \string\nopagecolor\MessageBreak% + is set. The current value is "none" (maybe by default),% + \MessageBreak% + but the crop package broke \string\nopagecolor .\MessageBreak% + Therefore the colour cannot be "none".\MessageBreak% + Please change the option accordingly!\MessageBreak% + As first aid nopagecolor is now set to white\MessageBreak% + }% + \setkeys{pagecolor}{nopagecolor=white}% + \fi% + \renewcommand{\nopagecolor}{\pagecolor{\pagecolor@nopagecolor}}% + }% + }{% crop not loaded + \def\pagecolourtmpa{0} + \ifluatex\def\pagecolourtmpa{1}\fi + \ifpdf\def\pagecolourtmpa{1}\fi + \def\pagecolourtmpb{1} + \ifx\pagecolourtmpa\pagecolourtmpb\relax% + \def\pagecolourtmpa{none}% + \else% + \def\pagecolourtmpa{\pagecolor@nopagecolor}% + \fi% + \renewcommand{\nopagecolor}{% + \xdef\thepagecolor{white}% + \xdef\thepagecolornone{\pagecolourtmpa}% + \orignopagecolour% + }% }% - }% - }{% \else - \let\orignopagecolour\nopagecolor - \renewcommand{\nopagecolor}{% - \xdef\thepagecolor{white} - \xdef\thepagecolornone{none} - \orignopagecolour - } } -\def\pagecolourtmpb{none} -\ifx\pagecolor@pagecolor\pagecolourtmpb - \@ifundefined{nopagecolor}{% - \PackageWarning{pagecolor}{% - Option pagecolor=none (maybe by default) used,\MessageBreak% - but \string\nopagecolor\space is unknown. Please use another% - \MessageBreak% - option value; white will be used now.\MessageBreak% - } - \setkeys{pagecolor}{pagecolor=white}% - }{% ok - }% -\fi - \pagecolor{\pagecolor@pagecolor} \newcommand{\newpagecolor}[1]{% |