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

Colour issue in LuaLaTeX when using \DocumentMetadata #50

Open
juhaszp95 opened this issue Apr 24, 2023 · 2 comments
Open

Colour issue in LuaLaTeX when using \DocumentMetadata #50

juhaszp95 opened this issue Apr 24, 2023 · 2 comments

Comments

@juhaszp95
Copy link

juhaszp95 commented Apr 24, 2023

Hello,

I'm trying to include a pdf figure in a document compiled with LuaLaTeX. When the figure is included without \DocumentMetadata, the colours come out correctly. (I need \DocumentMetadata to use newpax.) The above MWE also produces the correct colours if run in pdfLaTeX (but I need Lua). The figure uses transparency, which might be the source of the issue.

MWE:

\DocumentMetadata{}
\documentclass{article}
\usepackage{graphicx}

\begin{document}	
	\includegraphics{periodic bec.pdf}
\end{document}

The included figure (Inkscape svg and the exported PDF) is available here. Any help would be greatly appreciated. I view the created PDF in Adobe Reader.

@u-fischer
Copy link
Member

hm, it is triggered by the pdfxid entries in the XMP-metadata. If you use \DocumentMetadata{xmp=false} is disappears (and with hyperxmp one gets it too). But I have no idea why simply declaring the xmp name space should trigger this change in Adobe Reader.

The difference between pdflatex and lualatex is that the first adds a /Group entry to the page resources. So the following works then in lualatex too:

\DocumentMetadata{}
\documentclass{article}
\usepackage{graphicx}
\ExplSyntaxOn
\sys_if_engine_luatex:T
 {
   \pdfmanagement_add:nnn{Page}{Group}
    {
     <<
      /CS /DeviceRGB
      /I~true
      /S /Transparency
      /Type /Group
     >>
    }
 }   
\ExplSyntaxOff

\begin{document}	
	\includegraphics{periodic bec.pdf}
\end{document}

@juhaszp95
Copy link
Author

Interesting. Many thanks for this, this indeed fixes my problem. I guess this is a bug, but I don't know in what exactly; if you think this is not within this package, then feel free to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants