latex3 / pdfresources

LaTeX PDF resource management
LaTeX Project Public License v1.3c
22 stars 5 forks source link

pdfmanagement-testphase: uncompressed meta leads to error #38

Closed koppor closed 2 years ago

koppor commented 2 years ago

I am trying to use the package authorarchive together with newpax, which requires me to set `\DeclareDocumentMetadata{uncompress

When compiling the following document, I get following error:

! Use of \__text_expand_space:w doesn't match its definition.
\__text_expand_loop:w ...1\q__text_recursion_stop
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{uncompress}
\documentclass{article}

\usepackage[IEEE,
   nocopyright,
   nobib
]{authorarchive}

\begin{document}
Test
\end{document}

This somehow refs https://github.com/latex3/latex3/issues/946, but I could not see how the discussion in that issue helps to fix things here.

When removing \DeclareDocumentMetadata{uncompress}, it works as intended. When removing authorarchive - and replacing it by the packages it requires, the error disappears. I did not find xspace in the code of authorarchive. So, I am a bit lost and don't know how to fix that.

u-fischer commented 2 years ago

The package sets the author and title in hypersetup:

\hypersetup{%
  draft         = false,
  bookmarksopen = true,
  bookmarksnumbered= true,
  pdfauthor     = {\@author},
  pdftitle      = {\@title},
}

both commands are not defined by default and this then fails. Add

\author{author}
\title{title}

before loading the package.

koppor commented 2 years ago

Thank you for the quick and detailed response! - I was confused, because there was no error when \DeclareDocumentMetadata{uncompress} was not present.

u-fischer commented 2 years ago

Thank you for the quick and detailed response! - I was confused, because there was no error when \DeclareDocumentMetadata{uncompress} was not present.

The keys are processed with different methods with the pdfmanagement. But we will discuss how to avoid the error.