texlive[65120] Master/texmf-dist: pagecolor (27nov22)

commits+karl at tug.org commits+karl at tug.org
Sun Nov 27 21:50:48 CET 2022


Revision: 65120
          http://tug.org/svn/texlive?view=revision&revision=65120
Author:   karl
Date:     2022-11-27 21:50:48 +0100 (Sun, 27 Nov 2022)
Log Message:
-----------
pagecolor (27nov22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/pagecolor/README
    trunk/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.pdf
    trunk/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.tex
    trunk/Master/texmf-dist/doc/latex/pagecolor/pagecolor.pdf
    trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.drv
    trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.dtx
    trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.ins
    trunk/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty

Modified: trunk/Master/texmf-dist/doc/latex/pagecolor/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pagecolor/README	2022-11-27 20:50:23 UTC (rev 65119)
+++ trunk/Master/texmf-dist/doc/latex/pagecolor/README	2022-11-27 20:50:48 UTC (rev 65120)
@@ -1,4 +1,4 @@
-README for pagecolor package, 2022-11-20, v1.1a
+README for pagecolor package, 2022-11-27, v1.2a
 
 
 TABLE OF CONTENTS
@@ -27,6 +27,9 @@
 this package provides a replacement.
 Similar to \newgeometry and \restoregeometry of the geometry package
 \newpagecolor{...} and \restorepagecolor are provided.
+For use with the crop package \backgroundpagecolor{...}
+as well as \newbackgroundpagecolor{...} and
+\restorebackgroundpagecolor are provided.
 
 This material is published under the LPPL 1.3c: This work may be
 distributed and/or modified under the conditions of the LaTeX Project
@@ -36,13 +39,13 @@
 and the latest version of this license is in
 https://www.latex-project.org/lppl.txt
 and version 1.3c or later is part of all distributions of LaTeX version
-2008-05-04 or later.
+2005-12-01 or later.
 
 
 2 DOWNLOAD
 ==========
 
-`pagecolor' is available on CTAN:
+"pagecolor" is available on CTAN:
 https://www.ctan.org/pkg/pagecolor
 
 Also a ZIP file is provided that contains the files:
@@ -60,7 +63,7 @@
 
 Installation with ZIP file in TDS format
 ----------------------------------------
-The ZIP file `pagecolor.tds.zip' contains the files
+The ZIP file "pagecolor.tds.zip" contains the files
 sorted in a TDS tree. Thus you can directly unpack the
 ZIP file inside a TDS tree.
 See https://www.ctan.org/TDS-guidelines for an explanation
@@ -79,9 +82,9 @@
    If necessary, unpack them.
 b) Generate the package and driver files:
      tex pagecolor.dtx
-c) Install the file `pagecolor.sty' in your TDS tree:
+c) Install the file "pagecolor.sty" in your TDS tree:
      cp pagecolor.sty TDS:tex/latex/pagecolor/
-   Replace `TDS:' by the prefix of your TDS tree
+   Replace "TDS:" by the prefix of your TDS tree
    (texmf directory).
 d) Create the documentation, if necessary, e.g.
      pdflatex pagecolor.dtx
@@ -105,8 +108,8 @@
 =====================
 
 pagecolor loads other packages:
-kvoptions and 
-xcolor, if the color package has not been loaded before pagecolor 
+- kvoptions and 
+- xcolor, if the color package has not been loaded before pagecolor 
 which again load other packages
 (see the result of the \listfiles command in the log-file
  of the example).
@@ -115,7 +118,7 @@
 5 PACKAGE COMPATIBILITY
 =======================
 
-pagecolor should be loaded quite early, i. e. before
+pagecolor should be loaded quite early, i.e. before
 \pagecolor{...} is used by some other package
 (but can be loaded later using the pagecolor={...} option
 with accordingly chosen value), but must be loaded after
@@ -138,8 +141,8 @@
   warning messages.
 * \errorcontextlines=\maxdimen can be added in the
   TeX code to get more information in TeX error messages.
-* Minimal test file that shows the problem, but does not
-  contain any unnecessary packages and code.
+* Minimal test file that shows the problem,
+  but does not contain any unnecessary packages and code.
 * Used drivers/programs.
 * Version information about used packages and programs.
 * If you are using LaTeX, then add "\listfiles" to the document.

Modified: trunk/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.tex	2022-11-27 20:50:23 UTC (rev 65119)
+++ trunk/Master/texmf-dist/doc/latex/pagecolor/pagecolor-example.tex	2022-11-27 20:50:48 UTC (rev 65120)
@@ -9,16 +9,11 @@
 %% This is a generated file.
 %% 
 %% Project: pagecolor
-%% Version: 2022-11-20 v1.1a
+%% Version: 2022-11-27 v1.2a
 %% 
 %% Copyright (C) 2011 - 2022 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% 
-%% The usual disclaimer applies:
-%% If it does not work right that is 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
@@ -64,8 +59,10 @@
  % The xcolor package would not be needed for just using the base colors.
  % The color package would be sufficient for that.
 
+ % \usepackage[cam,center,a3]{crop}[2017/11/19]% 1.10
+
 \usepackage[pagecolor={LightGoldenrod1},%
-  nopagecolor={none}]{pagecolor}[2022-11-20]% v1.1a
+  nopagecolor={none}]{pagecolor}[2022-11-27]% v1.2a
 
 \usepackage{afterpage}[2014/10/28]% v1.08
  % The afterpage package is generally not needed,
@@ -82,7 +79,7 @@
 \section*{Example for pagecolor}
 
 This example demonstrates the use of package\newline
-\textsf{pagecolor}, v1.1a as of 2022-11-20 (HMM).\newline
+\textsf{pagecolor}, v1.2a as of 2022-11-27 (HMM).\newline
 The used options were\newline
 \verb|pagecolor={LightGoldenrod1}|\newline
 (\verb|pagecolor={none}| would be the default), and\newline
@@ -155,6 +152,19 @@
 The page color was changed back at the end of the page --
 in mid-sentence!
 
+\pagebreak
+
+\backgroundpagecolor{pink}
+
+When activating the loading of the crop package in the preamble of this
+document, \verb|\backgroundpagecolor{<|\textit{some color}\verb|>}|
+changes the color of the background/outer/physical page.
+
+Analogous to \verb|\newpagecolor{...}| and \verb|\restorepagecolor|,
+for the background/outer/physical page
+\verb|\newbackgroundpagecolor{<|\textit{some color}\verb|>}| and\linebreak
+\verb|\restorebackgroundpagecolor| are provided (but not demonstrated
+here).
 \end{document}
 \endinput
 %%

Modified: trunk/Master/texmf-dist/doc/latex/pagecolor/pagecolor.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.drv
===================================================================
--- trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.drv	2022-11-27 20:50:23 UTC (rev 65119)
+++ trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.drv	2022-11-27 20:50:48 UTC (rev 65120)
@@ -9,16 +9,11 @@
 %% This is a generated file.
 %% 
 %% Project: pagecolor
-%% Version: 2022-11-20 v1.1a
+%% Version: 2022-11-27 v1.2a
 %% 
 %% Copyright (C) 2011 - 2022 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% 
-%% The usual disclaimer applies:
-%% If it does not work right that is 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
@@ -46,7 +41,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2021-11-15]
 \ProvidesFile{pagecolor.drv}%
-  [2022-11-20 v1.1a Provides thepagecolor (HMM)]
+  [2022-11-27 v1.2a Provides thepagecolor (HMM)]
 \documentclass{ltxdoc}[2020/12/05]% v2.1b
 \usepackage{xcolor}[2021/10/31]% v2.13
 \usepackage{holtxdoc}[2019/12/09]% v0.30

Modified: trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.dtx	2022-11-27 20:50:23 UTC (rev 65119)
+++ trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.dtx	2022-11-27 20:50:48 UTC (rev 65120)
@@ -1,7 +1,8 @@
 % \iffalse meta-comment
 %
 % File: pagecolor.dtx
-% Version: 2022-11-20 v1.1a
+% Version: 2022-11-27 v1.2a
+% Info: Provides thepagecolor
 %
 % Copyright (C) 2011 - 2022 by
 %    H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
@@ -10,9 +11,9 @@
 % 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
+%    https://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
+%    https://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.
 %
@@ -26,7 +27,7 @@
 %    pagecolor.ins, pagecolor.drv,
 %    pagecolor-example.tex, pagecolor-example.pdf.
 %
-% 'pagecolor' is available on CTAN:
+% "pagecolor" is available on CTAN:
 % https://www.ctan.org/pkg/pagecolor
 %
 % Also a TDS.ZIP file is provided that contains all the files
@@ -48,7 +49,7 @@
 \input docstrip.tex
 \Msg{******************************************************************}
 \Msg{* Installation                                                   *}
-\Msg{* Package: pagecolor 2022-11-20 v1.1a Provides thepagecolor (HMM)*}
+\Msg{* Package: pagecolor 2022-11-27 v1.2a Provides thepagecolor (HMM)*}
 \Msg{******************************************************************}
 
 \keepsilent
@@ -60,16 +61,11 @@
 This is a generated file.
 
 Project: pagecolor
-Version: 2022-11-20 v1.1a
+Version: 2022-11-27 v1.2a
 
 Copyright (C) 2011 - 2022 by
     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 
-The usual disclaimer applies:
-If it does not work right that is 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
@@ -150,7 +146,7 @@
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[2021-11-15]
 \ProvidesFile{pagecolor.drv}%
-  [2022-11-20 v1.1a Provides thepagecolor (HMM)]
+  [2022-11-27 v1.2a Provides thepagecolor (HMM)]
 \documentclass{ltxdoc}[2020/12/05]% v2.1b
 \usepackage{xcolor}[2021/10/31]% v2.13
 \usepackage{holtxdoc}[2019/12/09]% v0.30
@@ -178,7 +174,6 @@
 \end{document}
 %</driver>
 %    \end{macrocode}
-%
 % \fi
 %
 % \GetFileInfo{pagecolor.drv}
@@ -200,14 +195,14 @@
 %
 % \DoNotIndex{\,,\@bsphack,\@esphack,\\}
 % \DoNotIndex{\documentclass,\usepackage,\begin,\end,\pagenumbering,\bigskip,\smallskip}
-% \DoNotIndex{\space,\newline,\noindent,\pagebreak,\section,\textbf,\textsf,\color,\gdef}
+% \DoNotIndex{\space,\newline,\noindent,\linebreak,\pagebreak,\section,\textbf,\textsf,\textit}
 % \DoNotIndex{\GenerateLogMacros,\holtxdoc,\Oberdiek,\hyperref,\kvoptions,\options,\OCG}
-% \DoNotIndex{\lipsum,\ifdefined,\IfPackageAtLeastTF,\IfPackageLoadedTF,\ifx,\listfiles}
-% \DoNotIndex{\M\"{u}nch,\Alternatives,\transparent,\newcommand,\verb}
-% \DoNotIndex{\pagecolor at info@noline,\pagecolor at warning,\pagecolor at warning@noline}
+% \DoNotIndex{\color,\gdef,\lipsum,\ifdefined,\IfPackageAtLeastTF,\IfPackageLoadedTF,\ifx}
+% \DoNotIndex{\M\"{u}nch,\Alternatives,\transparent,\newcommand,\verb,\listfiles}
+% \DoNotIndex{\pagecolor at info,\pagecolor at info@noline,\pagecolor at warning,\pagecolor at warning@noline}
 %
 % \title{The \xpackage{pagecolor} package}
-% \date{2022-11-20 v1.1a}
+% \date{2022-11-27 v1.2a}
 % \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}}
 %
 % \maketitle
@@ -224,7 +219,10 @@
 % broken, this package provides a replacement.\\
 % Similar to |\newgeometry| and |\restoregeometry| of the \xpackage{geometry}
 % package |\newpagecolor{<|\textit{some color}|>}| and |\restorepagecolor|
-% are provided.
+% are provided.\\
+% For use with the \xpackage{crop} package |\backgroundpagecolor{<|\textit{some color}|>}|
+% as well as |\newbackgroundpagecolor{<|\textit{some color}|>}| and \newline
+% |\restorebackgroundpagecolor| are provided.
 % \end{abstract}
 %
 % \bigskip
@@ -242,7 +240,7 @@
 % \section{Introduction}
 % \indent This \LaTeX{} package provides the command |\thepagecolor|,
 % which gives the current page (background) color,
-% \hbox{i.\,e. the} argument used with the most recent call of |\pagecolor{...}|. 
+% \hbox{i.\,e. the} argument used with the most recent call of |\pagecolor{...}|.
 % (\verb|\pagecolor| needs to be defined before by the \xpackage{xcolor} or
 % \xpackage{color} package.) The \xpackage{pagecolor} package should be loaded
 % before any package sets a page (background) color, but obviously after
@@ -255,11 +253,14 @@
 % |\nopagecolor| command). In that case |\thepagecolor| is |white| and
 % |\thepagecolornone| is |none|.
 % When |\nopagecolor| is unknown or in case of the \xpackage{crop} package
-% broken, this package provides a replacement depending on option |nopagecolor|. 
-% Similar to |\newgeometry| and |\restoregeometry| of the \xpackage{geometry}
-% package\linebreak
-% |\newpagecolor{<|\textit{some color}|>}| and |\restorepagecolor|
-% are provided.
+% broken, this package provides a replacement depending on option |nopagecolor|.
+% Commands to change the background/outer/physical page color when using
+% \xpackage{crop} are provided. Similar to |\newgeometry| and |\restoregeometry|
+% of the \xpackage{geometry} package |\newpagecolor{<|\textit{some color}|>}|
+% and |\restorepagecolor| are provided.\\
+% For use with the \xpackage{crop} package |\backgroundpagecolor{<|\textit{some color}|>}|
+% as well as |\newbackgroundpagecolor{<|\textit{some color}|>}| and
+% |\restorebackgroundpagecolor| are provided.
 %
 % \section{Usage}
 %
@@ -283,14 +284,19 @@
 %  just one page and do not want to (or cannot) manually determine where that page ends,\\
 % |\newpagecolor{<|\textit{some color}|>}\afterpage{\restorepagecolor}|\\
 % does the trick (and requires a |\usepackage{afterpage}| in the document's
-% preamble), or for short\\
-% |\newcommand{\onepagecolor}[1]{%|\\
+% preamble), or for short
+%
+% \newpage
+%
+% \noindent|\newcommand{\onepagecolor}[1]{%|\\
 % |  \newpagecolor{#1}\afterpage{\restorepagecolor}}|\\
-% in the preamble and\\
-% |\onepagecolor{<|\textit{some color}|>}| in the document.
+% in the preamble and |\onepagecolor{<|\textit{some color}|>}| in the document.\\
+% When the \xpackage{crop} package is used, |\backgroundpagecolor{<|\textit{some color}|>}|
+% can be used to change the background/outer/physical page color and\\
+% |\newbackgroundpagecolor{<|\textit{some color}|>}%|\\
+% |\afterpage{\restorebackgroundpagecolor}%|\\
+% for changing just one background/outer/physical page color.
 %
-% \pagebreak
-%
 % \subsection{Options}
 % \DescribeMacro{options}
 % \indent The \xpackage{pagecolor} package takes the following options:
@@ -368,8 +374,10 @@
  % The xcolor package would not be needed for just using the base colors.
  % The color package would be sufficient for that.
 
+ % \usepackage[cam,center,a3]{crop}[2017/11/19]% 1.10 
+
 \usepackage[pagecolor={LightGoldenrod1},%
-  nopagecolor={none}]{pagecolor}[2022-11-20]% v1.1a
+  nopagecolor={none}]{pagecolor}[2022-11-27]% v1.2a
 
 \usepackage{afterpage}[2014/10/28]% v1.08
  % The afterpage package is generally not needed,
@@ -386,7 +394,7 @@
 \section*{Example for pagecolor}
 
 This example demonstrates the use of package\newline
-\textsf{pagecolor}, v1.1a as of 2022-11-20 (HMM).\newline
+\textsf{pagecolor}, v1.2a as of 2022-11-27 (HMM).\newline
 The used options were\newline
 \verb|pagecolor={LightGoldenrod1}|\newline
 (\verb|pagecolor={none}| would be the default), and\newline
@@ -459,6 +467,20 @@
 The page color was changed back at the end of the page -- 
 in mid-sentence!
 
+\pagebreak
+
+\backgroundpagecolor{pink}
+
+When activating the loading of the crop package in the preamble of this
+document, \verb|\backgroundpagecolor{<|\textit{some color}\verb|>}|
+changes the color of the background/outer/physical page.
+
+
+Analogous to \verb|\newpagecolor{...}| and \verb|\restorepagecolor|,
+for the background/outer/physical page
+\verb|\newbackgroundpagecolor{<|\textit{some color}\verb|>}| and\linebreak
+\verb|\restorebackgroundpagecolor| are provided (but not demonstrated
+here).
 \end{document}
 %</example>
 %    \end{macrocode}
@@ -465,8 +487,6 @@
 %
 % \StopEventually{}
 %
-% \newpage
-%
 % \section{The implementation}
 %
 % We start off by checking that we are loading into \LaTeXe{} and
@@ -478,7 +498,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[2021-11-15]
-\ProvidesPackage{pagecolor}[2022-11-20 1.1a
+\ProvidesPackage{pagecolor}[2022-11-27 1.2a
             Provides thepagecolor (HMM)]
 %    \end{macrocode}
 %
@@ -486,7 +506,8 @@
 %
 %    \begin{macrocode}
 %% Provides the \thepagecolor, \thepagecolornone, \newpagecolor{...},
-%% and \restorepagecolor commands and a replacement for the
+%% \restorepagecolor, \backgroundpagecolor, \newbackgroundpagecolor{...},
+%% and \restorebackgroundpagecolor commands and a replacement for the
 %% \nopagecolor command, if this is not available.
 %    \end{macrocode}
 %
@@ -549,9 +570,6 @@
   \def\pagecolortmpb{none}
   \edef\pagecolortmpa{\pagecolor at nopagecolor}
   \ifx\pagecolortmpa\pagecolortmpb
-%    \end{macrocode}
-% \pagebreak
-%    \begin{macrocode}
     \pagecolor at warning@noline{%
       Option nopagecolor=none requested but \string\nopagecolor\ %
       unknown: \\%
@@ -592,8 +610,7 @@
 %    \end{macrocode}
 %
 % before we redefine it to include a definition of |\thepagecolor|
-% and\linebreak
-% |\thepagecolornone|:
+% and \linebreak |\thepagecolornone|:
 %
 %    \begin{macrocode}
 \renewcommand{\pagecolor}[1]{\@bsphack%
@@ -638,46 +655,26 @@
 \gdef\pagecolor at cl{0}
 \IfPackageLoadedTF{crop}{% crop loaded
   \gdef\pagecolor at cl{1}
-  \IfPackageAtLeastTF{crop}{2017/11/20}{
-     % later than 2017/11/19 v1.10 might be OK
-     \pagecolor at warning@noline{%
-       \string\nopagecolor\ did not work with package \\%
-       crop 2017/11/19 v1.10. A newer version is used, %
-       which the pagecolor package does not know how to handle. %
-       Please contact the maintainer of the pagecolor package!%
-       }%
-     % Let us just hope everything got fixed:
-     \renewcommand{\nopagecolor}{%
-       \xdef\thepagecolor{white}%
-       \xdef\thepagecolornone{none}%
-       \orignopagecolor%
-       % That will not have any effect except when things got fixed!
-       }%
-    }{% else: older package version
-      \pagecolor at warning@noline{%
-        \string\nopagecolor\ does not work with %
-        the used crop package. Using \\%
-        \pagecolor at nopagecolor\ \\%
-        as nopagecolor now.%
-        }
-      \def\pagecolortmpb{none}
-      \edef\pagecolortmpa{\pagecolor at nopagecolor}
-      \ifx\pagecolortmpa\pagecolortmpb\relax
-        \pagecolor at warning@noline{%
-          Option nopagecolor=none requested %
-          but this does not work with the crop package. %
-          By option nopagecolor the "color" to be used with %
-          \string\nopagecolor\ %
-          is set. The current value is "none" (maybe by default), %
-          but the crop package broke \string\nopagecolor . %
-          Therefore the color cannot be "none". %
-          Please change the option accordingly! %
-          As first aid nopagecolor is now set to white.%
-         }
-        \setkeys{pagecolor}{nopagecolor=white}
-      \fi
-      \renewcommand{\nopagecolor}{\pagecolor{\pagecolor at nopagecolor}}
+  \pagecolor at info{\string\nopagecolor\space did not work with the crop package %
+    2017/11/19 v1.10. Using \\%
+    \pagecolor at nopagecolor\ \\%
+    as nopagecolor now.%
+    }
+  \def\pagecolortmpb{none}
+  \edef\pagecolortmpa{\pagecolor at nopagecolor}
+  \ifx\pagecolortmpa\pagecolortmpb\relax
+    \pagecolor at warning@noline{%
+      Option nopagecolor=none requested but this does not work with the %
+      crop package. By option nopagecolor the "color" to be used with %
+      \string\nopagecolor\ is set. The current value is "none" (maybe by %
+      default), but the crop package broke \string\nopagecolor . %
+      Therefore the color cannot be "none". %
+      Please change the option accordingly! %
+      As first aid nopagecolor is now set to white.%
      }
+    \setkeys{pagecolor}{nopagecolor=white}
+  \fi
+  \renewcommand{\nopagecolor}{\pagecolor{\pagecolor at nopagecolor}}
  }{% crop not loaded
    \ifdefined\nopagecolor\relax
      \gdef\pagecolortmpa{none}
@@ -747,14 +744,86 @@
 
 %    \end{macrocode}
 % is just a precaution for |\restorecolor| being used when no |\newpagecolor{...}|
-% was used before it.\\
+% was used before it.
 %
 % When you want to change the color for just one page and do not want to
 % (or cannot) manually determine where the page ends,\\
 % |\newpagecolor{<|\textit{some color}|>}\afterpage{\restorepagecolor}|\\
 % does the trick (and requires an additional |\usepackage{afterpage}| in the
-% document's preamble).\\
+% document's preamble).
 %
+%    \begin{macro}{\backgroundpagecolor}
+% When the \xpackage{crop} package has been loaded, the background/outer/physical page color
+% is determined by the last |\pagecolor{...}| in the preamble after \newline
+% |\usepackage[...]{crop}| and cannot be changed in the document. When the |\pagecolor{...}|
+% is given before |\usepackage[...]{crop}|, a |\nopagecolor| works at the
+% background/outer/physical page and not at the inner/foreground/logic page.
+% |\nopagecolor| is fixed above. To change the background/outer/physical page color
+% during the document, |\backgroundpagecolor{<|\textit{some color}|>}| is provided:
+%
+%    \begin{macrocode}
+\newcommand{\backgroundpagecolor}[1]{%
+  \IfPackageLoadedTF{crop}{%
+%    \end{macrocode}
+% Remember current inner/foreground/logic page color:
+%    \begin{macrocode}
+    \xdef\pagecolortmpd{\thepagecolor}%
+%    \end{macrocode}
+% Set inner/foreground page color to color whished for background/\allowbreak outer/\allowbreak
+% physical page color:
+%    \begin{macrocode}
+    \pagecolor{#1}%
+%    \end{macrocode}
+% Get that color, for example, |\pagecolor{blue}| might result in |\CROP at pagecolor|
+% to be |0 0 1 rg 0 0 1 RG|:
+%    \begin{macrocode}
+    \xdef\pagecolortmpe{\CROP at pagecolor}%
+%    \end{macrocode}
+% Set the inner/foreground/logic page color back to the color before changing it:
+%    \begin{macrocode}
+    \pagecolor{\pagecolortmpd}%
+%    \end{macrocode}
+% Set the background/outer/physical page color:
+%    \begin{macrocode}
+    \xdef\CROP at stockcolor{\pagecolortmpe}%
+    }{\pagecolor at info{\string\backgroundpagecolor\ does not do %
+           anything when the crop package has not been loaded.}%
+%    \end{macrocode}
+% - except giving this information.
+%    \begin{macrocode}
+    }%
+  }
+
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\newbackgroundpagecolor}
+% Analogous to |\newpagecolor| and |\restorepagecolor|,
+% for the background/\allowbreak outer/\allowbreak physical page we define:
+%
+%    \begin{macrocode}
+\newcommand{\newbackgroundpagecolor}[1]{%
+  \IfPackageLoadedTF{crop}{%
+    \xdef\pagecolortmpf{\CROP at stockcolor}%
+    \backgroundpagecolor{#1}%
+    }{\pagecolor at info{\string\newbackgroundpagecolor\ does not do %
+              anything when the crop package has not been loaded.}%
+     }%
+  }
+
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\newbackgroundpagecolor}
+%    \begin{macrocode}
+\newcommand{\restorebackgroundpagecolor}{%
+  \IfPackageLoadedTF{crop}{\xdef\CROP at stockcolor{\pagecolortmpf}}{%
+    \pagecolor at info{\string\newbackgroundpagecolor\ does not do %
+             anything when the crop package has not been loaded.}}%
+  }
+
+%    \end{macrocode}
+%    \end{macro}
+%
 % 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 at the end of |\begin{document}|:
@@ -766,48 +835,26 @@
     % crop not loaded before pagecolor, but maybe afterwards:
     \IfPackageLoadedTF{crop}{% crop indeed loaded afterwards.
       \gdef\pagecolor at cl{1}%
-%    \end{macrocode}
-% \pagebreak
-%    \begin{macrocode}
-      \IfPackageAtLeastTF{crop}{2017/11/20}{%
-        % later than 2017/11/19 v1.10 might be OK
-        \pagecolor at warning{%
-          \string\nopagecolor\ did not work with package \\%
-          crop 2017/11/19 v1.10. A newer version is used, %
-          which the pagecolor package does not know how to handle. %
-          Please contact the maintainer of the pagecolor package!%
-          }%
-        % Let us just hope everything got fixed:
-        \renewcommand{\nopagecolor}{%
-          \xdef\thepagecolor{white}%
-          \xdef\thepagecolornone{none}%
-          \orignopagecolor%
-          % That will not have any effect except when things got fixed!
-          }%
-        }{% else: older package version
-          \pagecolor at warning{pagecolor}{%
-            \string\nopagecolor\space does not work with %
-            the used crop package. Using \\%
-            \pagecolor at nopagecolor\ \\%
-            as nopagecolor now.%
-            }%
-          \def\pagecolortmpb{none}%
-          \edef\pagecolortmpa{\pagecolor at nopagecolor}%
-          \ifx\pagecolortmpa\pagecolortmpb%
-            \pagecolor at warning{%
-              Option nopagecolor=none requested %
-              but this does not work with the crop package. %
-              By option nopagecolor the "color" to be used with %
-              \string\nopagecolor\ is set. The current value is "none" %
-              (maybe by default), but the crop package broke %
-              \string\nopagecolor . Therefore the color cannot be "none". %
-              Please change the option accordingly! \\%
-              As first aid nopagecolor is now set to white.%
-             }%
-            \setkeys{pagecolor}{nopagecolor=white}%
-          \fi%
-          \renewcommand{\nopagecolor}{\pagecolor{\pagecolor at nopagecolor}}%
+      \pagecolor at info{\string\nopagecolor\space did not work with the crop package %
+        2017/11/19 v1.10. Using \\%
+        \pagecolor at nopagecolor\ \\%
+        as nopagecolor now.%
+        }%
+      \def\pagecolortmpb{none}%
+      \edef\pagecolortmpa{\pagecolor at nopagecolor}%
+      \ifx\pagecolortmpa\pagecolortmpb\relax%
+        \pagecolor at warning@noline{%
+          Option nopagecolor=none requested but this does not work with %
+          the crop package. By option nopagecolor the "color" to be used %
+          with \string\nopagecolor\ is set. The current value is "none" %
+          (maybe by default), but the crop package broke %
+          \string\nopagecolor . Therefore the color cannot be "none". %
+          Please change the option accordingly! %
+          As first aid nopagecolor is now set to white.%
          }%
+        \setkeys{pagecolor}{nopagecolor=white}%
+      \fi%
+      \renewcommand{\nopagecolor}{\pagecolor{\pagecolor at nopagecolor}}%
      }{% crop neither loaded afterwards.
       }%
   \fi%
@@ -819,8 +866,6 @@
 %</package>
 %    \end{macrocode}
 %
-% \newpage
-%
 % \section{Installation}
 % \subsection{Downloads}
 % Everything is available at \url{https://www.ctan.org},
@@ -867,7 +912,7 @@
 % The |pagecolor-example.tex| requires the same file as all
 % documents using the \xpackage{pagecolor} package, i.\,e.
 % \begin{description}
-% \item[-] package \xpackage{pagecolor}, 2022-11-20, v1.1a,
+% \item[-] package \xpackage{pagecolor}, 2022-11-27, v1.2a,
 %   \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
@@ -893,6 +938,8 @@
 %           This package is only needed for some blind text.
 % \end{description}
 %
+% \newpage
+%
 % \DescribeMacro{Alternatives}
 % \DescribeMacro{transparent}
 % \DescribeMacro{OCG}
@@ -1042,9 +1089,9 @@
 %
 % \subsection{Refresh file name databases}
 %
-% If your \TeX~distribution (\TeX{} Live, \mikTeX, \teTeX, \dots) relies on 
-% file name databases, you must refresh these. For example, \teTeX{} users run
-% \verb|texhash| or \verb|mktexlsr|.
+% If your \TeX~distribution (\TeX\,Live, \mikTeX, \dots) relies on
+% file name databases, you must refresh these. For example, \TeX\,Live\ users
+% run \verb|texhash| or \verb|mktexlsr|.
 %
 % \subsection{Some details for the interested}
 %
@@ -1090,6 +1137,8 @@
 % The example file, \textsf{pagecolor-example.tex}, can be compiled via\\
 % |(pdf)latex pagecolor-example.tex|.
 %
+% \newpage
+%
 % \section{Acknowledgements}
 %
 % I would like to thank \textsc{Heiko Oberdiek} for providing a lot of
@@ -1107,8 +1156,6 @@
 % and to \textsc{Reuben Thomas} for suggestions for improvements
 % of this documentation.
 %
-% \pagebreak
-%
 % \phantomsection
 % \begin{History}\label{History}
 %   \begin{Version}{2011/07/16 v1.0a}
@@ -1147,8 +1194,6 @@
 %             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!
-%     \item This version has been archived at\\
-%             \url{https://web.archive.org/web/20161114093809/https://mirror.ctan.org/install/macros/latex/contrib/pagecolor.tds.zip}
 %   \end{Version}
 %   \begin{Version}{2017/05/29 v1.0i}
 %     \item Documentation update following suggestions for improvements by
@@ -1157,13 +1202,18 @@
 %             \url{https://web.archive.org/web/20220120221237/https://mirror.ctan.org/install/macros/latex/contrib/pagecolor.tds.zip}
 %   \end{Version}
 %   \begin{Version}{2022-11-20 v1.1a}
-%     \item Conversion to UTF-8.
-%     \item Update to \LaTeX{} format 2021-11-15.
+%     \item Replaced all |colour| (with |u|) by |color| (without |u|).
+%     \item Converted to UTF-8.
+%     \item Updated to \LaTeX{} format 2021-11-15.
 %     \item Corrected an error in the example.
-%     \item \XeLaTeX{} and others now do know \verb|\nopagecolor|.
-%     \item Package \xpackage{crop} has been updated, but \verb|\nopagecolor|
+%     \item \XeLaTeX{} and others now do know |\nopagecolor|.
+%     \item Package \xpackage{crop} has been updated, but |\nopagecolor|
 %             still applies to the physical background sheet instead of the logical foreground area.
 %     \item Now using the \xpackage{hardwrap} package.
+%   \end{Version}
+%   \begin{Version}{2022-11-27 v1.2a}
+%     \item Now also handling the background/outer/physical page color,
+%             when the \xpackage{crop} package is used.
 %     \item Documentation updates.
 %   \end{Version}
 % \end{History}
@@ -1173,6 +1223,8 @@
 % 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.)
 %
+% \newpage
+%
 % \PrintIndex
 %
 % \Finale

Modified: trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.ins	2022-11-27 20:50:23 UTC (rev 65119)
+++ trunk/Master/texmf-dist/source/latex/pagecolor/pagecolor.ins	2022-11-27 20:50:48 UTC (rev 65120)
@@ -9,16 +9,11 @@
 %% This is a generated file.
 %% 
 %% Project: pagecolor
-%% Version: 2022-11-20 v1.1a
+%% Version: 2022-11-27 v1.2a
 %% 
 %% Copyright (C) 2011 - 2022 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% 
-%% The usual disclaimer applies:
-%% If it does not work right that is 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
@@ -47,7 +42,7 @@
 \input docstrip.tex
 \Msg{******************************************************************}
 \Msg{* Installation                                                   *}
-\Msg{* Package: pagecolor 2022-11-20 v1.1a Provides thepagecolor (HMM)*}
+\Msg{* Package: pagecolor 2022-11-27 v1.2a Provides thepagecolor (HMM)*}
 \Msg{******************************************************************}
 
 \keepsilent
@@ -59,16 +54,11 @@
 This is a generated file.
 
 Project: pagecolor
-Version: 2022-11-20 v1.1a
+Version: 2022-11-27 v1.2a
 
 Copyright (C) 2011 - 2022 by
     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 
-The usual disclaimer applies:
-If it does not work right that is 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

Modified: trunk/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty	2022-11-27 20:50:23 UTC (rev 65119)
+++ trunk/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty	2022-11-27 20:50:48 UTC (rev 65120)
@@ -9,16 +9,11 @@
 %% This is a generated file.
 %% 
 %% Project: pagecolor
-%% Version: 2022-11-20 v1.1a
+%% Version: 2022-11-27 v1.2a
 %% 
 %% Copyright (C) 2011 - 2022 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% 
-%% The usual disclaimer applies:
-%% If it does not work right that is 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
@@ -45,10 +40,11 @@
 %%  Hans-Klaus Muench    + 2014-08-24
 %% 
 \NeedsTeXFormat{LaTeX2e}[2021-11-15]
-\ProvidesPackage{pagecolor}[2022-11-20 1.1a
+\ProvidesPackage{pagecolor}[2022-11-27 1.2a
             Provides thepagecolor (HMM)]
 %% Provides the \thepagecolor, \thepagecolornone, \newpagecolor{...},
-%% and \restorepagecolor commands and a replacement for the
+%% \restorepagecolor, \backgroundpagecolor, \newbackgroundpagecolor{...},
+%% and \restorebackgroundpagecolor commands and a replacement for the
 %% \nopagecolor command, if this is not available.
 \RequirePackage{hardwrap}[2011/02/12]% v0.2
 \GenerateLogMacros{package}{pagecolor}
@@ -147,46 +143,26 @@
 \gdef\pagecolor at cl{0}
 \IfPackageLoadedTF{crop}{% crop loaded
   \gdef\pagecolor at cl{1}
-  \IfPackageAtLeastTF{crop}{2017/11/20}{
-     % later than 2017/11/19 v1.10 might be OK
-     \pagecolor at warning@noline{%
-       \string\nopagecolor\ did not work with package \\%
-       crop 2017/11/19 v1.10. A newer version is used, %
-       which the pagecolor package does not know how to handle. %
-       Please contact the maintainer of the pagecolor package!%
-       }%
-     % Let us just hope everything got fixed:
-     \renewcommand{\nopagecolor}{%
-       \xdef\thepagecolor{white}%
-       \xdef\thepagecolornone{none}%
-       \orignopagecolor%
-       % That will not have any effect except when things got fixed!
-       }%
-    }{% else: older package version
-      \pagecolor at warning@noline{%
-        \string\nopagecolor\ does not work with %
-        the used crop package. Using \\%
-        \pagecolor at nopagecolor\ \\%
-        as nopagecolor now.%
-        }
-      \def\pagecolortmpb{none}
-      \edef\pagecolortmpa{\pagecolor at nopagecolor}
-      \ifx\pagecolortmpa\pagecolortmpb\relax
-        \pagecolor at warning@noline{%
-          Option nopagecolor=none requested %
-          but this does not work with the crop package. %
-          By option nopagecolor the "color" to be used with %
-          \string\nopagecolor\ %
-          is set. The current value is "none" (maybe by default), %
-          but the crop package broke \string\nopagecolor . %
-          Therefore the color cannot be "none". %
-          Please change the option accordingly! %
-          As first aid nopagecolor is now set to white.%
-         }
-        \setkeys{pagecolor}{nopagecolor=white}
-      \fi
-      \renewcommand{\nopagecolor}{\pagecolor{\pagecolor at nopagecolor}}
+  \pagecolor at info{\string\nopagecolor\space did not work with the crop package %
+    2017/11/19 v1.10. Using \\%
+    \pagecolor at nopagecolor\ \\%
+    as nopagecolor now.%
+    }
+  \def\pagecolortmpb{none}
+  \edef\pagecolortmpa{\pagecolor at nopagecolor}
+  \ifx\pagecolortmpa\pagecolortmpb\relax
+    \pagecolor at warning@noline{%
+      Option nopagecolor=none requested but this does not work with the %
+      crop package. By option nopagecolor the "color" to be used with %
+      \string\nopagecolor\ is set. The current value is "none" (maybe by %
+      default), but the crop package broke \string\nopagecolor . %
+      Therefore the color cannot be "none". %
+      Please change the option accordingly! %
+      As first aid nopagecolor is now set to white.%
      }
+    \setkeys{pagecolor}{nopagecolor=white}
+  \fi
+  \renewcommand{\nopagecolor}{\pagecolor{\pagecolor at nopagecolor}}
  }{% crop not loaded
    \ifdefined\nopagecolor\relax
      \gdef\pagecolortmpa{none}
@@ -211,6 +187,33 @@
 
 \gdef\pagecolortmpc{\thepagecolor}
 
+\newcommand{\backgroundpagecolor}[1]{%
+  \IfPackageLoadedTF{crop}{%
+    \xdef\pagecolortmpd{\thepagecolor}%
+    \pagecolor{#1}%
+    \xdef\pagecolortmpe{\CROP at pagecolor}%
+    \pagecolor{\pagecolortmpd}%
+    \xdef\CROP at stockcolor{\pagecolortmpe}%
+    }{\pagecolor at info{\string\backgroundpagecolor\ does not do %
+           anything when the crop package has not been loaded.}%
+    }%
+  }
+
+\newcommand{\newbackgroundpagecolor}[1]{%
+  \IfPackageLoadedTF{crop}{%
+    \xdef\pagecolortmpf{\CROP at stockcolor}%
+    \backgroundpagecolor{#1}%
+    }{\pagecolor at info{\string\newbackgroundpagecolor\ does not do %
+              anything when the crop package has not been loaded.}%
+     }%
+  }
+
+\newcommand{\restorebackgroundpagecolor}{%
+  \IfPackageLoadedTF{crop}{\xdef\CROP at stockcolor{\pagecolortmpf}}{%
+    \pagecolor at info{\string\newbackgroundpagecolor\ does not do %
+             anything when the crop package has not been loaded.}}%
+  }
+
 \AddToHook{begindocument/end}{%
   \def\pagecolortmpb{0}%
   \ifx\pagecolor at cl\pagecolortmpb\relax%
@@ -217,45 +220,26 @@
     % crop not loaded before pagecolor, but maybe afterwards:
     \IfPackageLoadedTF{crop}{% crop indeed loaded afterwards.
       \gdef\pagecolor at cl{1}%
-      \IfPackageAtLeastTF{crop}{2017/11/20}{%
-        % later than 2017/11/19 v1.10 might be OK
-        \pagecolor at warning{%
-          \string\nopagecolor\ did not work with package \\%
-          crop 2017/11/19 v1.10. A newer version is used, %
-          which the pagecolor package does not know how to handle. %
-          Please contact the maintainer of the pagecolor package!%
-          }%
-        % Let us just hope everything got fixed:
-        \renewcommand{\nopagecolor}{%
-          \xdef\thepagecolor{white}%
-          \xdef\thepagecolornone{none}%
-          \orignopagecolor%
-          % That will not have any effect except when things got fixed!
-          }%
-        }{% else: older package version
-          \pagecolor at warning{pagecolor}{%
-            \string\nopagecolor\space does not work with %
-            the used crop package. Using \\%
-            \pagecolor at nopagecolor\ \\%
-            as nopagecolor now.%
-            }%
-          \def\pagecolortmpb{none}%
-          \edef\pagecolortmpa{\pagecolor at nopagecolor}%
-          \ifx\pagecolortmpa\pagecolortmpb%
-            \pagecolor at warning{%
-              Option nopagecolor=none requested %
-              but this does not work with the crop package. %
-              By option nopagecolor the "color" to be used with %
-              \string\nopagecolor\ is set. The current value is "none" %
-              (maybe by default), but the crop package broke %
-              \string\nopagecolor . Therefore the color cannot be "none". %
-              Please change the option accordingly! \\%
-              As first aid nopagecolor is now set to white.%
-             }%
-            \setkeys{pagecolor}{nopagecolor=white}%
-          \fi%
-          \renewcommand{\nopagecolor}{\pagecolor{\pagecolor at nopagecolor}}%
+      \pagecolor at info{\string\nopagecolor\space did not work with the crop package %
+        2017/11/19 v1.10. Using \\%
+        \pagecolor at nopagecolor\ \\%
+        as nopagecolor now.%
+        }%
+      \def\pagecolortmpb{none}%
+      \edef\pagecolortmpa{\pagecolor at nopagecolor}%
+      \ifx\pagecolortmpa\pagecolortmpb\relax%
+        \pagecolor at warning@noline{%
+          Option nopagecolor=none requested but this does not work with %
+          the crop package. By option nopagecolor the "color" to be used %
+          with \string\nopagecolor\ is set. The current value is "none" %
+          (maybe by default), but the crop package broke %
+          \string\nopagecolor . Therefore the color cannot be "none". %
+          Please change the option accordingly! %
+          As first aid nopagecolor is now set to white.%
          }%
+        \setkeys{pagecolor}{nopagecolor=white}%
+      \fi%
+      \renewcommand{\nopagecolor}{\pagecolor{\pagecolor at nopagecolor}}%
      }{% crop neither loaded afterwards.
       }%
   \fi%



More information about the tex-live-commits mailing list.