Skip to content

Commit

Permalink
move code so that stack int is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Jan 16, 2021
1 parent 24a1ee2 commit 3097686
Showing 1 changed file with 44 additions and 43 deletions.
87 changes: 44 additions & 43 deletions l3backend/l3backend-color.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,50 @@
% state generally. The exact form depends on the engine, and for
% \texttt{dvipdfmx}/\XeTeX{} the backend version.
%
% \subsubsection{\LuaTeX{} and \pdfTeX{}}
%
% \begin{macrocode}
%<*dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \begin{variable}{\l_@@_backend_stack_int}
% \pdfTeX{}, \LuaTeX{} and recent \texttt{(x)dvipdfmx} have multiple stacks
% available, and to track which one is in use a variable is required.
% \begin{macrocode}
\int_new:N \l_@@_backend_stack_int
% \end{macrocode}
% \end{variable}
%
% \begin{macro}
% {
% \@@_backend_select_cmyk:n ,
% \@@_backend_select_gray:n ,
% \@@_backend_select_rgb:n
% }
% \begin{macro}{\@@_backend_reset:}
% Simply dump the data, but allowing for \LuaTeX{}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select_cmyk:n #1
{ \@@_backend_select:n { #1 ~ k ~ #1 ~ K } }
\cs_new_protected:Npn \@@_backend_select_gray:n #1
{ \@@_backend_select:n { #1 ~ g ~ #1 ~ G } }
\cs_new_protected:Npn \@@_backend_select_rgb:n #1
{ \@@_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
\cs_new_protected:Npn \@@_backend_select:n #1
{
\@@_backend_stack_push:nn \l_@@_backend_stack_int {#1}
\group_insert_after:N \@@_backend_reset:
}
\cs_new_protected:Npn \@@_backend_reset:
{ \@@_backend_stack_pop:n \l_@@_backend_stack_int }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macrocode}
%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \subsubsection{\texttt{dvipdfmx}/\XeTeX{}}
%
% \begin{macrocode}
Expand Down Expand Up @@ -360,49 +404,6 @@
%</dvips|dvisvgm>
% \end{macrocode}
%
% \subsubsection{\LuaTeX{} and \pdfTeX{}}
%
% \begin{macrocode}
%<*dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \begin{variable}{\l_@@_backend_stack_int}
% \pdfTeX{}, \LuaTeX{} and recent \texttt{(x)dvipdfmx} have multiple stacks
% available, and to track which one is in use a variable is required.
% \begin{macrocode}
\int_new:N \l_@@_backend_stack_int
% \end{macrocode}
% \end{variable}
%
% \begin{macro}
% {
% \@@_backend_select_cmyk:n ,
% \@@_backend_select_gray:n ,
% \@@_backend_select_rgb:n
% }
% \begin{macro}{\@@_backend_reset:}
% Simply dump the data, but allowing for \LuaTeX{}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select_cmyk:n #1
{ \@@_backend_select:n { #1 ~ k ~ #1 ~ K } }
\cs_new_protected:Npn \@@_backend_select_gray:n #1
{ \@@_backend_select:n { #1 ~ g ~ #1 ~ G } }
\cs_new_protected:Npn \@@_backend_select_rgb:n #1
{ \@@_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
\cs_new_protected:Npn \@@_backend_select:n #1
{
\@@_backend_stack_push:nn \l_@@_backend_stack_int {#1}
\group_insert_after:N \@@_backend_reset:
}
\cs_new_protected:Npn \@@_backend_reset:
{ \@@_backend_stack_pop:n \l_@@_backend_stack_int }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macrocode}
%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \subsubsection{\texttt{dvipmdfx}/\XeTeX{}}
%
Expand Down

0 comments on commit 3097686

Please sign in to comment.