From 7a0a67d6119154b2c5c7bc1c069a37db8b374f73 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 25 Mar 2019 20:46:21 +0000 Subject: colorspace (25mar19) git-svn-id: svn://tug.org/texlive/trunk@50585 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/colorspace/README | 29 ------- Master/texmf-dist/doc/latex/colorspace/README.md | 38 +++++++++ .../texmf-dist/doc/latex/colorspace/colorspace.pdf | Bin 99617 -> 99243 bytes .../texmf-dist/doc/latex/colorspace/colorspace.tex | 70 +++++++++------- .../texmf-dist/tex/latex/colorspace/colorspace.sty | 92 +++++++++++++-------- 5 files changed, 133 insertions(+), 96 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/colorspace/README create mode 100644 Master/texmf-dist/doc/latex/colorspace/README.md (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/colorspace/README b/Master/texmf-dist/doc/latex/colorspace/README deleted file mode 100644 index f0d84ee7cda..00000000000 --- a/Master/texmf-dist/doc/latex/colorspace/README +++ /dev/null @@ -1,29 +0,0 @@ -colorspace ------------ - -This package provides some tools related to PDF color spaces and color -management. It requires xcolor, which is loaded if it has not been -before. - -Currently it supports what I think are the most common tools: - -* Spot colors (CMYK and CIE LAB) -* Mixed spot and process colors (up to 4) -* ICC based default CMYK, RGB and Gray spaces -* Overprinting - -Currently only pdftex and luatex are supported. It seems to work with tikz. - -For example, to define a spot color, just say something like: - -\definespotcolor{foo}{BarTone 555 GN}{.3, .4, .5, .6} - -That's all. - -What's new ----------- - -* 1.2.0 CIE LAB spot colors (including mixed inks with a CMYK alternative) -* 1.1.1 is compatible with luatex 0.95 - -2016-10-05 \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/colorspace/README.md b/Master/texmf-dist/doc/latex/colorspace/README.md new file mode 100644 index 00000000000..c3d2a17ce1b --- /dev/null +++ b/Master/texmf-dist/doc/latex/colorspace/README.md @@ -0,0 +1,38 @@ +## colorspace + +This package provides some tools related to PDF color spaces and color +management. It requires xcolor, which is loaded if it has not been +before. + +Currently it supports what I think are the most common tools: + +* Spot colors (CMYK and CIE LAB) +* Mixed spot and process colors (up to 4) +* ICC based default CMYK, RGB and Gray spaces +* Overprinting + +Currently only pdftex and luatex are supported. It seems to work with tikz. + +For example, to define a spot color, just say something like: + +\definespotcolor{foo}{BarTone 555 GN}{.3, .4, .5, .6} + +That's all. + +### Latest changes + +``` +* 1.3 Fixes several incompatibilities with pgf/tikz +* 1.2.0 CIE LAB spot colors (including mixed inks with a + CMYK alternative) +* 1.1.1 is compatible with luatex 0.95 +``` + +License: MIT + +Repository: https://github.com/jbezos/colorspace + +________ +Javier Bezos --- http://www.texnia.com + +2019-03-25 \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/colorspace/colorspace.pdf b/Master/texmf-dist/doc/latex/colorspace/colorspace.pdf index 41fad0fd656..a67b69fc82a 100644 Binary files a/Master/texmf-dist/doc/latex/colorspace/colorspace.pdf and b/Master/texmf-dist/doc/latex/colorspace/colorspace.pdf differ diff --git a/Master/texmf-dist/doc/latex/colorspace/colorspace.tex b/Master/texmf-dist/doc/latex/colorspace/colorspace.tex index 53075191ed7..dff859ab3e0 100644 --- a/Master/texmf-dist/doc/latex/colorspace/colorspace.tex +++ b/Master/texmf-dist/doc/latex/colorspace/colorspace.tex @@ -1,32 +1,20 @@ -% +--------------------------------------------------+ -% | Typeset this file to get the documentation. | -% +--------------------------------------------------+ % -%% Copyright (C) 2015-2016 Javier Bezos -%% All Rights Reserved -%% http://www.texnia.com -%% -%% This work may be distributed and/or modified under the conditions -%% of the LaTeX Project Public License, either version 1.3 of this -%% license or (at your option) any later version. The latest version -%% of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2003/12/01 or later. -%% -%% This work has the LPPL maintenance status "maintained". -%% -%% This Current Maintainer of this work is Javier Bezos. -%% -%% This work consists of the files colorspace.tex and colorspace.sty. +% Copyright (C) 2015-2019 Javier Bezos http://www.texnia.com +% +% This file may be distributed and/or modified under the conditions of +% the MIT License. A version can be found at the end of this file. +% +% Repository: https://github.com/jbezos/colorspace +% + \documentclass[a4paper]{ltxguide} -\title{\textsf{colorspace}\\\large Version 1.2.0} +\title{\textsf{colorspace}\\\large Version 1.3} \author{Javier Bezos\\\texttt{http://www.texnia.com}} -\date{2016-10-05} - +\date{2019-03-25} + \raggedright \parskip=.8ex \advance\oddsidemargin-.7cm @@ -78,7 +66,7 @@ {\fontsize{48}{48}\selectfont colorspace\par} {\LARGE Spot colors, mixed inks and more\par} \vspace*{1ex} -Version 1.2.0 (2016-10-05)\par +Version 1.3 (2019-03-25)\par Javier Bezos (\texttt{http://www.texnia.com}) \vspace*{6ex} @@ -119,7 +107,9 @@ Heiko Oberdiek. This package is still evolving, but the basic behaviour described here will be preserved in future versions. However, some functions from -\textsf{xcolor} might not work yet (for example \verb|\selectcolormodel|). +\textsf{xcolor} might not work yet (for example +\verb|\selectcolormodel| and the corresponding package options |cmyk| +and the like). Declarations are global and should go in the preamble. @@ -510,7 +500,6 @@ particular example) equivalent: \resetpagecolorspace \end{verbatim} - \end{example} \section{Overprinting} @@ -547,11 +536,28 @@ Since the color stack is used, pdf\TeX{} $\ge$ 1.40 is required. 1.2.0. CIE LAB spot colors and |illuminant|. Manual rewritten. -\end{document} - - - - - +1.3. Fixes several incompatibilities with \textsf{pgf}/\textsf{tikz}. +\end{document} +MIT License +----------- + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Master/texmf-dist/tex/latex/colorspace/colorspace.sty b/Master/texmf-dist/tex/latex/colorspace/colorspace.sty index 376116409c1..40e2948f3be 100644 --- a/Master/texmf-dist/tex/latex/colorspace/colorspace.sty +++ b/Master/texmf-dist/tex/latex/colorspace/colorspace.sty @@ -1,28 +1,13 @@ -% +--------------------------------------------------+ -% | Typeset colorspace.tex to get the documentation. | -% +--------------------------------------------------+ % -%% Copyright (C) 2015-2016 Javier Bezos -%% All Rights Reserved -%% http://www.texnia.com -%% -%% This work may be distributed and/or modified under the conditions -%% of the LaTeX Project Public License, either version 1.3 of this -%% license or (at your option) any later version. The latest version -%% of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2003/12/01 or later. -%% -%% This work has the LPPL maintenance status "maintained". -%% -%% This Current Maintainer of this work is Javier Bezos. -%% -%% This work consists of the files colorspace.tex and colorspace.sty. - -\ProvidesPackage{colorspace} - [2016/10/05 v1.2.0 PDF color spaces (spot colors...) for - pdftex and luatex] +% Copyright (C) 2015-2019 Javier Bezos http://www.texnia.com +% +% This file may be distributed and/or modified under the conditions of +% the MIT License. A version can be found at the end of this file. +% +% Repository: https://github.com/jbezos/colorspace +% + +\ProvidesPackage{colorspace}[2019/03/25 v1.3 PDF color spaces] \edef\spc@savedcatcodes{% \catcode`\noexpand\/=\the\catcode`\/ @@ -49,7 +34,7 @@ \protected\def\spc@Colorstack{\pdfextension colorstack} \def\spc@Colorstackinit{\pdffeedback colorstackinit} \fi - + \def\spc@unknown#1#2{% \@ifundefined{#1}% {\PackageError{colorspace}{Unknown #2}% @@ -73,6 +58,9 @@ \XC@sdef\XC@mod@&spot{&spot} \def\color@&spot#1#2{% + \ifx\spc@ir\@undefined + \expandafter\spc@getref\current@color\@@ + \fi \c@lor@arg{#2}% \edef#1{\spc@ir\space cs \spc@ir\space CS #2 sc #2 SC}} \def\XC@clr@&spot@white{0} @@ -146,7 +134,7 @@ \def\spc@tempd##1,{% comma -> space \ifx\@empty##1\else##1 \expandafter\spc@tempd\fi}% \edef\spc@lab@values{\expandafter\spc@tempd\spc@lab@values,\@empty,}} - + \def\spc@defsc@i#1#2#3#4{% \def\spc@tempc##1 ##2{% Converts spaces to #20 ##1% @@ -183,8 +171,16 @@ \let\spc@elt\relax \xdef\spc@csall{\spc@csall\spc@elt2{#1}}} +% The pgf stuff *must* go before \resetpagecolorspace \AtBeginDocument{% - \ifx\spc@csall\@empty\else % ie, if spot/iccbased colors + \ifx\spc@csall\@empty\else % ie, if spot/iccbased colors only + \ifx\pgf@sys@pgf@resource@list@colorspaces\@undefined\else + \def\spc@everycs{\pgf@sys@pgf@resource@list@colorspaces}% + \edef\spc@tempa{% Remove pgf "static" ColorSpace + \noexpand\spc@remcs\the\spc@Pageresources + \noexpand\spc@remcs{\pgf@sys@pdf@colrospaces@objnum}}% + \spc@tempa + \fi \resetpagecolorspace \fi} @@ -204,7 +200,7 @@ \DeclareOption{illuminant=d55}{\spc@illum@obj{0.9568 1 0.9214}} \DeclareOption{illuminant=d65}{\spc@illum@obj{0.9504 1 1.0888}} \DeclareOption{illuminant=d75}{\spc@illum@obj{0.9497 1 1.2261}} - + % Page color spaces. The arrays mapping the spot colors to the obj % refs are saved into the pdf as objects, and then we also save its % reference for later recovery. Well, \pdfpageresources is not @@ -218,16 +214,18 @@ \let\spc@currcs\@empty \let\spc@cs@\@empty +\let\spc@everycs\@empty + \newcommand\pagecolorspace[1]{% \protected@edef\spc@tempa{{#1}}% \expandafter\spc@pagecs\spc@tempa} \def\spc@pagecs#1{% \ifx\spc@currcs\@empty\else - \edef\tempa{% + \edef\spc@tempa{% \noexpand\spc@remcs\the\spc@Pageresources \noexpand\spc@remcs{\spc@currcs}}% - \tempa + \spc@tempa \fi \let\spc@tempd\@empty % list with known spaces \@for\spc@tempa:=#1\do{% @@ -248,7 +246,7 @@ \fi}% \spc@csall % Uses \spc@elt \@ifundefined{spc@cs@\spc@tempc}% - {\immediate\spc@Obj{<< \spc@tempb>>}% + {\immediate\spc@Obj{<< \spc@everycs\space\spc@tempb>>}% \expandafter\xdef\csname spc@cs@\spc@tempc\endcsname{\the\spc@Lastobj}}% {}% \expandafter\let\expandafter\spc@currcs\csname spc@cs@\spc@tempc\endcsname @@ -534,7 +532,6 @@ /Default\spc@@space\space\the\spc@Lastobj\space 0 R}% \endgroup} - % ==== Overprint/Knokout ==== \DeclareOption{overprint}{\def\spc@op{1}} @@ -568,9 +565,12 @@ \immediate\spc@Obj{<< /Type /ExtGState /op true /OP true /OPM 1 >>}% \edef\spc@tempa{\spc@tempa/SPCop \the\spc@Lastobj\space 0 R }% \immediate\spc@Obj{<< \spc@tempa>>}% -\edef\spc@tempa{\global\spc@Pageresources{\the\spc@Pageresources - \space /ExtGState \the\spc@Lastobj\space 0 R }} -\spc@tempa +\edef\spc@op@saveobj{\the\spc@Lastobj} + +\AtBeginDocument{% + \edef\spc@tempa{\global\spc@Pageresources{\the\spc@Pageresources + \space /ExtGState \spc@op@saveobj\space 0 R }}% + \spc@tempa} \def\spc@setop{% \spc@Colorstack\spc@opstack push{\spc@getop}% @@ -590,3 +590,25 @@ \spc@savedcatcodes \endinput + +MIT License +----------- + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- cgit v1.2.3