summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3color.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3color.dtx39
1 files changed, 36 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
index 7201aac2abc..6fca2d5caf0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/05/29}
+% \date{Released 2017/07/15}
%
% \maketitle
%
@@ -70,12 +70,33 @@
% \begin{syntax}
% \cs{color_ensure_current:}
% \end{syntax}
-% Ensures that material inside a box will use the foreground color
+% Ensures that material inside a box uses the foreground color
% at the point where the box is set, rather than that in force when the
% box is used. This function should usually be used within a
% \cs{color_group_begin:} \ldots \cs{color_group_end:} group.
% \end{function}
%
+% \subsection{Internal functions}
+%
+% \begin{variable}[added = 2017-06-15]{\l__color_current_tl}
+% The color currently active for foreground (text, \emph{etc.}) material.
+% This is stored in the form of a color model followed by one or more
+% values in the range $[0,1]$: these determine the color. The model and
+% applicable data format must be one of the following:
+% \begin{itemize}
+% \item \texttt{gray \meta{gray}} Grayscale color with the \meta{gray}
+% value running from $0$ (fully black) to $1$ (fully white)
+% \item \texttt{cmyk \meta{cyan} \meta{magenta} \meta{yellow} \meta{black}}
+% \item \texttt{rgb \meta{red} \meta{green} \meta{blue}}
+% \end{itemize}
+% Notice that the value are separated by spaces.
+% \begin{texnote}
+% This format is the native one for \texttt{dvips} color specials:
+% other drivers are expected to convert to their own format when
+% writing color data to output.
+% \end{texnote}
+% \end{variable}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -105,10 +126,22 @@
% current color \enquote{now}.
% \begin{macrocode}
\cs_new_protected:Npn \color_ensure_current:
- { \__driver_color_ensure_current: }
+ {
+ \__driver_color_ensure_current:
+ \group_insert_after:N \__driver_color_reset:
+ }
% \end{macrocode}
% \end{macro}
%
+% \begin{variable}{\l__color_current_tl}
+% The current color: the format here is taken from \texttt{dvips} but it
+% is easy enough to convert to \texttt{pdfmode} as required.
+% \begin{macrocode}
+\tl_new:N \l__color_current_tl
+\tl_set:Nn \l__color_current_tl { gray~0 }
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}