From 3415fbd0508eeafd0f7970490bbd418c9c476b79 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 28 Jan 2020 22:33:05 +0000 Subject: hycolor (28jan20) git-svn-id: svn://tug.org/texlive/trunk@53584 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/hycolor/hycolor.pdf | Bin 364587 -> 379542 bytes Master/texmf-dist/source/latex/hycolor/hycolor.dtx | 150 +++++++++++++++------ Master/texmf-dist/tex/latex/hycolor/hycolor.sty | 100 ++++++++++++-- .../texmf-dist/tex/latex/hycolor/xcolor-patch.sty | 7 +- 4 files changed, 206 insertions(+), 51 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf b/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf index f2c73d016fa..7721c586589 100644 Binary files a/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf and b/Master/texmf-dist/doc/latex/hycolor/hycolor.pdf differ diff --git a/Master/texmf-dist/source/latex/hycolor/hycolor.dtx b/Master/texmf-dist/source/latex/hycolor/hycolor.dtx index 8282fb0547f..8e211c02a02 100644 --- a/Master/texmf-dist/source/latex/hycolor/hycolor.dtx +++ b/Master/texmf-dist/source/latex/hycolor/hycolor.dtx @@ -1,12 +1,12 @@ % \iffalse meta-comment % % File: hycolor.dtx -% Version: 2019/12/15 v1.9 +% Version: 2020-01-27 v1.10 % Info: Color options for hyperref/bookmark % % Copyright (C) % 2007-2011 Heiko Oberdiek -% 2016-2019 Oberdiek Package Support Group +% 2016-2020 Oberdiek Package Support Group % https://github.com/ho-tex/hycolor/issues % % This work may be distributed and/or modified under the @@ -53,7 +53,7 @@ % use A4 as paper format: % \PassOptionsToClass{a4paper}{article} % -% Programm calls to get the documentation (example): +% Program calls to get the documentation (example): % pdflatex hycolor.dtx % makeindex -s gind.ist hycolor.idx % pdflatex hycolor.dtx @@ -81,7 +81,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: hycolor 2019/12/15 v1.9 Color options for hyperref/bookmark (HO)} +\Msg{* Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)} \Msg{************************************************************************} \keepsilent @@ -93,11 +93,11 @@ This is a generated file. Project: hycolor -Version: 2019/12/15 v1.9 +Version: 2020-01-27 v1.10 Copyright (C) 2007-2011 Heiko Oberdiek - 2016-2019 Oberdiek Package Support Group + 2016-2020 Oberdiek Package Support Group This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either @@ -156,7 +156,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{hycolor.drv}% - [2019/12/15 v1.9 Color options for hyperref/bookmark (HO)]% + [2020-01-27 v1.10 Color options for hyperref/bookmark (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2011/11/22] \usepackage[ruled]{algorithm2e} @@ -205,7 +205,7 @@ and the derived files % \GetFileInfo{hycolor.drv} % % \title{The \xpackage{hycolor} package} -% \date{2019/12/15 v1.9} +% \date{2020-01-27 v1.10} % \author{Heiko Oberdiek\thanks % {Please report any issues at \url{https://github.com/ho-tex/hycolor/issues}}} % @@ -232,7 +232,7 @@ and the derived files % \begin{quote} % |\hypersetup{linkbordercolor=red}%| needs \xpackage{xcolor}\\ % |\hypersetup{linkbordercolor=[named]{red}}%| needs \xpackage{xcolor}\\ -% |\hypersetup{linkbordercolor=[rgb]{1,0,0}}|\\ +% |\hypersetup{linkbordercolor=[rgb]{1,0,0}}| % \end{quote} % % Without package \xpackage{xcolor} some of the options only @@ -270,7 +270,6 @@ and the derived files % % \subsection{Summary} % -% \begin{quote} % \begin{tabular}{@{}llll@{}} % Color option & Models without \xpackage{xcolor} % & RGB color & Model empty\\ @@ -281,12 +280,12 @@ and the derived files % |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 @@ -297,7 +296,7 @@ and the derived files % Form field options\\ % |AtFi| & Package \xpackage{attachfile2}: option \xoption{color}\\ % \end{tabular} -% \end{quote} +% % % \StopEventually{ % } @@ -308,11 +307,99 @@ and the derived files %<*package> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hycolor}% - [2019/12/15 v1.9 Color options for hyperref/bookmark (HO)]% + [2020-01-27 v1.10 Color options for hyperref/bookmark (HO)]% % \end{macrocode} % +% Should not be needed after \textsf{xcolor} updates, +% Avoid loading \xpackage{xcolor-patch} but fix Gray color model. % \begin{macrocode} -\RequirePackage{xcolor-patch}[2019/12/15] +% \RequirePackage{xcolor-patch}[2019/12/15] +\AtBeginDocument{% +\def\@tempa#1,{% + \XC@ifxcase\tm{% + \XC@mod@rgb{% + \XC@calcN{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@cmy{% + \XC@calcC{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@cmyk{% + \XC@calcC{#1}\@@tmp + \edef\@@tmp{0,0,0,\@@tmp}% + }% + \XC@mod@RGB{% + \edef\@@scl{\rangeRGB}% + \XC@calcM{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@HTML{% + \edef\@@scl{\@cclv}% + \XC@calcM{#1}\@@tmp + \XC@calcH\@@tmp\@@tmp + \edef\@@tmp{\@@tmp\@@tmp\@@tmp}% + }% + \XC@mod@HSB{% + \edef\@@scl{\rangeHSB}% + \XC@calcM{#1}\@@tmp + \edef\@@tmp{0,0,\@@tmp}% + }% + \XC@mod@Gray{% + \edef\@@scl{\rangeGray}% + \XC@calcM{#1}\@@tmp + }% + }% + {% + \XC@calcN{#1}\@@tmp + \edef\@@tmp{0,0,\@@tmp}% + }% + }% +\ifx\XC@cnv@gray\@tempa + \def\XC@cnv@gray#1,{% + \XC@ifxcase\tm{% + \XC@mod@rgb{% + \XC@calcN{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@gray{}% + \XC@mod@cmy{% + \XC@calcC{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@cmyk{% + \XC@calcC{#1}\@@tmp + \edef\@@tmp{0,0,0,\@@tmp}% + }% + \XC@mod@RGB{% + \edef\@@scl{\rangeRGB}% + \XC@calcM{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@HTML{% + \edef\@@scl{\@cclv}% + \XC@calcM{#1}\@@tmp + \XC@calcH\@@tmp\@@tmp + \edef\@@tmp{\@@tmp\@@tmp\@@tmp}% + }% + \XC@mod@HSB{% + \edef\@@scl{\rangeHSB}% + \XC@calcM{#1}\@@tmp + \edef\@@tmp{0,0,\@@tmp}% + }% + \XC@mod@Gray{% + \edef\@@scl{\rangeGray}% + \XC@calcM{#1}\@@tmp + }% + }% + {% + \XC@calcN{#1}\@@tmp + \edef\@@tmp{0,0,\@@tmp}% + }% + }% +\fi +\let\@tempa\relax +} % \end{macrocode} % % \subsection{Normalization} @@ -653,11 +740,11 @@ and the derived files % % \begin{macrocode} \def\HyColor@UseColor#1{% - \ifx#1\relax + \ifx\relax#1\@empty \else - \ifx#1\@empty + \ifx\@empty#1\@empty \else - \expandafter\HyColor@@UseColor#1\@nil + \expandafter\expandafter\expandafter\HyColor@@UseColor#1\@nil \fi \fi } @@ -706,7 +793,7 @@ and the derived files % \subsubsection{Generic algorithm} % % \begin{procedure} -% \small +% \footnotesize % \Param{value}{value of the option} % \Param{cmd}{macro for result} % \Param{package}{package name for error message} @@ -1218,7 +1305,7 @@ and the derived files % \begin{macrocode} %<*xcolor> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{xcolor-patch}[2019/12/15 xcolor patch] +\ProvidesPackage{xcolor-patch}[2020/01/27 v1.10 xcolor patch] % \end{macrocode} % \begin{macrocode} \RequirePackage{hopatch} @@ -1415,25 +1502,6 @@ and the derived files % \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} % @@ -1608,6 +1676,10 @@ and the derived files % \item % Do not load \xpackage{xcolor-patch} by default. % \end{Version} +% \begin{Version}{2020-01-27 v1.10} +% \item extra expansion step to avoid \verb|! LaTeX Error: Undefined color `[{rgb}]| errors in hyperref. +% \item add fix to Gray model from \xpackage{xcolor-patch}. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/tex/latex/hycolor/hycolor.sty b/Master/texmf-dist/tex/latex/hycolor/hycolor.sty index 63b09e2b6fe..a6050bcd36e 100644 --- a/Master/texmf-dist/tex/latex/hycolor/hycolor.sty +++ b/Master/texmf-dist/tex/latex/hycolor/hycolor.sty @@ -9,11 +9,11 @@ %% This is a generated file. %% %% Project: hycolor -%% Version: 2019/12/15 v1.9 +%% Version: 2020-01-27 v1.10 %% %% Copyright (C) %% 2007-2011 Heiko Oberdiek -%% 2016-2019 Oberdiek Package Support Group +%% 2016-2020 Oberdiek Package Support Group %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -31,7 +31,6 @@ %% 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, @@ -39,8 +38,93 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hycolor}% - [2019/12/15 v1.9 Color options for hyperref/bookmark (HO)]% -\RequirePackage{xcolor-patch}[2019/12/15] + [2020-01-27 v1.10 Color options for hyperref/bookmark (HO)]% +\AtBeginDocument{% +\def\@tempa#1,{% + \XC@ifxcase\tm{% + \XC@mod@rgb{% + \XC@calcN{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@cmy{% + \XC@calcC{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@cmyk{% + \XC@calcC{#1}\@@tmp + \edef\@@tmp{0,0,0,\@@tmp}% + }% + \XC@mod@RGB{% + \edef\@@scl{\rangeRGB}% + \XC@calcM{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@HTML{% + \edef\@@scl{\@cclv}% + \XC@calcM{#1}\@@tmp + \XC@calcH\@@tmp\@@tmp + \edef\@@tmp{\@@tmp\@@tmp\@@tmp}% + }% + \XC@mod@HSB{% + \edef\@@scl{\rangeHSB}% + \XC@calcM{#1}\@@tmp + \edef\@@tmp{0,0,\@@tmp}% + }% + \XC@mod@Gray{% + \edef\@@scl{\rangeGray}% + \XC@calcM{#1}\@@tmp + }% + }% + {% + \XC@calcN{#1}\@@tmp + \edef\@@tmp{0,0,\@@tmp}% + }% + }% +\ifx\XC@cnv@gray\@tempa + \def\XC@cnv@gray#1,{% + \XC@ifxcase\tm{% + \XC@mod@rgb{% + \XC@calcN{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@gray{}% + \XC@mod@cmy{% + \XC@calcC{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@cmyk{% + \XC@calcC{#1}\@@tmp + \edef\@@tmp{0,0,0,\@@tmp}% + }% + \XC@mod@RGB{% + \edef\@@scl{\rangeRGB}% + \XC@calcM{#1}\@@tmp + \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}% + }% + \XC@mod@HTML{% + \edef\@@scl{\@cclv}% + \XC@calcM{#1}\@@tmp + \XC@calcH\@@tmp\@@tmp + \edef\@@tmp{\@@tmp\@@tmp\@@tmp}% + }% + \XC@mod@HSB{% + \edef\@@scl{\rangeHSB}% + \XC@calcM{#1}\@@tmp + \edef\@@tmp{0,0,\@@tmp}% + }% + \XC@mod@Gray{% + \edef\@@scl{\rangeGray}% + \XC@calcM{#1}\@@tmp + }% + }% + {% + \XC@calcN{#1}\@@tmp + \edef\@@tmp{0,0,\@@tmp}% + }% + }% +\fi +\let\@tempa\relax +} \begingroup \catcode`\!=13 % \catcode`\:=13 % @@ -218,11 +302,11 @@ \def\HyColor@model@Gray{Gray} \@onelevel@sanitize\HyColor@model@Gray \def\HyColor@UseColor#1{% - \ifx#1\relax + \ifx\relax#1\@empty \else - \ifx#1\@empty + \ifx\@empty#1\@empty \else - \expandafter\HyColor@@UseColor#1\@nil + \expandafter\expandafter\expandafter\HyColor@@UseColor#1\@nil \fi \fi } diff --git a/Master/texmf-dist/tex/latex/hycolor/xcolor-patch.sty b/Master/texmf-dist/tex/latex/hycolor/xcolor-patch.sty index d59367fdd0c..ee1d7e4f418 100644 --- a/Master/texmf-dist/tex/latex/hycolor/xcolor-patch.sty +++ b/Master/texmf-dist/tex/latex/hycolor/xcolor-patch.sty @@ -9,11 +9,11 @@ %% This is a generated file. %% %% Project: hycolor -%% Version: 2019/12/15 v1.9 +%% Version: 2020-01-27 v1.10 %% %% Copyright (C) %% 2007-2011 Heiko Oberdiek -%% 2016-2019 Oberdiek Package Support Group +%% 2016-2020 Oberdiek Package Support Group %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -31,14 +31,13 @@ %% 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] +\ProvidesPackage{xcolor-patch}[2020/01/27 v1.10 xcolor patch] \RequirePackage{hopatch} \hopatch@AfterPackage{xcolor}{% \long\def\reserved@a#1#2#3{% -- cgit v1.2.3