diff options
author | Karl Berry <karl@freefriends.org> | 2016-09-13 21:51:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-09-13 21:51:46 +0000 |
commit | 451d03eed1f677a1c576f8b701e4068b42fd9039 (patch) | |
tree | 68ed5b0e1ae8a31aea634b31cb32479e2a2a3739 /Master/texmf-dist/doc | |
parent | a8951d1db45ca51c96ffa2c431777eb37c8a2f94 (diff) |
colorspace (13sep16)
git-svn-id: svn://tug.org/texlive/trunk@42053 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/colorspace/README | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/colorspace/colorspace.pdf | bin | 104967 -> 1602098 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/colorspace/colorspace.tex | 285 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/colorspace/colorspaceshade.png | bin | 0 -> 16162 bytes |
4 files changed, 220 insertions, 71 deletions
diff --git a/Master/texmf-dist/doc/latex/colorspace/README b/Master/texmf-dist/doc/latex/colorspace/README index 8f6fbab7dce..879142307a7 100644 --- a/Master/texmf-dist/doc/latex/colorspace/README +++ b/Master/texmf-dist/doc/latex/colorspace/README @@ -8,7 +8,7 @@ PDF color spaces. Currently, it supports: * ICC based default CMYK, RGB and Gray spaces * overprinting -It requires xcolor and currently only pdftex and luatex. +It requires xcolor and currently only supports pdftex and luatex. For example, to define a spot color, just say: @@ -20,4 +20,6 @@ Those docs, like the package itself, are still somewhat tentative, but the basic behaviour described here will be preserved in future versions. -2015-06-01
\ No newline at end of file +Version 1.1.1 is compatible with luatex 0.95 + +2016-06-19
\ 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 Binary files differindex 52984c76f63..1f281e82080 100644 --- a/Master/texmf-dist/doc/latex/colorspace/colorspace.pdf +++ b/Master/texmf-dist/doc/latex/colorspace/colorspace.pdf diff --git a/Master/texmf-dist/doc/latex/colorspace/colorspace.tex b/Master/texmf-dist/doc/latex/colorspace/colorspace.tex index eae643f99a8..6613c07c94a 100644 --- a/Master/texmf-dist/doc/latex/colorspace/colorspace.tex +++ b/Master/texmf-dist/doc/latex/colorspace/colorspace.tex @@ -2,9 +2,9 @@ % | Typeset this file to get the documentation. | % +--------------------------------------------------+ % -%% Copyright (C) 2015 Javier Bezos +%% Copyright (C) 2015-2016 Javier Bezos %% All Rights Reserved -%% http://www.tex-tipografia.com +%% 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 @@ -19,50 +19,109 @@ %% This Current Maintainer of this work is Javier Bezos. %% %% This work consists of the files colorspace.tex and colorspace.sty. -\documentclass{article} +\documentclass[a4paper]{ltxguide} -\title{\textsf{colorspace}\\\large Version 1.1.0} +\title{\textsf{colorspace}\\\large Version 1.1.1} - \author{Javier Bezos\\\texttt{http://www.tex-tipografia.com}} +\author{Javier Bezos\\\texttt{http://www.texnia.com}} + +\date{2016-09-12} \raggedright -\parskip=1ex +\parskip=.8ex + +\newif\ifcolorspace +\newif\iftikz + +\usepackage{graphicx} + +\IfFileExists{colorspace.sty}{% + \usepackage{colorspace}% + \definespotcolor{foo}{BarTone 555 GN}{.8,.2,.5,.3}% + \definespotcolor{foob}{BarTone 666 GN}[rgb]{.8, .2, .4}% +% + \definecolorspace{fooshaded}{mixed}{foo,black}% +% + \definecolor{sfoo}{fooshaded}{1,0} + \definecolor{sblack}{fooshaded}{0,1} + \definecolorseries{shseries}{fooshaded}{last}{sfoo!40}{sblack} + \colorspacetrue}{} -\date{2015-06-01} +\IfFileExists{tikz.sty}{% + \catcode`|=12 + \usepackage{tikz}% + \catcode`|=\active + \tikztrue}{} + +\def\showclr#1#{\testclr{#1}} +\def\testclr#1#2{{\fboxsep0pt\fbox{\colorbox#1{#2}{\phantom{XX}}}}} \begin{document} \maketitle +The aim of this package is, as the name implies, to provide tools for +PDF color spaces. It requires \textsf{xcolor}, which is loaded if it +has not been before. It seems to work with \textsf{tikz}. + +Currently it supports what I think are the most common tools: +\begin{itemize} +\item Spot colors, with a clean user interface, and including tints + (with the |!| notation). +\item Proper switching of color spaces. +\item Mixed spot and process colors (up to 4), like shades (ie, a spot + color with black). +\item ICC based default CMYK, RGB and Gray spaces. +\item Overprinting (across pages, using the color stack). +\end{itemize} +Currently only \textsf{pdftex} and \textsf{luatex} are +supported. Support for \textsf{xetex} is on the `to do' list, but due +to the limitations of this engine this task is somewhat challenging +and I'm not sure all features will be implemented. + +Other functions related to the PDF color spaces (indexed, calibrated, +Lab spaces) are not yet suported, but they are under study. Calibrated +colors, although not directly supported, can be defined with an ICC +profile created with +LPROF\footnote{\texttt{http://lprof.sourceforge.net/}} and then +assigned to a default space as described below. + +They apply to text and line art only, not external images. For the +latter, \textsf{graphicx} provides a plea of (undocumented) +transformations: \texttt{interpolate}, \texttt{decodearray}, +\texttt{maskarray}, \texttt{intent}, \texttt{ocobjnum}, and +\texttt{ocobjref}. For transparencies, see \textsf{transparent}, by +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|). + +Declarations are global and should go in the preamble. + This package is built on the previous attempts to provide spot colors and other additional features by Jens Elstner, Stephan Lehmke and Siep -Kroonenberg (with some inspiration from \textsf{ConTeXt}, too). It -requires \textsf{xcolor}, which is loaded if it has not been before. - -It provides a clean user interface, with a single command for defining -a spot color. It seems to work with \textsf{tikz}. Currently only -\textsf{pdftex} and \textsf{luatex} are supported. - -Mixing spot colors (with process colors or other spots colors) is -supported to some extent (see below). You can also assign ICC profiles -to the default CMYK, RGB and Gray spaces. Other functions related to -the PDF color spaces (indexed, calibrated, Lab spaces) are not yet -suported, but they are\texttt{} under study. They apply to text and -line art only, not external images. Declarations are global. Using -\verb|\selectcolormodel| does not work yet. - -Those docs, like the package itself, are still somewhat tentative (as -you very likely have noticed), but the basic behaviour described here -will be preserved in future versions. +Kroonenberg (with some inspiration from \textsf{ConTeXt}, too). -For transparencies, see \textsf{transparent}, by Heiko Oberdiek. +It does not provide a list of Pantone, TrueMatch, Folcoltone, Toyo, +etc., colors. Currently you can find quite easily CMYK equivalents on +the web, and after all they are intended to be used with a +``physical'' palette (and not, as sometimes done, just picking a color +just because looks nice on screen). \section{Spot colors} +\begin{decl} +|\definespotcolor{<latex-name>}{<PDF-name>}{<CMYK-equivalent>}| +\end{decl} + Write, for example: \begin{verbatim} -\definespotcolor{foo}{BarTone 555 GN}{.3,.4,.5,.6} +\definespotcolor{foo}{BarTone 555 GN}{.8,.2,.5,.3} \end{verbatim} +\ifcolorspace + for \showclr{foo}. +\fi That's all. Here \verb|foo| is the \LaTeX{} name, as used in \verb|\color| and the like, \verb|BarTone 555 GN| is the PDF name @@ -73,10 +132,13 @@ file, while the PDF knows nothing about the \LaTeX{} name. You can use tints as usual in \textsf{xcolor}, like: \begin{verbatim} -\color{foo!60} -\colorlet{foo60}{foo!60} +\color{foo!50} +\colorlet{foo60}{foo!50} \end{verbatim} -and even set tints from other tints. To mix inks, see below. +\ifcolorspace + which would produce \showclr{foo!50}, and +\fi +even set tints from other tints. To mix inks, see below. The special PDF names \verb|All| (for all plates) and \verb|None| work as expected: @@ -84,24 +146,23 @@ as expected: \definespotcolor{registration}{All}{1,1,1,1} \end{verbatim} -Internally, only CMYK is used, but you can define the equivalent color -with another name space, which is then converted: -\begin{verbatim} -\definespotcolor{foo}{BarTone 555 GN}[rgb]{.5, .4, .3} -\end{verbatim} - -To change the color space for a page and the subsequent ones, you can -set something like: +Internally, only CMYK is used for the equivalent color, but you can define +the latter with another name space, which is then converted: \begin{verbatim} -\pagecolorspace{name1,name2,name3} +\definespotcolor{foob}{BarTone 666 GN}[rgb]{.8, .2, .4} \end{verbatim} -(It can be empty.) To return to the default color space, which -contains all the defined spot colors, use \verb|\resetpagecolorspace|. -Use this macro with care, because of the asynchronous nature of \TeX{} --- remember it affects the whole current page. +\ifcolorspace +which yields \showclr{foob}. +\fi +Remember as far PDF is concerned a spot color is a color space on its +own. \section{Mixing spot colors} +\begin{decl} + |\definecolorspace{<latex-name>}{mixed}{<color-list>}| +\end{decl} + To mix spot colors you must first declare a color space (or model) including them. This is done with something like: \begin{verbatim} @@ -115,24 +176,27 @@ in addition yellow: \end{verbatim} A typical usage, for shades, would be: \begin{verbatim} -\definecolorspace{shaded1}{mixed}{spot1,black} +\definecolorspace{fooshaded}{mixed}{foo,black} \end{verbatim} -Due to internal limitations of \textsf{xcolor}, no more than four -colors are allowed. The alternate color space in the PDF file is that -of the spot colors (which means currently it is CMYK). - Then, you can define a color with: \begin{verbatim} \definecolor{mix12y}{spot12y}{.5,.4,.6} -\definecolor{sh1}{shaded1}{.6,.3} +\definecolor{darkfoo}{fooshaded}{.6,.3} \end{verbatim} or set it with \begin{verbatim} \color[spot12y]{.5,.4,.3} -\color[shaded1]{.6,.3} +\color[fooshaded]{.6,.3} \end{verbatim} -As in spot colors, the only operation allowed is \verb|!| for tints + +Due to internal limitations of \textsf{xcolor}, no more than four +colors are allowed. + +The alternate color space in the PDF file is that of the spot colors +(which means currently it is CMYK). + +As with spot colors, the only operation allowed is \verb|!| for tints (ie, \verb|color!num|). But there is an easy trick to mix colors with \verb|!| and \verb|color,num| -- just define an ortogonal set of colors based on the new color model: @@ -147,47 +211,125 @@ and then you can say: \color{spot12y:xspot1,3;xspot2,2;xyellow,1} \end{verbatim} Of course, it is just a trick and a better and direct interface is -under study. +under study (none of those provided by \textsf{xcolor} fits really +with the new |mixed| models). -Color series are also partially supported. For example: +Color series (see the \textsf{xcolor} documentation) are also +partially supported. For example: \begin{verbatim} \definecolorseries{test}{spot12y}{grad}[spot12y]{.95,.85,.55}{3,11,17} \definecolorseries{test}{spot12y}{last}{xyellow!50}{xspotA} \end{verbatim} -(The key is not to mix the new model with other color models.) +\ifcolorspace +Here is a example with some of the described +techniques, based on the |fooshaded| space defined above (figure 1 +shows the |foo| plate): + +\begin{verbatim} +\definecolor{sfoo}{fooshaded}{1,0} +\definecolor{sblack}{fooshaded}{0,1} +\definecolorseries{shseries}{fooshaded}{last}{sfoo!40}{sblack} +\def\testclr#1{{\fboxsep0pt\fbox{\colorbox{#1}{\phantom{XX}}}}} +\resetcolorseries[8]{shseries} +\begin{tabular}{cccccccc} +0 \testclr{shseries!!+} & +1 \testclr{shseries!!+} & +2 \testclr{shseries!!+} & +3 \testclr{shseries!!+} & +4 \testclr{shseries!!+} & +5 \testclr{shseries!!+} & +6 \testclr{shseries!!+} & +7 \testclr{shseries!!+} +\end{tabular} +\end{verbatim} + +\begingroup +\def\testclr#1{{\fboxsep0pt\fbox{\colorbox{#1}{\phantom{XX}}}}} +\resetcolorseries[8]{shseries} +\begin{tabular}{cccccccc} +0 \testclr{shseries!!+} & +1 \testclr{shseries!!+} & +2 \testclr{shseries!!+} & +3 \testclr{shseries!!+} & +4 \testclr{shseries!!+} & +5 \testclr{shseries!!+} & +6 \testclr{shseries!!+} & +7 \testclr{shseries!!+} +\end{tabular} +\endgroup +\fi + +\begin{figure} +\fbox{\includegraphics[width=\linewidth]{colorspaceshade.png}} +\caption{Plate for the \texttt{foo} spot color as shown by Adobe +Acrobat. Note the \texttt{foob} spot color defined in this document +is listed, too.} +\end{figure} + +The key is not to mix a |mixed| model with other color models. + +\section{Page color spaces} + +Each PDF page must know which colors will be used (other than the +predefined CMYK, RGB and Gray). By default, \textsf{colorspace} turn +on for every page all newly defined colors, and that will be fine in +most cases. However, you may want to set explicitly the list. Use this +feature with care, because (1) the asynchronous nature of \TeX{} +(remember it affects the whole current page), and (2) each +distinct color list creates a PDF resource. + +\begin{decl} +|\pagecolorspace{<color-list>}|\\ +|\resetpagecolorspace| +\end{decl} + +To change the color space for a page and the subsequent ones, you can +set something like: +\begin{verbatim} +\pagecolorspace{name1,name2,name3} +\end{verbatim} +(It can be empty.) To return to the default color space, which +contains all the defined spot colors, use \verb|\resetpagecolorspace|. \section{ICC Based spaces} +\begin{decl} + |\definecolorspace*{<latex-name>}{iccbased}{<icc-file>}| +\end{decl} The starred version \verb|\definecolorspace*| does not define a new color model, but sets the behaviour of the three basic color spaces -(\verb|cmyk|, \verb|rgb| and \verb|gray|). When belonging to the same -space, the last one for that space takes precedence. It cannot be used -to define new colors or set them. Currently, only a type is supported -- -\verb|iccbased|. For example, +(CMYK, RGB and Gray). When belonging to the same space, the last +definition for that space takes precedence and its considered the +default one. It cannot be used to define new colors or set +them. Currently, only a type is supported -- \verb|iccbased|. For +example, \begin{verbatim} \definecolorspace*{sRGB}{iccbased}{sRGB Profile.icc} \end{verbatim} -The space it applies to is read from the ICC profile. The name can be -used in \verb|\pagecolorspace| (and must, if you want it to be -active). Alternatively, there are 3 reserved names: \verb|*rgb|, -\verb|*gray|, \verb|*cmyk|, which stand for the current default -spaces. The former are not set by \verb|\resetpagecolorspace|, but the -starred named are. +The space it applies to is read from the ICC profile. Note those ICC spaces does not go to the output intent dictionary (see the \textsf{pdfx} package). The latter, as the PDF reference explains, supplements rather than replaces the ICC profiles in a default color space. +The name can be used in \verb|\pagecolorspace|. Alternatively, there +are 3 reserved names: \verb|*rgb|, \verb|*gray|, \verb|*cmyk|, which +stand for the current default spaces. Named ICC based spaces are not +set by \verb|\resetpagecolorspace|, but the starred named are. On the +other hand, the starred names are not set automatically by +|\pagecolorspace|, and you must set them explicitly if you want them +to be active. + \section{Overprinting} -This is usually a pre-print task, but by setting it in the document you -will get a better idea of how the colors are actually -overlapped. However, remember the effect produced is device-dependent, -and colorant overprint decisions should be made at output time -(according to the PDF reference). +This is usually a pre-print task, but by setting it in the document +you will get a better idea of how the colors are actually overlapped +in soft proofing. However, remember the effect produced is +device-dependent, and colorant overprint decisions should be made at +output time (according to the PDF reference). Very often, it is set for the whole document with the package options \verb|knockout| (no overprint), and \verb|overprint|. By default, the @@ -204,6 +346,11 @@ something like: Since the color stack is used, pdf\TeX{} $\ge$ 1.40 is required. +\section{Version} + +1.1.1. No new features. Just internal changes related to +\textsc{luatex} and new manual. + \end{document} diff --git a/Master/texmf-dist/doc/latex/colorspace/colorspaceshade.png b/Master/texmf-dist/doc/latex/colorspace/colorspaceshade.png Binary files differnew file mode 100644 index 00000000000..0c500a5429b --- /dev/null +++ b/Master/texmf-dist/doc/latex/colorspace/colorspaceshade.png |