Skip to content

Commit

Permalink
Support multiple separations for dvips
Browse files Browse the repository at this point in the history
We need to expand the ref. number in the right place.
  • Loading branch information
josephwright committed Aug 12, 2021
1 parent 9ed9491 commit a740dd7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
3 changes: 3 additions & 0 deletions l3backend/CHANGELOG.md
Expand Up @@ -6,6 +6,9 @@ this project uses date-based 'snapshot' version identifiers.

## [Unreleased]

### Fixed
- Support for multiple separations with `dvips`

## [2021-02-18]

### Changed
Expand Down
31 changes: 22 additions & 9 deletions l3backend/l3backend-color.dtx
Expand Up @@ -490,6 +490,11 @@
% \@@_backend_separation_init:nxxnn,
% \@@_backend_separation_init_aux:nnnnn
% }
% \begin{macro}
% {
% \@@_backend_separation_init:nnnnnn ,
% \@@_backend_separation_init_aux:nnnnnn
% }
% \begin{macro}[EXP]
% {
% \@@_backend_separation_init_/DeviceCMYK:nnn ,
Expand All @@ -515,23 +520,30 @@
{
\bool_if:NT \g__kernel_backend_header_bool
{
\cs_if_exist:NTF \AtBeginDvi
{ \exp_not:N \AtBeginDvi }
{ \use:n }
{
\exp_not:N \@@_backend_separation_init_aux:nnnnn
{#1} {#2} {#3} {#4} {#5}
}
\exp_not:N \exp_args:Ne
\exp_not:N \@@_backend_separation_init:nnnnnn
{ \exp_not:N \int_use:N \g_@@_model_int }
{#1} {#2} {#3} {#4} {#5}
}
}
\cs_generate_variant:Nn \@@_backend_separation_init:nnnnn { nxx }
\cs_new_protected:Npn \@@_backend_separation_init_aux:nnnnn #1#2#3#4#5
\cs_new_protected:Npx \@@_backend_separation_init:nnnnnn #1#2#3#4#5#6
{
\cs_if_exist:NTF \AtBeginDvi
{ \exp_not:N \AtBeginDvi }
{ \use:n }
{
\exp_not:N \@@_backend_separation_init_aux:nnnnnn
{#2} {#3} {#4} {#5} {#6} {#1}
}
}
\cs_new_protected:Npn \@@_backend_separation_init_aux:nnnnnn #1#2#3#4#5#6
{
\__kernel_backend_literal:e
{
!
TeXDict ~ begin ~
/color \int_use:N \g_@@_model_int
/color #6
{
[ ~
/Separation ~ ( \str_convert_pdfname:n {#1} ) ~
Expand Down Expand Up @@ -709,6 +721,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@@_backend_devicen_init:nnn}
% Trivial as almost all of the work occurs in the shared code.
Expand Down

0 comments on commit a740dd7

Please sign in to comment.