summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hycolor
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-01-29 03:01:39 +0000
committerNorbert Preining <norbert@preining.info>2020-01-29 03:01:39 +0000
commit0d9a20b65398ec99149b5c3d700e78f891b90842 (patch)
treeca173f2c5bbd75b090b58afdc71e6dc3ed1a1f3a /macros/latex/contrib/hycolor
parentfdd916a9e0d94bbf49f74c3b796e1bab88964d4c (diff)
CTAN sync 202001290301
Diffstat (limited to 'macros/latex/contrib/hycolor')
-rw-r--r--macros/latex/contrib/hycolor/hycolor.dtx150
-rw-r--r--macros/latex/contrib/hycolor/hycolor.pdfbin364587 -> 379542 bytes
2 files changed, 111 insertions, 39 deletions
diff --git a/macros/latex/contrib/hycolor/hycolor.dtx b/macros/latex/contrib/hycolor/hycolor.dtx
index 8282fb0547..8e211c02a0 100644
--- a/macros/latex/contrib/hycolor/hycolor.dtx
+++ b/macros/latex/contrib/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/macros/latex/contrib/hycolor/hycolor.pdf b/macros/latex/contrib/hycolor/hycolor.pdf
index f2c73d016f..7721c58658 100644
--- a/macros/latex/contrib/hycolor/hycolor.pdf
+++ b/macros/latex/contrib/hycolor/hycolor.pdf
Binary files differ