Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opacity backend code broken for xetex/dvipdfmx #1106

Closed
u-fischer opened this issue Jul 1, 2022 · 0 comments
Closed

opacity backend code broken for xetex/dvipdfmx #1106

u-fischer opened this issue Jul 1, 2022 · 0 comments
Assignees
Labels
bug Something isn't working l3backend Issues with the low-level backend code

Comments

@u-fischer
Copy link
Member

The backend uses in the opacity code for xetex/dvipdfmx in a two place \__kernel_backend_literal:n instead of \__kernel_backend_literal_pdf:n and then opacity doesn't work at all.

\DocumentMetadata{uncompress}
\documentclass{article}
\usepackage{transparent}

\ExplSyntaxOn
\cs_set_protected:Npn \__opacity_backend_select_aux:n #1 % \__opacity_backend_fill_stroke:nn is wrong too.
  {
    \tl_set:Nn \l__opacity_backend_fill_tl {#1}
    \tl_set:Nn \l__opacity_backend_stroke_tl {#1}
    \pdfmanagement_add:nnn { Page / Resources / ExtGState }
      { opacity #1 }
      { << /ca ~ #1 /CA ~ #1 >> }
    \__kernel_backend_literal:n
    %\__kernel_backend_literal_pdf:n %<--- new
      { /opacity #1 ~ gs }
    \group_insert_after:N \__opacity_backend_reset:
  }
  
\ExplSyntaxOff

\begin{document}
\ExplSyntaxOn \showoutput
XXXXXXX%
{\opacity_select:n{0.5}XXXXXXXXXXXX}
XXXXXXX
\ExplSyntaxOff

\end{document}

image

@josephwright josephwright added bug Something isn't working l3backend Issues with the low-level backend code labels Jul 1, 2022
@josephwright josephwright self-assigned this Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working l3backend Issues with the low-level backend code
Projects
None yet
Development

No branches or pull requests

2 participants