texlive[53169] Master: hycolor split from oberdiek (18dec19)

commits+karl at tug.org commits+karl at tug.org
Wed Dec 18 00:25:18 CET 2019


Revision: 53169
          http://tug.org/svn/texlive?view=revision&revision=53169
Author:   karl
Date:     2019-12-18 00:25:18 +0100 (Wed, 18 Dec 2019)
Log Message:
-----------
hycolor split from oberdiek (18dec19)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latex.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/hycolor/
    trunk/Master/texmf-dist/doc/latex/hycolor/README.md
    trunk/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf
    trunk/Master/texmf-dist/source/latex/hycolor/
    trunk/Master/texmf-dist/source/latex/hycolor/hycolor.dtx
    trunk/Master/texmf-dist/tex/latex/hycolor/
    trunk/Master/texmf-dist/tex/latex/hycolor/hycolor.sty
    trunk/Master/texmf-dist/tex/latex/hycolor/xcolor-patch.sty
    trunk/Master/tlpkg/tlpsrc/hycolor.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/hycolor/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hycolor/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/hycolor/README.md	2019-12-17 23:25:18 UTC (rev 53169)
@@ -0,0 +1,10 @@
+# hycolor
+
+hycolor package for LaTeX
+
+
+Package hycolor implements the color option stuff that
+is used by packages hyperref and bookmark.
+It is not intended as package for the user.
+
+


Property changes on: trunk/Master/texmf-dist/doc/latex/hycolor/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf	2019-12-17 23:24:25 UTC (rev 53168)
+++ trunk/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf	2019-12-17 23:25:18 UTC (rev 53169)

Property changes on: trunk/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/hycolor/hycolor.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/hycolor/hycolor.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/hycolor/hycolor.dtx	2019-12-17 23:25:18 UTC (rev 53169)
@@ -0,0 +1,1616 @@
+% \iffalse meta-comment
+%
+% File: hycolor.dtx
+% Version: 2019/12/15 v1.9
+% Info: Color options for hyperref/bookmark
+%
+% Copyright (C)
+%    2007-2011 Heiko Oberdiek
+%    2016-2019 Oberdiek Package Support Group
+%    https://github.com/ho-tex/hycolor/issues
+%
+% 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
+%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+% and the latest version of this license is in
+%    https://www.latex-project.org/lppl.txt
+% and version 1.3 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 Maintainers of this work are
+% Heiko Oberdiek and the Oberdiek Package Support Group
+% https://github.com/ho-tex/hycolor/issues
+%
+% This work consists of the main source file hycolor.dtx
+% and the derived files
+%    hycolor.sty, hycolor.pdf, hycolor.ins, hycolor.drv,
+%    xcolor-patch.sty
+%
+% Distribution:
+%    CTAN:macros/latex/contrib/hycolor/hycolor.dtx
+%    CTAN:macros/latex/contrib/hycolor/hycolor.pdf
+%
+% Unpacking:
+%    (a) If hycolor.ins is present:
+%           tex hycolor.ins
+%    (b) Without hycolor.ins:
+%           tex hycolor.dtx
+%    (c) If you insist on using LaTeX
+%           latex \let\install=y\input{hycolor.dtx}
+%        (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+%    (a) If hycolor.drv is present:
+%           latex hycolor.drv
+%    (b) Without hycolor.drv:
+%           latex hycolor.dtx; ...
+%    The class ltxdoc loads the configuration file ltxdoc.cfg
+%    if available. Here you can specify further options, e.g.
+%    use A4 as paper format:
+%       \PassOptionsToClass{a4paper}{article}
+%
+%    Programm calls to get the documentation (example):
+%       pdflatex hycolor.dtx
+%       makeindex -s gind.ist hycolor.idx
+%       pdflatex hycolor.dtx
+%       makeindex -s gind.ist hycolor.idx
+%       pdflatex hycolor.dtx
+%
+% Installation:
+%    TDS:tex/latex/hycolor/hycolor.sty
+%    TDS:tex/latex/hycolor/xcolor-patch.sty
+%    TDS:doc/latex/hycolor/hycolor.pdf
+%    TDS:source/latex/hycolor/hycolor.dtx
+%
+%<*ignore>
+\begingroup
+  \catcode123=1 %
+  \catcode125=2 %
+  \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+         \ifx\csname processbatchFile\endcsname\relax\else1\fi
+         \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: hycolor 2019/12/15 v1.9 Color options for hyperref/bookmark (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Project: hycolor
+Version: 2019/12/15 v1.9
+
+Copyright (C)
+   2007-2011 Heiko Oberdiek
+   2016-2019 Oberdiek Package Support Group
+
+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
+   https://www.latex-project.org/lppl/lppl-1-3c.txt
+and the latest version of this license is in
+   https://www.latex-project.org/lppl.txt
+and version 1.3 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 Maintainers of this work are
+Heiko Oberdiek and the Oberdiek Package Support Group
+https://github.com/ho-tex/hycolor/issues
+
+
+This work consists of the main source file hycolor.dtx
+and the derived files
+   hycolor.sty, hycolor.pdf, hycolor.ins, hycolor.drv,
+   xcolor-patch.sty
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+  \file{hycolor.ins}{\from{hycolor.dtx}{install}}%
+  \file{hycolor.drv}{\from{hycolor.dtx}{driver}}%
+  \usedir{tex/latex/hycolor}%
+  \file{hycolor.sty}{\from{hycolor.dtx}{package}}%
+  \file{xcolor-patch.sty}{\from{hycolor.dtx}{xcolor}}%
+}
+
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{*     hycolor.sty, xcolor-patch.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file `hycolor.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{hycolor.drv}%
+  [2019/12/15 v1.9 Color options for hyperref/bookmark (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2011/11/22]
+\usepackage[ruled]{algorithm2e}
+
+\makeatletter
+\newcommand*{\makedefaultH}[1]{%
+  \expandafter\edef\csname #1\endcsname{%
+      \noexpand\@protected at testopt
+      \expandafter\noexpand\csname#1\endcsname
+      \expandafter\noexpand\csname
+          \expandafter\string\csname#1\endcsname\endcsname
+      {H}%
+  }%
+}
+\makeatother
+\makedefaultH{algorithm}
+\makedefaultH{procedure}
+\makedefaultH{function}
+
+\SetKwInput{KwParam}{Param}
+\newcommand*{\Param}[2]{%
+  \KwParam{\ArgSty{#1} (#2)}%
+}
+\newcommand*{\Dat}[1]{%
+  \texttt{\upshape#1}%
+}
+\newcommand*{\Var}[1]{%
+  \ArgSty{#1}%
+}
+\newcommand*{\Gets}{%
+  \ensuremath{\leftarrow}%
+  \ %
+}
+
+\makeatletter
+\newcommand*{\bs}{\texttt{\@backslashchar}}
+\makeatother
+\begin{document}
+  \DocInput{hycolor.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \GetFileInfo{hycolor.drv}
+%
+% \title{The \xpackage{hycolor} package}
+% \date{2019/12/15 v1.9}
+% \author{Heiko Oberdiek\thanks
+% {Please report any issues at \url{https://github.com/ho-tex/hycolor/issues}}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% Package \xpackage{hycolor} implements the color option stuff that
+% is used by packages \xpackage{hyperref} and \xpackage{bookmark}.
+% It is not intended as package for the user.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% The package \xpackage{hycolor} implements color options
+% for packages \xpackage{hyperref} and \xpackage{bookmark}.
+%
+% Package \xpackage{xcolor} provides macros for extracting
+% color values and converting color data to other color models.
+% If this package is loaded, the full range of color specifications
+% of packages \xpackage{color} and \xpackage{xcolor} are supported
+% including the optional argument for the color model.
+% \begin{quote}
+%   |\hypersetup{linkbordercolor=red}%| needs \xpackage{xcolor}\\
+%   |\hypersetup{linkbordercolor=[named]{red}}%| needs \xpackage{xcolor}\\
+%   |\hypersetup{linkbordercolor=[rgb]{1,0,0}}|\\
+% \end{quote}
+%
+% Without package \xpackage{xcolor} some of the options only
+% support some models, if they are given directly, e.g.:
+% \begin{quote}
+%   |\bookmarksetup{color=[rgb]{1,0,0}}|
+% \end{quote}
+%
+% Because of compatibility some options of \xpackage{hyperref}
+% also support space separated RGB values:
+% \begin{quote}
+%   |\hypersetup{linkbordercolor=1 0 0}%| is the same as\\
+%   |\hypersetup{linkbordercolor=[rgb]{1,0,0}}|
+% \end{quote}
+%
+% Coloring is optional, it can be turned off by using an empty
+% value:
+% \begin{quote}
+%   |\hypersetup{linkbordercolor={}}|
+% \end{quote}
+%
+% The PDF specification knows some kind of an emtpy color setting
+% without values. This applies to form field colors. The new
+% A virtual color model \texttt{empty} is introduced for this
+% purpose, e.g.
+% \begin{quote}
+%   |\TextField[backgroundcolor={[empty]{}}, ...]{...}%| or\\
+%   |\TextField[{backgroundcolor=[empty]{}, ...}]{...}|
+% \end{quote}
+% PDF specification 1.7 also allows this for border link colors.
+% But this isn't currently supported by this package, because
+% the tested viewers (AR7/Linux, xpdf 3.00, ghostscript 8.54)
+% don't support this yet. In contrary ghostscript generates an
+% error message.
+%
+% \subsection{Summary}
+%
+% \begin{quote}
+% \begin{tabular}{@{}llll@{}}
+%   Color option & Models without \xpackage{xcolor}
+%   & RGB color & Model empty\\
+%   \hline
+%   |BKM.color| & |gray|, |rgb| & no & no\\
+%   |Hyp.*color| & all & no & no\\
+%   |Hyp.*bordercolor| & |gray|, |rgb| & yes & no\\
+%   |Field.*color| & |gray|, |rgb|, |cmyk| & yes & yes\\
+%   |AtFi.color| & |gray|, |rgb| & yes & no\\
+% \end{tabular}
+% \end{quote}
+% ``RGB color'' means that the color value can be given as
+% space separated RGB numbers (real numbers in the range
+% from 0 to 1).
+% Explanation of the color option prefixes:
+% \begin{quote}
+% \begin{tabular}{@{}ll@{}}
+%   Prefix & Explanation\\
+%   \hline
+%   |BKM| & Package \xpackage{bookmark}\\
+%   |Hyp| & Package \xpackage{hyperref}:
+%           package options or |\hypersetup|\\
+%   |Field| & Package \xpackage{hyperref}:
+%             Form field options\\
+%   |AtFi| & Package \xpackage{attachfile2}: option \xoption{color}\\
+% \end{tabular}
+% \end{quote}
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+%
+%    \begin{macrocode}
+%<*package>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{hycolor}%
+  [2019/12/15 v1.9 Color options for hyperref/bookmark (HO)]%
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\RequirePackage{xcolor-patch}[2019/12/15]
+%    \end{macrocode}
+%
+% \subsection{Normalization}
+%
+% \subsubsection{Sanitize value of color option}
+%
+%    \begin{procedure}
+%      \Param{cmd}{macro}
+%      \Param{value}{value of color option}
+%      \BlankLine
+%      \KwResult{\ArgSty{value} is expanded, sanitized, and
+%                stored in macro \ArgSty{cmd}.}
+%      \caption{DefSanitized(cmd, value)}
+%      \BlankLine
+%      Initialize active characters\;
+%      \ArgSty{cmd} := Expand \ArgSty{value}\;
+%      Sanitize \ArgSty{cmd}\;
+%    \end{procedure}
+%    \emph{Sanitization} means that the string does not contain any
+%    macros or special tokens. It consists of characters with
+%    catcode 12 (other). The only exception is the space with
+%    catcode 10 (space).
+%    \begin{macro}{\HyColor at DefSanitized}
+%    \begin{macrocode}
+\begingroup
+  \catcode`\!=13 %
+  \catcode`\:=13 %
+  \catcode`\-=13 %
+  \catcode`\+=13 %
+  \catcode`\;=13 %
+  \catcode`\"=13 %
+  \catcode`\>=13 %
+  \edef\x{%
+    \def\noexpand!{\string!}%
+    \def\noexpand:{\string:}%
+    \def\noexpand-{\string-}%
+    \def\noexpand+{\string+}%
+    \def\noexpand;{\string;}%
+    \def\noexpand"{\string"}%
+    \def\noexpand>{\string>}%
+  }%
+  \def\y#1{\endgroup
+    \def\HyColor at DefSanitized##1##2{%
+      \begingroup
+        \csname @safe at activestrue\endcsname
+        #1%
+        \edef\x{\endgroup
+          \def\noexpand##1{##2}%
+        }%
+      \x
+      \@onelevel at sanitize##1%
+    }%
+  }%
+\expandafter\y\expandafter{\x}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Normalize result}
+%
+%    \begin{procedure}
+%      \Param{value}{Sanitized explicit number}
+%      \Param{cmd}{Macro that stores result}
+%      \BlankLine
+%      \KwResult{\ArgSty{cmd} contains normalized number}
+%      \caption{NormalizeNum(value, cmd)}
+%      \BlankLine
+%      \uIf{\Var{value}\,\Dat{pt} $<$ \Dat{0pt}}{
+%        \ArgSty{cmd} \Gets \Dat{0}\;
+%      }
+%      \uElseIf{number before dot of \Var{value} $<$ \Dat{1}}{
+%        \Var{cmd} \Gets number after dot of \Var{value}\;
+%        \Var{cmd} \Gets strip trailing zeros from \Var{cmd}\;
+%        \If{dot remains only}{
+%          \Var{cmd} \Gets \Dat{0}\;
+%        }
+%      }
+%      \Else{
+%        \Var{cmd} \Gets \Dat{1}\;
+%      }
+%    \end{procedure}
+%    The number is limited to the range between 0.0 and 1.0 and
+%    formatted as short PDF number without leading or trailing zeros.
+%    The precision of the number isn't changed.
+%    \begin{macro}{\HyColor at NormalizeNum}
+%    \begin{macrocode}
+\def\HyColor at NormalizeNum#1#2{%
+  \ifdim#1pt<\z@
+    \def#2{0}%
+  \else
+    \edef#2{\zap at space#1 \@empty}%
+    \expandafter\HyColor at CheckDot#2..\@nil#2%
+  \fi
+}
+\def\HyColor at CheckDot#1.#2.#3\@nil#4{%
+  \ifnum0#1<\@ne
+    \ifx\\#2\\%
+      \def#4{0}%
+    \else
+      \edef#4{\HyColor at ReverseString#2\@nil{}}%
+      \edef#4{\expandafter\HyColor at StripLeadingZeros#4\@empty}%
+      \ifx#4\@empty
+        \def#4{0}%
+      \else
+        \edef#4{.\expandafter\HyColor at ReverseString#4\@nil{}}%
+      \fi
+    \fi
+  \else
+    \def#4{1}%
+  \fi
+}
+\def\HyColor at ReverseString#1#2\@nil#3{%
+  \ifx\\#2\\%
+    #1#3%
+  \else
+    \@ReturnAfterFi{%
+      \HyColor at ReverseString#2\@nil{#1#3}%
+    }%
+  \fi
+}
+\long\def\@ReturnAfterFi#1\fi{\fi#1}
+\def\HyColor at StripLeadingZeros#1{%
+  \ifx#10%
+    \expandafter\HyColor at StripLeadingZeros
+  \else
+    #1%
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\HyColor at NormalizeCommaRGB}
+%    \begin{macrocode}
+\def\HyColor at NormalizeCommaRGB#1,#2,#3\@nil#4{%
+  \HyColor at NormalizeNum{#1}\HyColor at temp
+  \let#4\HyColor at temp
+  \HyColor at NormalizeNum{#2}\HyColor at temp
+  \edef#4{#4 \HyColor at temp}%
+  \HyColor at NormalizeNum{#3}\HyColor at temp
+  \edef#4{#4 \HyColor at temp}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\HyColor at NormalizeCommaCMYK}
+%    \begin{macrocode}
+\def\HyColor at NormalizeCommaCMYK#1,#2,#3,#4\@nil#5{%
+  \HyColor at NormalizeNum{#1}\HyColor at temp
+  \let#5\HyColor at temp
+  \HyColor at NormalizeNum{#2}\HyColor at temp
+  \edef#5{#5 \HyColor at temp}%
+  \HyColor at NormalizeNum{#3}\HyColor at temp
+  \edef#5{#5 \HyColor at temp}%
+  \HyColor at NormalizeNum{#4}\HyColor at temp
+  \edef#5{#5 \HyColor at temp}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsection{Main algorithm for color options}
+%
+% \begin{procedure}
+%   \Param{key}{name of color option}
+%   \Param{value}{value of color option}
+%   \Param{cmd}{macro that stores result}
+%   \BlankLine
+%   \KwResult{Macro \ArgSty{cmd} contains the calculated
+%      color specification string or has the meaning of \cs{relax}
+%      if the color must not set}
+%   \caption{MainColorOptionAlgorithm(key, value, cmd)}
+%   \BlankLine
+%   DefSanitized(\ArgSty{temp}, \ArgSty{value})\;
+%   Call option specific algorithm(\ArgSty{key}, \ArgSty{temp}, \ArgSty{cmd})\;
+% \end{procedure}
+%
+% \subsection{Package \xpackage{bookmark}}
+%
+% Since v0.8 2007/03/27 package \xpackage{bookmark} only provides
+% one color option \xoption{color}. Because option \xoption{rgbcolor}
+% can easily given as color specification in model rgb:
+% \begin{quote}
+%   |rgbcolor=|\meta{r} \meta{g} \meta{b} $\equiv$
+%   |color=[rgb]{|\meta{r}|,|\meta{g}|,|\meta{b}|}|
+% \end{quote}
+% Package \xpackage{bookmark} stores the result in macro \cs{BKM at color}.
+% The empty string is interpreted as \emph{no color}.
+%
+% \begin{procedure}
+%   \Param{value}{value of option \xoption{color}}
+%   \Param{cmd}{macro for result}
+%   \Param{package}{package name for error message}
+%   \Param{option}{option name for error message}
+%   \caption{BookmarkColor(value, cmd, package, option)}
+%   \BlankLine
+%   \Switch{\Var{value}}{
+%     \Case{empty}{
+%       \Var{cmd} \Gets no color\;
+%     }
+%     \Case{with model}{
+%       \eIf{with xcolor}{
+%         \Var{cmd} \Gets ConvertToRGB(\Var{model}, \Var{values})\;
+%       }{
+%         \uIf{model $=$ rgb}{
+%           \Var{cmd} \Gets \Var{values} as normalized values\;
+%         }
+%         \uElseIf{model $=$ gray}{
+%           \Var{cmd} \Gets \Var{values} as normalized tripled values\;
+%         }
+%         \Else{
+%           error\;
+%         }
+%       }
+%     }
+%     \Other{
+%       \eIf{with xcolor}{
+%         (\Var{model}, \Var{values} \Gets get model and values\;
+%         \Var{cmd} \Gets ConvertToRGB(\Var{model}, \Var{values})\;
+%       }{
+%         error\;
+%       }
+%     }
+%   }
+% \end{procedure}
+%
+%    \begin{macrocode}
+\def\HyColor at BookmarkColor#1#2#3#4{%
+  \HyColor at IfModel{#1}{%
+    \HyColor at IfXcolor{%
+      \convertcolorspec\HyColor at model\HyColor at values
+                       \HyColor at model@rgb#2%
+      \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+    }{%
+      \ifx\HyColor at model\HyColor at model@rgb
+        \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+      \else
+        \ifx\HyColor at model\HyColor at model@gray
+          \expandafter\HyColor at NormalizeNum
+              \expandafter{\HyColor at values}#2%
+          \edef#2{#2 #2 #2}%
+        \else
+          \let#2\@empty
+          \HyColor at ErrorModelNoXcolor{#3}{#4}%
+        \fi
+      \fi
+    }%
+  }{%
+    \let#2\HyColor at values
+    \ifx#2\@empty
+    \else
+      \HyColor at IfXcolor{%
+        \extractcolorspec{#1}#2%
+        \expandafter\convertcolorspec#2\HyColor at model@rgb#2%
+        \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+      }{%
+        \let#2\@empty
+        \HyColor at ErrorSpecNoXcolor{#3}{#4}%
+      }%
+    \fi
+  }%
+}
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\HyColor at ErrorModelNoXcolor#1#2{%
+  \PackageError{#1}{%
+    Color model `\HyColor at model' is not supported\MessageBreak
+    without package `xcolor' in\MessageBreak
+    `#2=[\HyColor at model]{\HyColor at values}'%
+  }\@ehc
+}
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\HyColor at ErrorSpecNoXcolor#1#2{%
+  \PackageError{#1}{%
+    This color specification is not supported\MessageBreak
+    without package `xcolor' in\MessageBreak
+    `#2=\HyColor at values'%
+  }\@ehc
+}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\def\HyColor at IfModel#1{%
+  \@ifnextchar[{%
+    \HyColor at WithModel
+  }{%
+    \HyColor at WithoutModel
+  }%
+  #1\@nil
+}
+\def\HyColor at WithModel[#1]#2\@nil{%
+  \HyColor at DefSanitized\HyColor at model{#1}%
+  \HyColor at DefSanitized\HyColor at values{#2}%
+  \@firstoftwo
+}
+\def\HyColor at WithoutModel#1\@nil{%
+  \let\HyColor at model\relax
+  \HyColor at DefSanitized\HyColor at values{#1}%
+  \@secondoftwo
+}
+%    \end{macrocode}
+%
+% \subsection{Utils}
+%
+%    \begin{macro}{\@ReturnAfterFi}
+%    \begin{macrocode}
+\long\def\@ReturnAfterFi#1\fi{\fi#1}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\HyColor at IfXcolor}
+%    \begin{macrocode}
+\def\HyColor at IfXcolor{%
+  \begingroup\expandafter\expandafter\expandafter\endgroup
+  \expandafter\ifx\csname convertcolorspec\endcsname\relax
+    \expandafter\@secondoftwo
+  \else
+    \expandafter\@firstoftwo
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macrocode}
+\def\HyColor at model@empty{empty}
+\@onelevel at sanitize\HyColor at model@empty
+\def\HyColor at model@gray{gray}
+\@onelevel at sanitize\HyColor at model@gray
+\def\HyColor at model@rgb{rgb}
+\@onelevel at sanitize\HyColor at model@rgb
+\def\HyColor at model@cmyk{cmyk}
+\@onelevel at sanitize\HyColor at model@cmyk
+\def\HyColor at model@Gray{Gray}
+\@onelevel at sanitize\HyColor at model@Gray
+%    \end{macrocode}
+%
+% \subsection{Package \xpackage{hyperref}}
+%
+% \subsubsection{Options \xoption{Hyp.*color}}
+%
+%    \begin{macrocode}
+\def\HyColor at UseColor#1{%
+  \ifx#1\relax
+  \else
+    \ifx#1\@empty
+    \else
+      \expandafter\HyColor@@UseColor#1\@nil
+    \fi
+  \fi
+}
+\def\HyColor@@UseColor{%
+  \@ifnextchar[\HyColor@@@UseColor\HyColor@@@@UseColor
+}
+\def\HyColor@@@UseColor[#1]#2\@nil{%
+  \color[{#1}]{#2}%
+}
+\def\HyColor@@@@UseColor#1\@nil{%
+  \color{#1}%
+}
+%    \end{macrocode}
+%
+% \begin{procedure}
+%   \Param{value}{value of the option}
+%   \Param{cmd}{macro for result}
+%   \caption{HyperrefColor(value, cmd)}
+%   \BlankLine
+%   \Switch{\Var{value}}{
+%     \Case{empty}{
+%       \Var{cmd} \Gets no color\;
+%     }
+%     \Case{with model}{
+%       Call \cs{color} with model\;
+%     }
+%     \Case{without model}{
+%       Call \cs{color} without model\;
+%     }
+%   }
+% \end{procedure}
+%
+%    \begin{macrocode}
+\def\HyColor at HyperrefColor#1#2{%
+  \HyColor at IfModel{#1}{%
+    \edef#2{[{\HyColor at model}]{\HyColor at values}}%
+  }{%
+    \let#2\HyColor at values
+    \ifx#2\@empty
+      \let#2\relax
+    \fi
+  }%
+}
+%    \end{macrocode}
+%
+% \subsubsection{Generic algorithm}
+%
+% \begin{procedure}
+%   \small
+%   \Param{value}{value of the option}
+%   \Param{cmd}{macro for result}
+%   \Param{package}{package name for error message}
+%   \Param{option}{option name for error message}
+%   \caption{Algorithm X0134(value, cmd, package, option)}
+%   \BlankLine
+%   \Switch{\Var{value}}{
+%     \Case{empty}{
+%       \Var{cmd} \Gets no color\;
+%     }
+%     \Case{with model}{
+%       \Switch{\Var{model}}{
+%         \Case{empty}{
+%           \Var{cmd} \Gets ""\;
+%         }
+%         \Case{gray, rgb, cmyk}{
+%           \Var{cmd} \Gets \Var{output}()\;
+%         }
+%         \Case{Gray}{
+%           \eIf{with xcolor}{
+%             (\Var{model}, \Var{values}) \Gets convert to gray\;
+%           }{
+%             error(\Var{package}, \Var{option}, "Missing xcolor"),
+%             \Var{cmd} \Gets no color\;
+%           }
+%         }
+%         \Else{
+%           \eIf{with xcolor}{
+%             (\Var{model}, \Var{values}) \Gets convert to rgb\;
+%             \Var{cmd} \Gets \Var{output}()\;
+%           }{
+%             error(\Var{package}, \Var{option}, "Missing xcolor"),
+%             \Var{cmd} \Gets no color\;
+%           }
+%         }
+%       }
+%     }
+%     \Case{rgb values}{
+%       (\Var{model}, \Var{values}) \Gets ("rgb", (r,g,b))\;
+%       \Var{cmd} \Gets \Var{output}()\;
+%     }
+%     \Case{without model}{
+%       \eIf{with xcolor}{
+%         (\Var{model}, \Var{values}) \Gets
+%             get model and values(\Var{value})\;
+%         \Switch{\Var{model}}{
+%           \Case{gray, rgb, cmyk}{
+%             \Var{cmd} \Gets \Var{output}()\;
+%           }
+%           \Case{Gray}{
+%             (\Var{model}, \Var{values}) \Gets convert to gray\;
+%             \Var{cmd} \Gets \Var{output}()\;
+%           }
+%           \Else{
+%             (\Var{model}, \Var{values}) \Gets convert to rgb\;
+%             \Var{cmd} \Gets \Var{output}()\;
+%           }
+%         }
+%       }{
+%         error(\Var{package}, \Var{option}, "Missing xcolor"),
+%         \Var{cmd} \Gets no color\;
+%       }
+%     }
+%   }
+% \end{procedure}
+%
+%    \begin{macro}{\HyColor at XZeroOneThreeFour}
+%    \begin{macrocode}
+\def\HyColor at XZeroOneThreeFour#1#2#3#4{%
+  \HyColor at IfModel{#1}{%
+    \ifx\HyColor at model\HyColor at model@empty
+      \let#2\@empty
+    \else\ifx\HyColor at model\HyColor at model@gray
+      \expandafter\HyColor at NormalizeNum
+          \expandafter{\HyColor at values}#2%
+    \else\ifx\HyColor at model\HyColor at model@rgb
+      \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+    \else\ifx\HyColor at model\HyColor at model@cmyk
+      \expandafter\HyColor at NormalizeCommaCMYK\HyColor at values\@nil#2%
+    \else\ifx\HyColor at model\HyColor at model@Gray
+      \HyColor at IfXcolor{%
+        \convertcolorspec\HyColor at model\HyColor at values
+                         \HyColor at model@gray#2%
+        \expandafter\HyColor at NormalizeNum\expandafter{#2}#2%
+        \let\HyColor at model\HyColor at model@gray
+      }{%
+        \let#2\relax
+        \HyColor at ErrorModelNoXcolor{#3}{#4}%
+      }%
+    \else
+      \HyColor at IfXcolor{%
+        \convertcolorspec\HyColor at model\HyColor at values
+                         \HyColor at model@rgb#2%
+        \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+        \let\HyColor at model\HyColor at model@rgb
+      }{%
+        \let#2\relax
+        \HyColor at ErrorModelNoXcolor{#3}{#4}%
+      }%
+    \fi\fi\fi\fi\fi
+  }{%
+    \let#2\HyColor at values
+    \ifx#2\@empty
+      \let#2\relax
+    \else
+      \expandafter\HyColor at IfRGB\expandafter{\HyColor at values}{%
+        \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+      }{%
+        \HyColor at IfXcolor{%
+          \expandafter\extractcolorspec\expandafter{\HyColor at values}#2%
+          \edef\HyColor at model{\expandafter\@firstoftwo#2}%
+          \edef\HyColor at values{\expandafter\@secondoftwo#2}%
+          \ifx\HyColor at model\HyColor at model@gray
+            \expandafter\HyColor at NormalizeNum\expandafter
+                {\HyColor at values}#2%
+          \else\ifx\HyColor at model\HyColor at model@rgb
+            \expandafter\HyColor at NormalizeCommaRGB
+                \HyColor at values\@nil#2%
+          \else\ifx\HyColor at model\HyColor at model@cmyk
+            \expandafter\HyColor at NormalizeCommaCMYK
+                \HyColor at values\@nil#2%
+          \else\ifx\HyColor at model\HyColor at model@Gray
+            \convertcolorspec\HyColor at model\HyColor at values
+                \HyColor at model@gray#2%
+            \expandafter\HyColor at NormalizeNum\expandafter
+                {\HyColor at values}#2%
+            \let\HyColor at model\HyColor at model@gray
+          \else
+            \convertcolorspec\HyColor at model\HyColor at values
+                \HyColor at model@rgb#2%
+            \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+            \let\HyColor at model\HyColor at model@rgb
+          \fi\fi\fi\fi
+        }{%
+          \let#2\relax
+          \HyColor at ErrorSpecNoXcolor{#3}{#4}%
+        }%
+      }%
+    \fi
+  }%
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Field options}
+%
+%    \begin{macro}{\HyColor at FieldBColor}
+%    \begin{macrocode}
+\let\HyColor at FieldBColor\HyColor at XZeroOneThreeFour
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\HyColor at FieldColor}
+%    \begin{macrocode}
+\def\HyColor at FieldColor#1#2#3#4{%
+  \let\HyColor at model\@empty
+  \HyColor at XZeroOneThreeFour{#1}{#2}{#3}{#4}%
+  \ifx#2\relax
+    \let#2\@empty
+  \else
+    \ifx#2\@empty
+    \else
+      \ifx\HyColor at model\HyColor at model@gray
+        \edef#2{#2 g}%
+      \else\ifx\HyColor at model\HyColor at model@rgb
+        \edef#2{#2 rg}%
+      \else\ifx\HyColor at model\HyColor at model@cmyk
+        \edef#2{#2 k}%
+      \else
+        \PackageError{#3}{Internal error: unsupported color model}\@ehc
+      \fi\fi\fi
+    \fi
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Detection for naked RGB values}
+%
+%    \begin{macro}{\HyColor at IfRGB}
+%    \begin{macrocode}
+\newif\ifHyColor at result
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfmatch\endcsname\relax
+  \expandafter\@firstoftwo
+\else
+  \expandafter\@secondoftwo
+\fi
+{%
+  \begingroup
+    \def\x#1{\endgroup
+      \def\HyColor at IfRGB##1{%
+        \HyColor@@IfRGB##1#1#1#1\@nil
+      }%
+    }%
+  \x{ }%
+  \edef\HyColor at TwoSpaces{\space\space}%
+  \def\HyColor@@IfRGB#1 #2 #3 #4\@nil{%
+    \HyColor at resulttrue
+    \def\HyColor at temp{#4}%
+    \ifx\HyColor at temp\HyColor at TwoSpaces
+      \HyColor at CheckNum{#1}%
+      \ifHyColor at result
+        \HyColor at CheckNum{#2}%
+        \ifHyColor at result
+          \HyColor at CheckNum{#3}%
+        \fi
+      \fi
+    \else
+      \HyColor at resultfalse
+    \fi
+    \ifHyColor at result
+      \let\HyColor at model\HyColor at model@rgb
+      \edef\HyColor at values{#1,#2,#3}%
+      \expandafter\@firstoftwo
+    \else
+      \expandafter\@secondoftwo
+    \fi
+  }%
+  \def\HyColor at zero{0}%
+  \def\HyColor at one{1}%
+  \def\HyColor at dot{.}%
+  \def\HyColor at CheckNum#1{%
+    \def\HyColor at temp{#1}%
+    \ifx\HyColor at temp\@empty
+      \HyColor at resultfalse
+    \else
+      \edef\HyColor at temp{\@car#1\@nil}%
+      \ifx\HyColor at temp\HyColor at zero
+      \else
+        \ifx\HyColor at temp\HyColor at one
+        \else
+          \ifx\HyColor at temp\HyColor at dot
+          \else
+            \HyColor at resultfalse
+          \fi
+        \fi
+      \fi
+    \fi
+  }%
+}{%
+  \def\HyColor at MatchNum{%
+    (0*1\string\.0*|0*1|0+\string\.?[0-9]*|\string\.[0-9]+)%
+  }%
+  \def\HyColor at IfRGB#1{%
+    \ifnum\pdfmatch{^\HyColor at MatchNum\space\HyColor at MatchNum
+        \space\HyColor at MatchNum$}{#1}>\z@
+      \let\HyColor at model\HyColor at model@rgb
+      \edef\HyColor at values{%
+        \expandafter\strip at prefix\pdflastmatch1,%
+        \expandafter\strip at prefix\pdflastmatch2,%
+        \expandafter\strip at prefix\pdflastmatch3%
+      }%
+      \HyColor at resulttrue
+      \expandafter\@firstoftwo
+    \else
+      \HyColor at resultfalse
+      \expandafter\@secondoftwo
+    \fi
+  }%
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Options \xoption{*bordercolor}}
+%
+% \begin{procedure}
+%   \Param{value}{value of the option}
+%   \Param{cmd}{macro for result}
+%   \Param{package, option}{package and option for error message}
+%   \caption{HyperrefBorderColor(value, cmd, package, option)}
+%   \BlankLine
+%   \Switch{\Var{value}}{
+%     \Case{empty}{
+%       \Var{cmd} \Gets no color\;
+%     }
+%     \Case{with model}{
+%       \eIf{with xcolor}{
+%         (\Var{model}, \Var{values}) \Gets convert to rgb\;
+%         \Var{cmd} \Gets output values\;
+%       }{
+%         \Switch{\Var{model}}{
+%           \Case{rgb, gray}{
+%             \Var{cmd} \Gets output values\;
+%           }
+%           \Else{
+%             error(\Var{package}, \Var{option}, "Missing xcolor")\;
+%             \Var{cmd} \Gets no color\;
+%           }
+%         }
+%       }
+%     }
+%     \Case{rgb values}{
+%       \Var{cmd} \Gets output values\;
+%     }
+%     \Case{without model}{
+%       \eIf{with xcolor}{
+%         (\Var{model}, \Var{values}) \Gets convert to rgb\;
+%         \Var{cmd} \Gets output values\;
+%       }{
+%         error(\Var{package}, \Var{option}, "Missing xcolor");
+%         \Var{cmd} \Gets no color\;
+%       }
+%     }
+%   }
+% \end{procedure}
+%
+%    \begin{macro}{\HyColor at HyperrefBorderColor}
+%    \begin{macrocode}
+\def\HyColor at HyperrefBorderColor#1#2#3#4{%
+  \HyColor at IfModel{#1}{%
+    \HyColor at IfXcolor{%
+      \convertcolorspec\HyColor at model\HyColor at values
+                       \HyColor at model@rgb#2%
+      \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+    }{%
+      \ifx\HyColor at model\HyColor at model@rgb
+        \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+      \else
+        \ifx\HyColor at model\HyColor at model@gray
+          \expandafter\HyColor at NormalizeNum
+              \expandafter{\HyColor at values}#2%
+          \edef#2{#2 #2 #2}%
+        \else
+          \let#2\relax
+          \HyColor at ErrorModelNoXcolor{#3}{#4}%
+        \fi
+      \fi
+    }%
+  }{%
+    \let#2\HyColor at values
+    \ifx#2\@empty
+      \let#2\relax
+    \else
+      \expandafter\HyColor at IfRGB\expandafter{\HyColor at values}{%
+        \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+      }{%
+        \HyColor at IfXcolor{%
+          \extractcolorspec{#1}#2%
+          \expandafter\convertcolorspec#2\HyColor at model@rgb#2%
+          \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+        }{%
+          \let#2\relax
+          \HyColor at ErrorSpecNoXcolor{#3}{#4}%
+        }%
+      }%
+    \fi
+  }%
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsection{Package \xpackage{attachfile2}}
+%
+%    Before PDF-1.7 only RGB values are permitted in annotations.
+%    Since PDF-1.7 the color entry in annotations understands
+%    several color models, depending on the size of the color array:
+%    \begin{itemize}
+%    \item Zero entries: means transparent, not useful for
+%          file attachments. AR7/Linux and AR8/Linux show black instead.
+%    \item One entry: color model `gray'.
+%    \item Three entries: color model `rgb'.
+%    \item Four entries: color model `cmyk'.
+%    \end{itemize}
+%    An empty color specification is interpreted as ``no color''.
+%
+%    \begin{macro}{\HyColor at DetectPdfVersion}
+%    \begin{macrocode}
+\def\HyColor at DetectPdfVersion{%
+  \begingroup\expandafter\expandafter\expandafter\endgroup
+  \expandafter\ifx\csname Hy at pdfversion\endcsname\relax
+    \global\chardef\HyColor at PdfVersion=0 %
+  \else
+    \global\chardef\HyColor at PdfVersion=\Hy at pdfversion\relax
+  \fi
+  \global\let\HyColor at DetectPdfVersion\relax
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\HyColor at SpaceToComma}
+%    \begin{macrocode}
+\def\HyColor at SpaceToComma#1 #2\@nil{%
+  #1%
+  \ifx\relax#2\relax
+    \expandafter\@gobble
+  \else
+    ,%
+    \expandafter\@firstofone
+  \fi
+  {%
+    \HyColor at SpaceToComma#2\@nil
+  }%
+}%
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\HyColor at AttachfileColor}
+%    \begin{macrocode}
+\def\HyColor at AttachfileColor#1#2#3#4#5#6{%
+  \def#2{#1}%
+  \ifx#2\@empty
+    \let#3\@gobble
+    \let#4\@empty
+  \else
+    \HyColor at resultfalse
+    \HyColor at XZeroOneThreeFour{#1}#3{#5}{#6}%
+    \ifHyColor at result
+      \edef#2{%
+        [rgb]{\expandafter\HyColor at SpaceToComma#3 \@nil}%
+      }%
+    \fi
+    \ifx\HyColor at model\HyColor at model@rgb
+      \edef#4{/C[#3]}% hash-ok
+      \edef#3##1{%
+        #3 %
+        \noexpand\csname atfi at SETRGBCOLOR##1\noexpand\endcsname
+      }%
+    \else
+      \ifx\HyColor at model\HyColor at model@gray
+        \HyColor at DetectPdfVersion
+        \ifnum\HyColor at PdfVersion<7 %
+          \edef#4{/C[#3 #3 #3]}% hash-ok
+        \else
+          \edef#4{/C[#3]}% hash-ok
+        \fi
+        \edef#3##1{%
+          #3 %
+          \noexpand\csname atfi at SETGRAYCOLOR##1\noexpand\endcsname
+        }%
+      \else
+        \ifx\HyColor at model\HyColor at model@cmyk
+          \HyColor at DetectPdfVersion
+          \ifnum\HyColor at PdfVersion<7 %
+            \HyColor at IfModel{#1}{%
+              \HyColor at IfXcolor{%
+                \convertcolorspec\HyColor at model\HyColor at values
+                                 \HyColor at model@rgb#4%
+                \expandafter\HyColor at NormalizeCommaRGB#4\@nil#4%
+                \edef#4{/C[#4]}% hash-ok
+              }{%
+                \let#4\@empty
+                \HyColor at ErrorModelNoXcolor{#5}{#6}%
+              }%
+            }{%
+              \HyColor at IfXcolor{%
+                \extractcolorspec{#1}#4%
+                \expandafter\convertcolorspec#4%
+                    \HyColor at model@rgb#4%
+                \expandafter\HyColor at NormalizeCommaRGB#4\@nil#4%
+                \edef#4{/C[#4]}% hash-ok
+              }{%
+                \let#4\@empty
+                \HyColor at ErrorSpecNoXcolor{#5}{#6}%
+              }%
+            }%
+          \else
+            \edef#4{/C[#3]}% hash-ok
+          \fi
+          \edef#3##1{%
+            #3 %
+            \noexpand\csname atfi at SETCMYKCOLOR##1\noexpand\endcsname
+          }%
+        \else
+          \ifx\HyColor at model\HyColor at model@empty
+            \PackageError{#5}{%
+              Color model `empty' is not permitted for option `#6'%
+            }\@ehc
+            \let#2\@empty
+            \let#3\@gobble
+            \let#4\@empty
+          \else
+            \ifx\HyColor at model\relax % (missing xcolor)
+              \let#3\@gobble
+              \let#4\@empty
+            \else
+              \PackageError{#5}{%
+                Internal error: unsupported color model%
+              }\@ehc
+            \fi
+          \fi
+        \fi
+      \fi
+    \fi
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macrocode}
+%</package>
+%    \end{macrocode}
+%
+% \subsection{Patch for package \xpackage{xcolor}}
+%
+%    Because the test files triggered a bug in package \xpackage{xcolor}
+%    of version 2007/01/21 v2.11.
+%    I contacted the author of \xpackage{xcolor} Uwe Kern. He responded
+%    with a test version 2007/03/27 v2.12a00 that fixes the problem.
+%    However, apparently he did not found the time for an official
+%    release yet. Thus I have reluctantly written the following
+%    patch package using the fixes of v2.12a00.
+%
+%    The patch is immediately applied if package \xpackage{xcolor}
+%    is already loaded.
+%    Otherwise the patch is delayed using \cs{AfterPackage} if
+%    package \xpackage{scrlfile} is loaded. As last resort
+%    \cs{AtBeginDocument} is used.
+%    \begin{macrocode}
+%<*xcolor>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xcolor-patch}[2019/12/15 xcolor patch]
+%    \end{macrocode}
+%    \begin{macrocode}
+\RequirePackage{hopatch}
+\hopatch at AfterPackage{xcolor}{%
+%    \end{macrocode}
+%    \begin{macro}{\XC at ifxcase}
+%    \begin{macrocode}
+  \long\def\reserved at a#1#2#3{%
+    \long\def\@@tmp##1##2{%
+      \ifx#1##1%
+        \toks@{##2}%
+        \expandafter\remove at to@nnil
+      \else
+        \expandafter\@@tmp
+      \fi
+    }%
+    \@@tmp#2#1{#3}\@nnil\the\toks@
+  }%
+  \ifx\XC at ifxcase\reserved at a
+    \long\def\XC at ifxcase#1#2#3{%
+      \long\def\XC at if@##1##2{%
+        \ifx#1##1%
+          \toks@{##2}%
+          \expandafter\remove at to@nnil
+        \else
+          \expandafter\XC at if@
+        \fi
+      }%
+      \XC at if@#2#1{#3}\@nnil
+      \the\toks@
+    }%
+  \fi
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\XC at ifcase}
+%    \begin{macrocode}
+  \long\def\reserved at a#1#2#3{%
+    \long\def\@@tmp##1##2{%
+      \@expandtwoargs\in@{,#1,}{,##1,}%
+      \ifin@
+        \toks@{##2}%
+        \expandafter\remove at to@nnil
+      \else
+        \expandafter\@@tmp
+      \fi
+    }%
+    \@@tmp#2{#1}{#3}\@nnil
+    \the\toks@
+  }%
+  \ifx\XC at ifcase\reserved at a
+    \long\def\XC at ifcase#1#2#3{%
+      \long\def\XC at if@##1##2{%
+        \@expandtwoargs\in@{,#1,}{,##1,}%
+        \ifin@
+          \toks@{##2}%
+          \expandafter\remove at to@nnil
+        \else
+          \expandafter\XC at if@
+        \fi
+      }%
+      \XC at if@#2{#1}{#3}\@nnil
+      \the\toks@
+    }%
+  \fi
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\XC at cnv@gray}
+%    \begin{macrocode}
+  \def\reserved at a#1,{%
+    \XC at ifxcase\tm{%
+      \XC at mod@rgb{%
+        \XC at calcN{#1}\@@tmp
+        \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+      }%
+      \XC at mod@cmy{%
+        \XC at calcC{#1}\@@tmp
+        \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+      }%
+      \XC at mod@cmyk{%
+        \XC at calcC{#1}\@@tmp
+        \edef\@@tmp{0,0,0,\@@tmp}%
+      }%
+      \XC at mod@RGB{%
+        \edef\@@scl{\rangeRGB}%
+        \XC at calcM{#1}\@@tmp
+        \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+      }%
+      \XC at mod@HTML{%
+        \edef\@@scl{\@cclv}%
+        \XC at calcM{#1}\@@tmp
+        \XC at calcH\@@tmp\@@tmp
+        \edef\@@tmp{\@@tmp\@@tmp\@@tmp}%
+      }%
+      \XC at mod@HSB{%
+        \edef\@@scl{\rangeHSB}%
+        \XC at calcM{#1}\@@tmp
+        \edef\@@tmp{0,0,\@@tmp}%
+      }%
+      \XC at mod@Gray{%
+        \edef\@@scl{\rangeGray}%
+        \XC at calcM{#1}\@@tmp
+      }%
+    }%
+    {%
+      \XC at calcN{#1}\@@tmp
+      \edef\@@tmp{0,0,\@@tmp}%
+    }%
+  }%
+  \ifx\XC at cnv@gray\reserved at a
+    \def\XC at cnv@gray#1,{%
+      \XC at ifxcase\tm{%
+        \XC at mod@rgb{%
+          \XC at calcN{#1}\@@tmp
+          \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+        }%
+        \XC at mod@gray{}%
+        \XC at mod@cmy{%
+          \XC at calcC{#1}\@@tmp
+          \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+        }%
+        \XC at mod@cmyk{%
+          \XC at calcC{#1}\@@tmp
+          \edef\@@tmp{0,0,0,\@@tmp}%
+        }%
+        \XC at mod@RGB{%
+          \edef\@@scl{\rangeRGB}%
+          \XC at calcM{#1}\@@tmp
+          \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+        }%
+        \XC at mod@HTML{%
+          \edef\@@scl{\@cclv}%
+          \XC at calcM{#1}\@@tmp
+          \XC at calcH\@@tmp\@@tmp
+          \edef\@@tmp{\@@tmp\@@tmp\@@tmp}%
+        }%
+        \XC at mod@HSB{%
+          \edef\@@scl{\rangeHSB}%
+          \XC at calcM{#1}\@@tmp
+          \edef\@@tmp{0,0,\@@tmp}%
+        }%
+        \XC at mod@Gray{%
+          \edef\@@scl{\rangeGray}%
+          \XC at calcM{#1}\@@tmp
+        }%
+      }%
+      {%
+        \XC at calcN{#1}\@@tmp
+        \edef\@@tmp{0,0,\@@tmp}%
+      }%
+    }%
+  \fi
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Fix fragile \cs{@frameb at x}}
+%
+%    \cs{fbox} becomes fragile, because the internal \cs{@frameb at x}
+%    is redefined by package \xpackage{xcolor}. The redefinition is
+%    no longer robust. Test file:
+%\begin{quote}
+%\begin{verbatim}
+%\documentclass{article}
+%\usepackage{xcolor}
+%\makeatletter
+%\protected at edef\x{\fbox{abc}}
+%\@@end
+%\end{verbatim}
+%\end{quote}
+%    \begin{macrocode}
+  \@ifundefined{XC at frameb@x }{%
+    \expandafter\let\csname XC at frameb@x \endcsname\XC at frameb@x
+    \edef\XC at frameb@x{%
+      \noexpand\protect
+      \expandafter\noexpand\csname XC at frameb@x \endcsname
+    }%
+    \expandafter\ifx\csname XC at frameb@x \endcsname\@frameb at x
+      \let\@frameb at x\XC at frameb@x
+    \fi
+  }{}%
+}
+%    \end{macrocode}
+%    \begin{macrocode}
+%</xcolor>
+%    \end{macrocode}
+%% \section{Installation}
+%
+% \subsection{Download}
+%
+% \paragraph{Package.} This package is available on
+% CTAN\footnote{\CTANpkg{hycolor}}:
+% \begin{description}
+% \item[\CTAN{macros/latex/contrib/hycolor/hycolor.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/hycolor/hycolor.pdf}] Documentation.
+% \end{description}
+%
+%
+% \paragraph{Bundle.} All the packages of the bundle `hycolor'
+% are also available in a TDS compliant ZIP archive. There
+% the packages are already unpacked and the documentation files
+% are generated. The files and directories obey the TDS standard.
+% \begin{description}
+% \item[\CTANinstall{install/macros/latex/contrib/hycolor.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTANpkg{tds}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \subsection{Bundle installation}
+%
+% \paragraph{Unpacking.} Unpack the \xfile{hycolor.tds.zip} in the
+% TDS tree (also known as \xfile{texmf} tree) of your choice.
+% Example (linux):
+% \begin{quote}
+%   |unzip hycolor.tds.zip -d ~/texmf|
+% \end{quote}
+%
+% \subsection{Package installation}
+%
+% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
+% \docstrip\ archive. The files are extracted by running the
+% \xfile{.dtx} through \plainTeX:
+% \begin{quote}
+%   \verb|tex hycolor.dtx|
+% \end{quote}
+%
+% \paragraph{TDS.} Now the different files must be moved into
+% the different directories in your installation TDS tree
+% (also known as \xfile{texmf} tree):
+% \begin{quote}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+%   hycolor.sty & tex/latex/hycolor/hycolor.sty\\
+%   xcolor-patch.sty & tex/latex/hycolor/xcolor-patch.sty\\
+%   hycolor.pdf & doc/latex/hycolor/hycolor.pdf\\
+%   hycolor.dtx & source/latex/hycolor/hycolor.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+%   \begingroup
+%     \advance\linewidth by\leftmargin
+%     \advance\linewidth by\rightmargin
+%   \edef\x{\endgroup
+%     \def\noexpand\lw{\the\linewidth}^^A
+%   }\x
+%   \def\lwbox{^^A
+%     \leavevmode
+%     \hbox to \linewidth{^^A
+%       \kern-\leftmargin\relax
+%       \hss
+%       \usebox0
+%       \hss
+%       \kern-\rightmargin\relax
+%     }^^A
+%   }^^A
+%   \ifdim\wd0>\lw
+%     \sbox0{\small\t}^^A
+%     \ifdim\wd0>\linewidth
+%       \ifdim\wd0>\lw
+%         \sbox0{\footnotesize\t}^^A
+%         \ifdim\wd0>\linewidth
+%           \ifdim\wd0>\lw
+%             \sbox0{\scriptsize\t}^^A
+%             \ifdim\wd0>\linewidth
+%               \ifdim\wd0>\lw
+%                 \sbox0{\tiny\t}^^A
+%                 \ifdim\wd0>\linewidth
+%                   \lwbox
+%                 \else
+%                   \usebox0
+%                 \fi
+%               \else
+%                 \lwbox
+%               \fi
+%             \else
+%               \usebox0
+%             \fi
+%           \else
+%             \lwbox
+%           \fi
+%         \else
+%           \usebox0
+%         \fi
+%       \else
+%         \lwbox
+%       \fi
+%     \else
+%       \usebox0
+%     \fi
+%   \else
+%     \lwbox
+%   \fi
+% \else
+%   \usebox0
+% \fi
+% \end{quote}
+% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
+% TDS installing feature, then some files can already be in the right
+% place, see the documentation of \docstrip.
+%
+% \subsection{Refresh file name databases}
+%
+% 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}
+%
+% \paragraph{Unpacking with \LaTeX.}
+% The \xfile{.dtx} chooses its action depending on the format:
+% \begin{description}
+% \item[\plainTeX:] Run \docstrip\ and extract the files.
+% \item[\LaTeX:] Generate the documentation.
+% \end{description}
+% If you insist on using \LaTeX\ for \docstrip\ (really,
+% \docstrip\ does not need \LaTeX), then inform the autodetect routine
+% about your intention:
+% \begin{quote}
+%   \verb|latex \let\install=y\input{hycolor.dtx}|
+% \end{quote}
+% Do not forget to quote the argument according to the demands
+% of your shell.
+%
+% \paragraph{Generating the documentation.}
+% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
+% the documentation. The process can be configured by the
+% configuration file \xfile{ltxdoc.cfg}. For instance, put this
+% line into this file, if you want to have A4 as paper format:
+% \begin{quote}
+%   \verb|\PassOptionsToClass{a4paper}{article}|
+% \end{quote}
+% An example follows how to generate the
+% documentation with pdf\LaTeX:
+% \begin{quote}
+%\begin{verbatim}
+%pdflatex hycolor.dtx
+%makeindex -s gind.ist hycolor.idx
+%pdflatex hycolor.dtx
+%makeindex -s gind.ist hycolor.idx
+%pdflatex hycolor.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \begin{History}
+%   \begin{Version}{2007/04/09 v1.0}
+%   \item
+%     First version.
+%   \end{Version}
+%   \begin{Version}{2007/04/11 v1.1}
+%   \item
+%     Line ends sanitized.
+%   \end{Version}
+%   \begin{Version}{2008/07/29 v1.2}
+%   \item
+%     Support for package \xpackage{attachfile2} added.
+%   \end{Version}
+%   \begin{Version}{2008/08/01 v1.3}
+%   \item
+%     Patch package \xpackage{xcolor-patch} added that fixes bugs in
+%     package \xpackage{xcolor} to get the test files running.
+%   \end{Version}
+%   \begin{Version}{2008/09/08 v1.4}
+%   \item
+%     Fix added to package \xpackage{xcolor-patch}:
+%     Fragile \cs{@frameb at x} (used in \cs{fbox}) is made robust.
+%   \end{Version}
+%   \begin{Version}{2009/10/02 v1.5}
+%   \item
+%     Doku fixes (Herbert Voss).
+%   \end{Version}
+%   \begin{Version}{2009/12/12 v1.6}
+%   \item
+%     Short info shortened.
+%   \end{Version}
+%   \begin{Version}{2011/01/30 v1.7}
+%   \item
+%     Package \xpackage{xcolor-patch} uses package \xpackage{hopatch}.
+%   \end{Version}
+%   \begin{Version}{2016/05/16 v1.8}
+%   \item
+%     Documentation updates.
+%   \end{Version}
+%   \begin{Version}{2019/12/15 v1.9}
+%   \item
+%     Documentation updates.
+%   \item
+%     Do not load \xpackage{xcolor-patch} by default.
+%   \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput


Property changes on: trunk/Master/texmf-dist/source/latex/hycolor/hycolor.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/hycolor/hycolor.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hycolor/hycolor.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/hycolor/hycolor.sty	2019-12-17 23:25:18 UTC (rev 53169)
@@ -0,0 +1,573 @@
+%%
+%% This is file `hycolor.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% hycolor.dtx  (with options: `package')
+%% 
+%% This is a generated file.
+%% 
+%% Project: hycolor
+%% Version: 2019/12/15 v1.9
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% 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
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 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 Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/hycolor/issues
+%% 
+%% 
+%% This work consists of the main source file hycolor.dtx
+%% and the derived files
+%%    hycolor.sty, hycolor.pdf, hycolor.ins, hycolor.drv,
+%%    xcolor-patch.sty
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{hycolor}%
+  [2019/12/15 v1.9 Color options for hyperref/bookmark (HO)]%
+\RequirePackage{xcolor-patch}[2019/12/15]
+\begingroup
+  \catcode`\!=13 %
+  \catcode`\:=13 %
+  \catcode`\-=13 %
+  \catcode`\+=13 %
+  \catcode`\;=13 %
+  \catcode`\"=13 %
+  \catcode`\>=13 %
+  \edef\x{%
+    \def\noexpand!{\string!}%
+    \def\noexpand:{\string:}%
+    \def\noexpand-{\string-}%
+    \def\noexpand+{\string+}%
+    \def\noexpand;{\string;}%
+    \def\noexpand"{\string"}%
+    \def\noexpand>{\string>}%
+  }%
+  \def\y#1{\endgroup
+    \def\HyColor at DefSanitized##1##2{%
+      \begingroup
+        \csname @safe at activestrue\endcsname
+        #1%
+        \edef\x{\endgroup
+          \def\noexpand##1{##2}%
+        }%
+      \x
+      \@onelevel at sanitize##1%
+    }%
+  }%
+\expandafter\y\expandafter{\x}
+\def\HyColor at NormalizeNum#1#2{%
+  \ifdim#1pt<\z@
+    \def#2{0}%
+  \else
+    \edef#2{\zap at space#1 \@empty}%
+    \expandafter\HyColor at CheckDot#2..\@nil#2%
+  \fi
+}
+\def\HyColor at CheckDot#1.#2.#3\@nil#4{%
+  \ifnum0#1<\@ne
+    \ifx\\#2\\%
+      \def#4{0}%
+    \else
+      \edef#4{\HyColor at ReverseString#2\@nil{}}%
+      \edef#4{\expandafter\HyColor at StripLeadingZeros#4\@empty}%
+      \ifx#4\@empty
+        \def#4{0}%
+      \else
+        \edef#4{.\expandafter\HyColor at ReverseString#4\@nil{}}%
+      \fi
+    \fi
+  \else
+    \def#4{1}%
+  \fi
+}
+\def\HyColor at ReverseString#1#2\@nil#3{%
+  \ifx\\#2\\%
+    #1#3%
+  \else
+    \@ReturnAfterFi{%
+      \HyColor at ReverseString#2\@nil{#1#3}%
+    }%
+  \fi
+}
+\long\def\@ReturnAfterFi#1\fi{\fi#1}
+\def\HyColor at StripLeadingZeros#1{%
+  \ifx#10%
+    \expandafter\HyColor at StripLeadingZeros
+  \else
+    #1%
+  \fi
+}
+\def\HyColor at NormalizeCommaRGB#1,#2,#3\@nil#4{%
+  \HyColor at NormalizeNum{#1}\HyColor at temp
+  \let#4\HyColor at temp
+  \HyColor at NormalizeNum{#2}\HyColor at temp
+  \edef#4{#4 \HyColor at temp}%
+  \HyColor at NormalizeNum{#3}\HyColor at temp
+  \edef#4{#4 \HyColor at temp}%
+}
+\def\HyColor at NormalizeCommaCMYK#1,#2,#3,#4\@nil#5{%
+  \HyColor at NormalizeNum{#1}\HyColor at temp
+  \let#5\HyColor at temp
+  \HyColor at NormalizeNum{#2}\HyColor at temp
+  \edef#5{#5 \HyColor at temp}%
+  \HyColor at NormalizeNum{#3}\HyColor at temp
+  \edef#5{#5 \HyColor at temp}%
+  \HyColor at NormalizeNum{#4}\HyColor at temp
+  \edef#5{#5 \HyColor at temp}%
+}
+\def\HyColor at BookmarkColor#1#2#3#4{%
+  \HyColor at IfModel{#1}{%
+    \HyColor at IfXcolor{%
+      \convertcolorspec\HyColor at model\HyColor at values
+                       \HyColor at model@rgb#2%
+      \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+    }{%
+      \ifx\HyColor at model\HyColor at model@rgb
+        \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+      \else
+        \ifx\HyColor at model\HyColor at model@gray
+          \expandafter\HyColor at NormalizeNum
+              \expandafter{\HyColor at values}#2%
+          \edef#2{#2 #2 #2}%
+        \else
+          \let#2\@empty
+          \HyColor at ErrorModelNoXcolor{#3}{#4}%
+        \fi
+      \fi
+    }%
+  }{%
+    \let#2\HyColor at values
+    \ifx#2\@empty
+    \else
+      \HyColor at IfXcolor{%
+        \extractcolorspec{#1}#2%
+        \expandafter\convertcolorspec#2\HyColor at model@rgb#2%
+        \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+      }{%
+        \let#2\@empty
+        \HyColor at ErrorSpecNoXcolor{#3}{#4}%
+      }%
+    \fi
+  }%
+}
+\def\HyColor at ErrorModelNoXcolor#1#2{%
+  \PackageError{#1}{%
+    Color model `\HyColor at model' is not supported\MessageBreak
+    without package `xcolor' in\MessageBreak
+    `#2=[\HyColor at model]{\HyColor at values}'%
+  }\@ehc
+}
+\def\HyColor at ErrorSpecNoXcolor#1#2{%
+  \PackageError{#1}{%
+    This color specification is not supported\MessageBreak
+    without package `xcolor' in\MessageBreak
+    `#2=\HyColor at values'%
+  }\@ehc
+}
+\def\HyColor at IfModel#1{%
+  \@ifnextchar[{%
+    \HyColor at WithModel
+  }{%
+    \HyColor at WithoutModel
+  }%
+  #1\@nil
+}
+\def\HyColor at WithModel[#1]#2\@nil{%
+  \HyColor at DefSanitized\HyColor at model{#1}%
+  \HyColor at DefSanitized\HyColor at values{#2}%
+  \@firstoftwo
+}
+\def\HyColor at WithoutModel#1\@nil{%
+  \let\HyColor at model\relax
+  \HyColor at DefSanitized\HyColor at values{#1}%
+  \@secondoftwo
+}
+\long\def\@ReturnAfterFi#1\fi{\fi#1}
+\def\HyColor at IfXcolor{%
+  \begingroup\expandafter\expandafter\expandafter\endgroup
+  \expandafter\ifx\csname convertcolorspec\endcsname\relax
+    \expandafter\@secondoftwo
+  \else
+    \expandafter\@firstoftwo
+  \fi
+}
+\def\HyColor at model@empty{empty}
+\@onelevel at sanitize\HyColor at model@empty
+\def\HyColor at model@gray{gray}
+\@onelevel at sanitize\HyColor at model@gray
+\def\HyColor at model@rgb{rgb}
+\@onelevel at sanitize\HyColor at model@rgb
+\def\HyColor at model@cmyk{cmyk}
+\@onelevel at sanitize\HyColor at model@cmyk
+\def\HyColor at model@Gray{Gray}
+\@onelevel at sanitize\HyColor at model@Gray
+\def\HyColor at UseColor#1{%
+  \ifx#1\relax
+  \else
+    \ifx#1\@empty
+    \else
+      \expandafter\HyColor@@UseColor#1\@nil
+    \fi
+  \fi
+}
+\def\HyColor@@UseColor{%
+  \@ifnextchar[\HyColor@@@UseColor\HyColor@@@@UseColor
+}
+\def\HyColor@@@UseColor[#1]#2\@nil{%
+  \color[{#1}]{#2}%
+}
+\def\HyColor@@@@UseColor#1\@nil{%
+  \color{#1}%
+}
+\def\HyColor at HyperrefColor#1#2{%
+  \HyColor at IfModel{#1}{%
+    \edef#2{[{\HyColor at model}]{\HyColor at values}}%
+  }{%
+    \let#2\HyColor at values
+    \ifx#2\@empty
+      \let#2\relax
+    \fi
+  }%
+}
+\def\HyColor at XZeroOneThreeFour#1#2#3#4{%
+  \HyColor at IfModel{#1}{%
+    \ifx\HyColor at model\HyColor at model@empty
+      \let#2\@empty
+    \else\ifx\HyColor at model\HyColor at model@gray
+      \expandafter\HyColor at NormalizeNum
+          \expandafter{\HyColor at values}#2%
+    \else\ifx\HyColor at model\HyColor at model@rgb
+      \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+    \else\ifx\HyColor at model\HyColor at model@cmyk
+      \expandafter\HyColor at NormalizeCommaCMYK\HyColor at values\@nil#2%
+    \else\ifx\HyColor at model\HyColor at model@Gray
+      \HyColor at IfXcolor{%
+        \convertcolorspec\HyColor at model\HyColor at values
+                         \HyColor at model@gray#2%
+        \expandafter\HyColor at NormalizeNum\expandafter{#2}#2%
+        \let\HyColor at model\HyColor at model@gray
+      }{%
+        \let#2\relax
+        \HyColor at ErrorModelNoXcolor{#3}{#4}%
+      }%
+    \else
+      \HyColor at IfXcolor{%
+        \convertcolorspec\HyColor at model\HyColor at values
+                         \HyColor at model@rgb#2%
+        \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+        \let\HyColor at model\HyColor at model@rgb
+      }{%
+        \let#2\relax
+        \HyColor at ErrorModelNoXcolor{#3}{#4}%
+      }%
+    \fi\fi\fi\fi\fi
+  }{%
+    \let#2\HyColor at values
+    \ifx#2\@empty
+      \let#2\relax
+    \else
+      \expandafter\HyColor at IfRGB\expandafter{\HyColor at values}{%
+        \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+      }{%
+        \HyColor at IfXcolor{%
+          \expandafter\extractcolorspec\expandafter{\HyColor at values}#2%
+          \edef\HyColor at model{\expandafter\@firstoftwo#2}%
+          \edef\HyColor at values{\expandafter\@secondoftwo#2}%
+          \ifx\HyColor at model\HyColor at model@gray
+            \expandafter\HyColor at NormalizeNum\expandafter
+                {\HyColor at values}#2%
+          \else\ifx\HyColor at model\HyColor at model@rgb
+            \expandafter\HyColor at NormalizeCommaRGB
+                \HyColor at values\@nil#2%
+          \else\ifx\HyColor at model\HyColor at model@cmyk
+            \expandafter\HyColor at NormalizeCommaCMYK
+                \HyColor at values\@nil#2%
+          \else\ifx\HyColor at model\HyColor at model@Gray
+            \convertcolorspec\HyColor at model\HyColor at values
+                \HyColor at model@gray#2%
+            \expandafter\HyColor at NormalizeNum\expandafter
+                {\HyColor at values}#2%
+            \let\HyColor at model\HyColor at model@gray
+          \else
+            \convertcolorspec\HyColor at model\HyColor at values
+                \HyColor at model@rgb#2%
+            \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+            \let\HyColor at model\HyColor at model@rgb
+          \fi\fi\fi\fi
+        }{%
+          \let#2\relax
+          \HyColor at ErrorSpecNoXcolor{#3}{#4}%
+        }%
+      }%
+    \fi
+  }%
+}
+\let\HyColor at FieldBColor\HyColor at XZeroOneThreeFour
+\def\HyColor at FieldColor#1#2#3#4{%
+  \let\HyColor at model\@empty
+  \HyColor at XZeroOneThreeFour{#1}{#2}{#3}{#4}%
+  \ifx#2\relax
+    \let#2\@empty
+  \else
+    \ifx#2\@empty
+    \else
+      \ifx\HyColor at model\HyColor at model@gray
+        \edef#2{#2 g}%
+      \else\ifx\HyColor at model\HyColor at model@rgb
+        \edef#2{#2 rg}%
+      \else\ifx\HyColor at model\HyColor at model@cmyk
+        \edef#2{#2 k}%
+      \else
+        \PackageError{#3}{Internal error: unsupported color model}\@ehc
+      \fi\fi\fi
+    \fi
+  \fi
+}
+\newif\ifHyColor at result
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfmatch\endcsname\relax
+  \expandafter\@firstoftwo
+\else
+  \expandafter\@secondoftwo
+\fi
+{%
+  \begingroup
+    \def\x#1{\endgroup
+      \def\HyColor at IfRGB##1{%
+        \HyColor@@IfRGB##1#1#1#1\@nil
+      }%
+    }%
+  \x{ }%
+  \edef\HyColor at TwoSpaces{\space\space}%
+  \def\HyColor@@IfRGB#1 #2 #3 #4\@nil{%
+    \HyColor at resulttrue
+    \def\HyColor at temp{#4}%
+    \ifx\HyColor at temp\HyColor at TwoSpaces
+      \HyColor at CheckNum{#1}%
+      \ifHyColor at result
+        \HyColor at CheckNum{#2}%
+        \ifHyColor at result
+          \HyColor at CheckNum{#3}%
+        \fi
+      \fi
+    \else
+      \HyColor at resultfalse
+    \fi
+    \ifHyColor at result
+      \let\HyColor at model\HyColor at model@rgb
+      \edef\HyColor at values{#1,#2,#3}%
+      \expandafter\@firstoftwo
+    \else
+      \expandafter\@secondoftwo
+    \fi
+  }%
+  \def\HyColor at zero{0}%
+  \def\HyColor at one{1}%
+  \def\HyColor at dot{.}%
+  \def\HyColor at CheckNum#1{%
+    \def\HyColor at temp{#1}%
+    \ifx\HyColor at temp\@empty
+      \HyColor at resultfalse
+    \else
+      \edef\HyColor at temp{\@car#1\@nil}%
+      \ifx\HyColor at temp\HyColor at zero
+      \else
+        \ifx\HyColor at temp\HyColor at one
+        \else
+          \ifx\HyColor at temp\HyColor at dot
+          \else
+            \HyColor at resultfalse
+          \fi
+        \fi
+      \fi
+    \fi
+  }%
+}{%
+  \def\HyColor at MatchNum{%
+    (0*1\string\.0*|0*1|0+\string\.?[0-9]*|\string\.[0-9]+)%
+  }%
+  \def\HyColor at IfRGB#1{%
+    \ifnum\pdfmatch{^\HyColor at MatchNum\space\HyColor at MatchNum
+        \space\HyColor at MatchNum$}{#1}>\z@
+      \let\HyColor at model\HyColor at model@rgb
+      \edef\HyColor at values{%
+        \expandafter\strip at prefix\pdflastmatch1,%
+        \expandafter\strip at prefix\pdflastmatch2,%
+        \expandafter\strip at prefix\pdflastmatch3%
+      }%
+      \HyColor at resulttrue
+      \expandafter\@firstoftwo
+    \else
+      \HyColor at resultfalse
+      \expandafter\@secondoftwo
+    \fi
+  }%
+}
+\def\HyColor at HyperrefBorderColor#1#2#3#4{%
+  \HyColor at IfModel{#1}{%
+    \HyColor at IfXcolor{%
+      \convertcolorspec\HyColor at model\HyColor at values
+                       \HyColor at model@rgb#2%
+      \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+    }{%
+      \ifx\HyColor at model\HyColor at model@rgb
+        \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+      \else
+        \ifx\HyColor at model\HyColor at model@gray
+          \expandafter\HyColor at NormalizeNum
+              \expandafter{\HyColor at values}#2%
+          \edef#2{#2 #2 #2}%
+        \else
+          \let#2\relax
+          \HyColor at ErrorModelNoXcolor{#3}{#4}%
+        \fi
+      \fi
+    }%
+  }{%
+    \let#2\HyColor at values
+    \ifx#2\@empty
+      \let#2\relax
+    \else
+      \expandafter\HyColor at IfRGB\expandafter{\HyColor at values}{%
+        \expandafter\HyColor at NormalizeCommaRGB\HyColor at values\@nil#2%
+      }{%
+        \HyColor at IfXcolor{%
+          \extractcolorspec{#1}#2%
+          \expandafter\convertcolorspec#2\HyColor at model@rgb#2%
+          \expandafter\HyColor at NormalizeCommaRGB#2\@nil#2%
+        }{%
+          \let#2\relax
+          \HyColor at ErrorSpecNoXcolor{#3}{#4}%
+        }%
+      }%
+    \fi
+  }%
+}
+\def\HyColor at DetectPdfVersion{%
+  \begingroup\expandafter\expandafter\expandafter\endgroup
+  \expandafter\ifx\csname Hy at pdfversion\endcsname\relax
+    \global\chardef\HyColor at PdfVersion=0 %
+  \else
+    \global\chardef\HyColor at PdfVersion=\Hy at pdfversion\relax
+  \fi
+  \global\let\HyColor at DetectPdfVersion\relax
+}
+\def\HyColor at SpaceToComma#1 #2\@nil{%
+  #1%
+  \ifx\relax#2\relax
+    \expandafter\@gobble
+  \else
+    ,%
+    \expandafter\@firstofone
+  \fi
+  {%
+    \HyColor at SpaceToComma#2\@nil
+  }%
+}%
+\def\HyColor at AttachfileColor#1#2#3#4#5#6{%
+  \def#2{#1}%
+  \ifx#2\@empty
+    \let#3\@gobble
+    \let#4\@empty
+  \else
+    \HyColor at resultfalse
+    \HyColor at XZeroOneThreeFour{#1}#3{#5}{#6}%
+    \ifHyColor at result
+      \edef#2{%
+        [rgb]{\expandafter\HyColor at SpaceToComma#3 \@nil}%
+      }%
+    \fi
+    \ifx\HyColor at model\HyColor at model@rgb
+      \edef#4{/C[#3]}% hash-ok
+      \edef#3##1{%
+        #3 %
+        \noexpand\csname atfi at SETRGBCOLOR##1\noexpand\endcsname
+      }%
+    \else
+      \ifx\HyColor at model\HyColor at model@gray
+        \HyColor at DetectPdfVersion
+        \ifnum\HyColor at PdfVersion<7 %
+          \edef#4{/C[#3 #3 #3]}% hash-ok
+        \else
+          \edef#4{/C[#3]}% hash-ok
+        \fi
+        \edef#3##1{%
+          #3 %
+          \noexpand\csname atfi at SETGRAYCOLOR##1\noexpand\endcsname
+        }%
+      \else
+        \ifx\HyColor at model\HyColor at model@cmyk
+          \HyColor at DetectPdfVersion
+          \ifnum\HyColor at PdfVersion<7 %
+            \HyColor at IfModel{#1}{%
+              \HyColor at IfXcolor{%
+                \convertcolorspec\HyColor at model\HyColor at values
+                                 \HyColor at model@rgb#4%
+                \expandafter\HyColor at NormalizeCommaRGB#4\@nil#4%
+                \edef#4{/C[#4]}% hash-ok
+              }{%
+                \let#4\@empty
+                \HyColor at ErrorModelNoXcolor{#5}{#6}%
+              }%
+            }{%
+              \HyColor at IfXcolor{%
+                \extractcolorspec{#1}#4%
+                \expandafter\convertcolorspec#4%
+                    \HyColor at model@rgb#4%
+                \expandafter\HyColor at NormalizeCommaRGB#4\@nil#4%
+                \edef#4{/C[#4]}% hash-ok
+              }{%
+                \let#4\@empty
+                \HyColor at ErrorSpecNoXcolor{#5}{#6}%
+              }%
+            }%
+          \else
+            \edef#4{/C[#3]}% hash-ok
+          \fi
+          \edef#3##1{%
+            #3 %
+            \noexpand\csname atfi at SETCMYKCOLOR##1\noexpand\endcsname
+          }%
+        \else
+          \ifx\HyColor at model\HyColor at model@empty
+            \PackageError{#5}{%
+              Color model `empty' is not permitted for option `#6'%
+            }\@ehc
+            \let#2\@empty
+            \let#3\@gobble
+            \let#4\@empty
+          \else
+            \ifx\HyColor at model\relax % (missing xcolor)
+              \let#3\@gobble
+              \let#4\@empty
+            \else
+              \PackageError{#5}{%
+                Internal error: unsupported color model%
+              }\@ehc
+            \fi
+          \fi
+        \fi
+      \fi
+    \fi
+  \fi
+}
+%% \section{Installation}
+\endinput
+%%
+%% End of file `hycolor.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/hycolor/hycolor.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/hycolor/xcolor-patch.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hycolor/xcolor-patch.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/hycolor/xcolor-patch.sty	2019-12-17 23:25:18 UTC (rev 53169)
@@ -0,0 +1,194 @@
+%%
+%% This is file `xcolor-patch.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% hycolor.dtx  (with options: `xcolor')
+%% 
+%% This is a generated file.
+%% 
+%% Project: hycolor
+%% Version: 2019/12/15 v1.9
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% 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
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 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 Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/hycolor/issues
+%% 
+%% 
+%% This work consists of the main source file hycolor.dtx
+%% and the derived files
+%%    hycolor.sty, hycolor.pdf, hycolor.ins, hycolor.drv,
+%%    xcolor-patch.sty
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xcolor-patch}[2019/12/15 xcolor patch]
+\RequirePackage{hopatch}
+\hopatch at AfterPackage{xcolor}{%
+  \long\def\reserved at a#1#2#3{%
+    \long\def\@@tmp##1##2{%
+      \ifx#1##1%
+        \toks@{##2}%
+        \expandafter\remove at to@nnil
+      \else
+        \expandafter\@@tmp
+      \fi
+    }%
+    \@@tmp#2#1{#3}\@nnil\the\toks@
+  }%
+  \ifx\XC at ifxcase\reserved at a
+    \long\def\XC at ifxcase#1#2#3{%
+      \long\def\XC at if@##1##2{%
+        \ifx#1##1%
+          \toks@{##2}%
+          \expandafter\remove at to@nnil
+        \else
+          \expandafter\XC at if@
+        \fi
+      }%
+      \XC at if@#2#1{#3}\@nnil
+      \the\toks@
+    }%
+  \fi
+  \long\def\reserved at a#1#2#3{%
+    \long\def\@@tmp##1##2{%
+      \@expandtwoargs\in@{,#1,}{,##1,}%
+      \ifin@
+        \toks@{##2}%
+        \expandafter\remove at to@nnil
+      \else
+        \expandafter\@@tmp
+      \fi
+    }%
+    \@@tmp#2{#1}{#3}\@nnil
+    \the\toks@
+  }%
+  \ifx\XC at ifcase\reserved at a
+    \long\def\XC at ifcase#1#2#3{%
+      \long\def\XC at if@##1##2{%
+        \@expandtwoargs\in@{,#1,}{,##1,}%
+        \ifin@
+          \toks@{##2}%
+          \expandafter\remove at to@nnil
+        \else
+          \expandafter\XC at if@
+        \fi
+      }%
+      \XC at if@#2{#1}{#3}\@nnil
+      \the\toks@
+    }%
+  \fi
+  \def\reserved at a#1,{%
+    \XC at ifxcase\tm{%
+      \XC at mod@rgb{%
+        \XC at calcN{#1}\@@tmp
+        \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+      }%
+      \XC at mod@cmy{%
+        \XC at calcC{#1}\@@tmp
+        \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+      }%
+      \XC at mod@cmyk{%
+        \XC at calcC{#1}\@@tmp
+        \edef\@@tmp{0,0,0,\@@tmp}%
+      }%
+      \XC at mod@RGB{%
+        \edef\@@scl{\rangeRGB}%
+        \XC at calcM{#1}\@@tmp
+        \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+      }%
+      \XC at mod@HTML{%
+        \edef\@@scl{\@cclv}%
+        \XC at calcM{#1}\@@tmp
+        \XC at calcH\@@tmp\@@tmp
+        \edef\@@tmp{\@@tmp\@@tmp\@@tmp}%
+      }%
+      \XC at mod@HSB{%
+        \edef\@@scl{\rangeHSB}%
+        \XC at calcM{#1}\@@tmp
+        \edef\@@tmp{0,0,\@@tmp}%
+      }%
+      \XC at mod@Gray{%
+        \edef\@@scl{\rangeGray}%
+        \XC at calcM{#1}\@@tmp
+      }%
+    }%
+    {%
+      \XC at calcN{#1}\@@tmp
+      \edef\@@tmp{0,0,\@@tmp}%
+    }%
+  }%
+  \ifx\XC at cnv@gray\reserved at a
+    \def\XC at cnv@gray#1,{%
+      \XC at ifxcase\tm{%
+        \XC at mod@rgb{%
+          \XC at calcN{#1}\@@tmp
+          \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+        }%
+        \XC at mod@gray{}%
+        \XC at mod@cmy{%
+          \XC at calcC{#1}\@@tmp
+          \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+        }%
+        \XC at mod@cmyk{%
+          \XC at calcC{#1}\@@tmp
+          \edef\@@tmp{0,0,0,\@@tmp}%
+        }%
+        \XC at mod@RGB{%
+          \edef\@@scl{\rangeRGB}%
+          \XC at calcM{#1}\@@tmp
+          \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+        }%
+        \XC at mod@HTML{%
+          \edef\@@scl{\@cclv}%
+          \XC at calcM{#1}\@@tmp
+          \XC at calcH\@@tmp\@@tmp
+          \edef\@@tmp{\@@tmp\@@tmp\@@tmp}%
+        }%
+        \XC at mod@HSB{%
+          \edef\@@scl{\rangeHSB}%
+          \XC at calcM{#1}\@@tmp
+          \edef\@@tmp{0,0,\@@tmp}%
+        }%
+        \XC at mod@Gray{%
+          \edef\@@scl{\rangeGray}%
+          \XC at calcM{#1}\@@tmp
+        }%
+      }%
+      {%
+        \XC at calcN{#1}\@@tmp
+        \edef\@@tmp{0,0,\@@tmp}%
+      }%
+    }%
+  \fi
+  \@ifundefined{XC at frameb@x }{%
+    \expandafter\let\csname XC at frameb@x \endcsname\XC at frameb@x
+    \edef\XC at frameb@x{%
+      \noexpand\protect
+      \expandafter\noexpand\csname XC at frameb@x \endcsname
+    }%
+    \expandafter\ifx\csname XC at frameb@x \endcsname\@frameb at x
+      \let\@frameb at x\XC at frameb@x
+    \fi
+  }{}%
+}
+%% \section{Installation}
+\endinput
+%%
+%% End of file `xcolor-patch.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/hycolor/xcolor-patch.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-12-17 23:24:25 UTC (rev 53168)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-12-17 23:25:18 UTC (rev 53169)
@@ -355,7 +355,8 @@
     hmtrump hobby hobete hobsub hologo hook-pre-commit-pkg horoscop
     hpsdiss hrefhide hrlatex
     hu-berlin-bundle hulipsum hustthesis hvfloat hvindex hvqrurl
-    hypdvips hyper hyperbar hypernat hyperref hyperxmp hyph-utf8 hyphen-base 
+    hycolor hypdvips hyper hyperbar hypernat hyperref hyperxmp
+    hyph-utf8 hyphen-base
     hyphenat hyphenex hyplain
   ibycus-babel ibygrk icite icsv identkey idxcmds idxlayout ieeepes ietfbibs
     iffont ifmslide ifmtarg ifnextok ifoddpage ifplatform ifptex ifsym

Modified: trunk/Master/tlpkg/tlpsrc/collection-latex.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latex.tlpsrc	2019-12-17 23:24:25 UTC (rev 53168)
+++ trunk/Master/tlpkg/tlpsrc/collection-latex.tlpsrc	2019-12-17 23:25:18 UTC (rev 53169)
@@ -23,6 +23,7 @@
 depend graphics
 depend graphics-cfg
 depend grfext
+depend hycolor
 depend hyperref
 depend intcalc
 depend kvdefinekeys

Added: trunk/Master/tlpkg/tlpsrc/hycolor.tlpsrc
===================================================================


More information about the tex-live-commits mailing list