diff options
author | Karl Berry <karl@freefriends.org> | 2011-08-12 15:38:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-08-12 15:38:41 +0000 |
commit | 833afaf242cf7d87069d192c9859848a7a16620d (patch) | |
tree | 6ebe270a1066e42cde34681a2a53d09bea6c79e2 /Master/texmf-dist/tex/latex/pagecolor | |
parent | 2cea258fda0365adce50be5a29fcd9d87fb6868f (diff) |
missed pagecolor commit
git-svn-id: svn://tug.org/texlive/trunk@23513 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pagecolor')
-rw-r--r-- | Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty b/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty new file mode 100644 index 00000000000..f50af4e2c44 --- /dev/null +++ b/Master/texmf-dist/tex/latex/pagecolor/pagecolor.sty @@ -0,0 +1,143 @@ +%% +%% This is file `pagecolor.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pagecolor.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Project: pagecolor +%% Version: 2011/08/06 v1.0b +%% +%% Copyright (C) 2011 by +%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de> +%% +%% The usual disclaimer applys: +%% 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 +%% and the derived files +%% pagecolor.sty, pagecolor.pdf, pagecolor.ins, pagecolor.drv, +%% pagecolor-example.tex. +%% +\NeedsTeXFormat{LaTeX2e}[2009/09/24] +\ProvidesPackage{pagecolor}[2011/08/06 v1.0b + Provides thepagecolor (HMM)]% +%% Provides the \thepagecolor and \thepagecolornone 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 + \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% + } + }% fi + \RequirePackage{xcolor}[2007/01/21]% v2.11 + }% 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 +%% (if they are not already the most recent version). + +\SetupKeyvalOptions{family=pagecolor,prefix=pagecolor@} +\DeclareStringOption[none]{pagecolor}% \pagecolor@pagecolor +\ProcessKeyvalOptions* + +\let\origpagecolour\pagecolor + +\renewcommand{\pagecolor}[1]{% + \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} + }{% + \nopagecolor + } + \else + \xdef\thepagecolor{#1} + \xdef\thepagecolornone{#1} + \origpagecolour{\thepagecolor} + \fi + } + +\@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% + } + }% + }% + }{% \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% + } + \gdef\pagecolor@pagecolor{white}% + }{% ok + }% +\fi + +\pagecolor{\pagecolor@pagecolor} + +\endinput +%% +%% End of file `pagecolor.sty'. |