From 195a001c717e4b59bc5530a0d708e343c94a4e64 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 30 Aug 2015 20:50:26 +0000 Subject: pagecolor (30aug15) git-svn-id: svn://tug.org/texlive/trunk@38249 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/pagecolor/README | 2 +- .../doc/latex/pagecolor/pagecolor-example.pdf | Bin 85717 -> 85717 bytes .../doc/latex/pagecolor/pagecolor-example.tex | 6 +- .../texmf-dist/doc/latex/pagecolor/pagecolor.pdf | Bin 315840 -> 319560 bytes .../source/latex/pagecolor/pagecolor.drv | 4 +- .../source/latex/pagecolor/pagecolor.dtx | 233 +++++++++++++-------- .../source/latex/pagecolor/pagecolor.ins | 6 +- .../texmf-dist/tex/latex/pagecolor/pagecolor.sty | 173 +++++++++------ 8 files changed, 270 insertions(+), 154 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/pagecolor/README b/Master/texmf-dist/doc/latex/pagecolor/README index fbf61c8540f..3ed0bdc5e23 100644 --- a/Master/texmf-dist/doc/latex/pagecolor/README +++ b/Master/texmf-dist/doc/latex/pagecolor/README @@ -1,4 +1,4 @@ -README for pagecolor package, 2015/06/22, v1.0g +README for pagecolor package, 2015/08/30, v1.0h TABLE OF CONTENTS diff --git a/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.pdf b/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.pdf index 3f27205606a..e5bc106130f 100644 Binary files a/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.pdf and b/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.pdf differ diff --git a/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.tex b/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.tex index b47a922f53f..0a1e7a61ae0 100644 --- a/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.tex +++ b/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.tex @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pagecolor -%% Version: 2015/06/22 v1.0g +%% Version: 2015/08/30 v1.0h %% %% Copyright (C) 2011 - 2015 by %% H.-Martin M"unch @@ -64,7 +64,7 @@ % The xcolor package would not be needed for just using % the base colours. The color package would be sufficient for that. \usepackage[pagecolor={LightGoldenrod1},% - nopagecolor={none}]{pagecolor}[2015/06/22]% v1.0g + nopagecolor={none}]{pagecolor}[2015/08/30]% v1.0h \usepackage{afterpage}[2014/10/28]% v1.08 % The afterpage package is generally not needed, @@ -86,7 +86,7 @@ \section*{Example for pagecolor} This example demonstrates the use of package\newline -\textsf{pagecolor}, v1.0g as of 2015/06/22 (HMM).\newline +\textsf{pagecolor}, v1.0h as of 2015/08/30 (HMM).\newline The used options were\newline \verb|pagecolor={LightGoldenrod1}| (\verb|pagecolor={none}| would be the default), and diff --git a/Master/texmf-dist/doc/latex/pagecolor/pagecolor.pdf b/Master/texmf-dist/doc/latex/pagecolor/pagecolor.pdf index 65706ee4914..a7c6ad97453 100644 Binary files a/Master/texmf-dist/doc/latex/pagecolor/pagecolor.pdf and b/Master/texmf-dist/doc/latex/pagecolor/pagecolor.pdf differ diff --git a/Master/texmf-dist/source/latex/pagecolor/pagecolor.drv b/Master/texmf-dist/source/latex/pagecolor/pagecolor.drv index b9bb423b326..56dc55f13df 100644 --- a/Master/texmf-dist/source/latex/pagecolor/pagecolor.drv +++ b/Master/texmf-dist/source/latex/pagecolor/pagecolor.drv @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pagecolor -%% Version: 2015/06/22 v1.0g +%% Version: 2015/08/30 v1.0h %% %% Copyright (C) 2011 - 2015 by %% H.-Martin M"unch @@ -46,7 +46,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2014/05/01] \ProvidesFile{pagecolor.drv}% - [2015/06/22 v1.0g Provides thepagecolor (HMM)] + [2015/08/30 v1.0h Provides thepagecolor (HMM)] \documentclass{ltxdoc}[2014/09/29]% v2.0u \usepackage{holtxdoc}[2012/03/21]% v0.24 %% pagecolor may work with earlier versions of LaTeX2e and those diff --git a/Master/texmf-dist/source/latex/pagecolor/pagecolor.dtx b/Master/texmf-dist/source/latex/pagecolor/pagecolor.dtx index 541fdc549f1..48b3e38efe8 100644 --- a/Master/texmf-dist/source/latex/pagecolor/pagecolor.dtx +++ b/Master/texmf-dist/source/latex/pagecolor/pagecolor.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: pagecolor.dtx -% Version: 2015/06/22 v1.0g +% Version: 2015/08/30 v1.0h % % Copyright (C) 2011 - 2015 by % H.-Martin M"unch @@ -31,7 +31,7 @@ % % Also a TDS.ZIP file is provided that contains all the files % already sorted in a TDS tree: -% http://mirrors.ctan.org/install/macros/latex/contrib/pagecolor.tds.zip +% http://mirror.ctan.org/install/macros/latex/contrib/pagecolor.tds.zip % %<*ignore> \begingroup @@ -48,7 +48,7 @@ \input docstrip.tex \Msg{******************************************************************} \Msg{* Installation *} -\Msg{* Package: pagecolor 2015/06/22 v1.0g Provides thepagecolor (HMM)*} +\Msg{* Package: pagecolor 2015/08/30 v1.0h Provides thepagecolor (HMM)*} \Msg{******************************************************************} \keepsilent @@ -60,7 +60,7 @@ This is a generated file. Project: pagecolor -Version: 2015/06/22 v1.0g +Version: 2015/08/30 v1.0h Copyright (C) 2011 - 2015 by H.-Martin M"unch @@ -150,7 +150,7 @@ In memoriam %<*driver> \NeedsTeXFormat{LaTeX2e}[2014/05/01] \ProvidesFile{pagecolor.drv}% - [2015/06/22 v1.0g Provides thepagecolor (HMM)] + [2015/08/30 v1.0h Provides thepagecolor (HMM)] \documentclass{ltxdoc}[2014/09/29]% v2.0u \usepackage{holtxdoc}[2012/03/21]% v0.24 %% pagecolor may work with earlier versions of LaTeX2e and those @@ -186,7 +186,7 @@ In memoriam % % \fi % -% \CheckSum{268} +% \CheckSum{335} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -234,9 +234,10 @@ In memoriam % \DoNotIndex{\textquotedblleft,\textquotedblright} % \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX} % \DoNotIndex{\section,\color,\pagenumbering} +% \DoNotIndex{\pagecolourtmpa,\pagecolourtmpb,\pagecolourtmpc} % % \title{The \xpackage{pagecolor} package} -% \date{2015/06/22 v1.0g} +% \date{2015/08/30 v1.0h} % \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}} % % \maketitle @@ -405,7 +406,7 @@ In memoriam % The xcolor package would not be needed for just using % the base colours. The color package would be sufficient for that. \usepackage[pagecolor={LightGoldenrod1},% - nopagecolor={none}]{pagecolor}[2015/06/22]% v1.0g + nopagecolor={none}]{pagecolor}[2015/08/30]% v1.0h \usepackage{afterpage}[2014/10/28]% v1.08 % The afterpage package is generally not needed, @@ -427,7 +428,7 @@ In memoriam \section*{Example for pagecolor} This example demonstrates the use of package\newline -\textsf{pagecolor}, v1.0g as of 2015/06/22 (HMM).\newline +\textsf{pagecolor}, v1.0h as of 2015/08/30 (HMM).\newline The used options were\newline \verb|pagecolor={LightGoldenrod1}| (\verb|pagecolor={none}| would be the default), and @@ -527,7 +528,7 @@ in mid-sentence! % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[2014/05/01] -\ProvidesPackage{pagecolor}[2015/06/20 v1.0g +\ProvidesPackage{pagecolor}[2015/06/20 v1.0h Provides thepagecolor (HMM)] % \end{macrocode} % @@ -692,11 +693,10 @@ in mid-sentence! }% \xdef\thepagecolor{\pagecolor@nopagecolor}% \xdef\thepagecolornone{\pagecolor@nopagecolor}% - % although it should be "none" + % although it should be "none" \origpagecolour{\pagecolor@nopagecolor}% - }{% - \nopagecolor% - }% + }{\nopagecolor% + }% \else% \xdef\thepagecolor{#1}% \xdef\thepagecolornone{#1}% @@ -714,70 +714,67 @@ in mid-sentence! % A workaround needs to be defined: % % \begin{macrocode} +\let\orignopagecolour\nopagecolor\relax% -\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}% -% \end{macrocode} -% \pagebreak -% \begin{macrocode} - \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}}% +\gdef\pagecolor@cl{0}% +\@ifpackageloaded{crop}{% crop loaded + \gdef\pagecolor@cl{1}% + \@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% }% - }{% 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% + % Let us just hope everything got fixed: \renewcommand{\nopagecolor}{% \xdef\thepagecolor{white}% - \xdef\thepagecolornone{\pagecolourtmpa}% + \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% + \gdef\pagecolourtmpa{none}% + \else% + \gdef\pagecolourtmpa{\pagecolor@nopagecolor}% + \fi% + \renewcommand{\nopagecolor}{% + \xdef\thepagecolor{white}% + \xdef\thepagecolornone{\pagecolourtmpa}% + \orignopagecolour% + }% } @@ -842,7 +839,68 @@ in mid-sentence! % (or cannot) manually determine where the page ends,\\ % |\newpagecolor{<|\textit{some colour}|>}\afterpage{\restorepagecolor}|\\ % does the trick (and requires an additional |\usepackage{afterpage}| in the -% document's preamble). +% document's preamble).\\ +% +% We checked whether the \xpackage{crop} package had been loaded before +% the \xpackage{pagecolor} package, but maybe it has been loaded afterwards. +% This is checked |\AtBeginDocument|: +% +% \begin{macrocode} +\AtBeginDocument{% + \def\pagecolourtmpb{0}% + \ifx\pagecolor@cl\pagecolourtmpb\relax% + % crop not loaded before pagecolor, but maybe afterwards: + \@ifpackageloaded{crop}{% crop indeed loaded afterwards. + \gdef\pagecolor@cl{1}% + \@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% + }% +% \end{macrocode} +% \pagebreak +% \begin{macrocode} + % 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 neither loaded afterwards. + }% + \fi% + } + % \begin{macrocode} % % \end{macrocode} @@ -862,7 +920,7 @@ in mid-sentence! % \begin{description} % \item[-] \TeX Format \LaTeXe{}: \url{https://www.CTAN.org} % -% \item[-] document class \xclass{ltxdoc}, 2014/09/29, v2.0u, +% \item[-] document class \xclass{ltxdoc}, 2015/03/26, v2.0w, % \url{https://www.ctan.org/pkg/ltxdoc} % % \item[-] package \xpackage{holtxdoc}, 2012/03/21, v0.24, @@ -900,7 +958,7 @@ in mid-sentence! % The |pagecolor-example.tex| requires the same file as all % documents using the \xpackage{pagecolor} package, i.\,e. % \begin{description} -% \item[-] package \xpackage{pagecolor}, 2015/06/22, v1.0g, +% \item[-] package \xpackage{pagecolor}, 2015/08/30, v1.0h, % \url{https://www.ctan.org/pkg/pagecolor}\\ % (Well, it is the example file for this package, and because you are reading the % documentation for the \xpackage{pagecolor} package, it~can be assumed that you already @@ -940,7 +998,7 @@ in mid-sentence! % \item[-] package \xpackage{transparent}, 2007/01/08, v1.0, \\ % \url{https://www.ctan.org/pkg/transparent} % -% \item[-] package \xpackage{hrefhide}, 2011/04/29, v1.0g, \\ +% \item[-] package \xpackage{hrefhide}, 2011/04/29, v1.0h, \\ % \url{https://www.ctan.org/pkg/hrefhide} % \end{description} % @@ -951,14 +1009,14 @@ in mid-sentence! % All packages of \textsc{Heiko Oberdiek's} bundle `oberdiek' % (especially \xpackage{hologo}, \xpackage{holtxdoc}, and \xpackage{kvoptions}) % are also available in a TDS compliant ZIP archive:\\ -% \url{http://mirrors.ctan.org/install/macros/latex/contrib/oberdiek.tds.zip}.\\ +% \url{http://mirror.ctan.org/install/macros/latex/contrib/oberdiek.tds.zip}.\\ % It is probably best to download and use this, because the packages in there % are quite probably both recent and compatible among themselves.\\ % % \DescribeMacro{hyperref} % \noindent \xpackage{hyperref} is not included in that bundle and needs to be % downloaded separately,\\ -% \url{http://mirrors.ctan.org/install/macros/latex/contrib/hyperref.tds.zip}.\\ +% \url{http://mirror.ctan.org/install/macros/latex/contrib/hyperref.tds.zip}.\\ % % \DescribeMacro{M\"{u}nch} % A hyperlinked list of my (other) packages can be found at @@ -967,13 +1025,13 @@ in mid-sentence! % \subsection{Package, unpacking TDS} % \paragraph{Package.} This package is available on \url{https://www.CTAN.org}. % \begin{description} -% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/pagecolor/pagecolor.dtx}]\hspace*{0.1cm} +% \item[\url{http://mirror.ctan.org/macros/latex/contrib/pagecolor/pagecolor.dtx}]\hspace*{0.1cm} % The source file. -% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/pagecolor/pagecolor.pdf}]\hspace*{0.1cm} +% \item[\url{http://mirror.ctan.org/macros/latex/contrib/pagecolor/pagecolor.pdf}]\hspace*{0.1cm} % The documentation. -% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/pagecolor/pagecolor-example.pdf}]\hspace*{0.1cm} +% \item[\url{http://mirror.ctan.org/macros/latex/contrib/pagecolor/pagecolor-example.pdf}]\hspace*{0.1cm} % The compiled example file, as it should look like. -% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/pagecolor/README}]\hspace*{0.1cm}\\ +% \item[\url{http://mirror.ctan.org/macros/latex/contrib/pagecolor/README}]\hspace*{0.1cm}\\ % \hspace*{1em}The README file. % \end{description} % @@ -1141,7 +1199,8 @@ in mid-sentence! % \ (\textsc{H.~Oberdiek} \& \textsc{Gouailles}).\\ % I thank \textsc{haoyun\_tex} for suggesting the |\newpagecolor|/|\restorepagecolor| % pair of commands and everyone at \url{https://tex.stackexchange.com/q/25137/6865} -% for their contributions there. +% for their contributions there. Thanks go to \textsc{Heiner Richter} +% for finding a bug and to \textsc{Johannes B\"{o}ttcher} for reporting it. % % \bigskip % @@ -1182,6 +1241,12 @@ in mid-sentence! % \begin{Version}{2015/06/22 v1.0g} % \item Replaced all error messages by warnings. % \end{Version} +% \begin{Version}{2015/08/30 v1.0h} +% \item Bugfix: Cecking for \xpackage{crop} package done |\AtBeginDocument|, +% but some of the related code must already be performed earlier. +% Bug found by \textsc{Heiner Richter} and reported by +% \textsc{Johannes B\"{o}ttcher}, thanks! +% \end{Version} % \end{History} % % \bigskip @@ -1189,7 +1254,7 @@ in mid-sentence! % When you find a mistake or have a suggestion for an improvement of this package, % please send an e-mail to the maintainer, thanks! (Please see BUG REPORTS in the README.) % -% \bigskip +% \newpage % % \PrintIndex % diff --git a/Master/texmf-dist/source/latex/pagecolor/pagecolor.ins b/Master/texmf-dist/source/latex/pagecolor/pagecolor.ins index 9d35876d0a4..dcbea2f65c9 100644 --- a/Master/texmf-dist/source/latex/pagecolor/pagecolor.ins +++ b/Master/texmf-dist/source/latex/pagecolor/pagecolor.ins @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pagecolor -%% Version: 2015/06/22 v1.0g +%% Version: 2015/08/30 v1.0h %% %% Copyright (C) 2011 - 2015 by %% H.-Martin M"unch @@ -47,7 +47,7 @@ \input docstrip.tex \Msg{******************************************************************} \Msg{* Installation *} -\Msg{* Package: pagecolor 2015/06/22 v1.0g Provides thepagecolor (HMM)*} +\Msg{* Package: pagecolor 2015/08/30 v1.0h Provides thepagecolor (HMM)*} \Msg{******************************************************************} \keepsilent @@ -59,7 +59,7 @@ This is a generated file. Project: pagecolor -Version: 2015/06/22 v1.0g +Version: 2015/08/30 v1.0h Copyright (C) 2011 - 2015 by H.-Martin M"unch diff --git a/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty b/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty index 9d0ef98d18d..51cf349366d 100644 --- a/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty +++ b/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pagecolor -%% Version: 2015/06/22 v1.0g +%% Version: 2015/08/30 v1.0h %% %% Copyright (C) 2011 - 2015 by %% H.-Martin M"unch @@ -45,7 +45,7 @@ %% Hans-Klaus Muench + 2014/08/24 %% \NeedsTeXFormat{LaTeX2e}[2014/05/01] -\ProvidesPackage{pagecolor}[2015/06/20 v1.0g +\ProvidesPackage{pagecolor}[2015/06/20 v1.0h Provides thepagecolor (HMM)] %% Provides the \thepagecolor, \thepagecolornone, \newpagecolor{...}, %% and \restorepagecolor commands and the a replacement for the @@ -150,11 +150,10 @@ }% \xdef\thepagecolor{\pagecolor@nopagecolor}% \xdef\thepagecolornone{\pagecolor@nopagecolor}% - % although it should be "none" + % although it should be "none" \origpagecolour{\pagecolor@nopagecolor}% - }{% - \nopagecolor% - }% + }{\nopagecolor% + }% \else% \xdef\thepagecolor{#1}% \xdef\thepagecolornone{#1}% @@ -163,67 +162,67 @@ \@esphack% } +\let\orignopagecolour\nopagecolor\relax% -\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}}% +\gdef\pagecolor@cl{0}% +\@ifpackageloaded{crop}{% crop loaded + \gdef\pagecolor@cl{1}% + \@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% }% - }{% 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% + % Let us just hope everything got fixed: \renewcommand{\nopagecolor}{% \xdef\thepagecolor{white}% - \xdef\thepagecolornone{\pagecolourtmpa}% + \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% + \gdef\pagecolourtmpa{none}% + \else% + \gdef\pagecolourtmpa{\pagecolor@nopagecolor}% + \fi% + \renewcommand{\nopagecolor}{% + \xdef\thepagecolor{white}% + \xdef\thepagecolornone{\pagecolourtmpa}% + \orignopagecolour% + }% } \pagecolor{\pagecolor@pagecolor} @@ -237,6 +236,58 @@ \gdef\pagecolourtmpc{\thepagecolor} +\AtBeginDocument{% + \def\pagecolourtmpb{0}% + \ifx\pagecolor@cl\pagecolourtmpb\relax% + % crop not loaded before pagecolor, but maybe afterwards: + \@ifpackageloaded{crop}{% crop indeed loaded afterwards. + \gdef\pagecolor@cl{1}% + \@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 neither loaded afterwards. + }% + \fi% + } + \endinput %% %% End of file `pagecolor.sty'. -- cgit v1.2.3