-
Notifications
You must be signed in to change notification settings - Fork 3
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
Incompatibility with hyperref
, unknown key in pdfinfo
value
#34
Comments
hyperxmp
hyperref
, unknown key in pdfinfo
value
This seems to work: diff --git a/source/thm-kv.dtx b/source/thm-kv.dtx
index 9fb16c4..36e1356 100644
--- a/source/thm-kv.dtx
+++ b/source/thm-kv.dtx
@@ -101,7 +101,7 @@
\@xa\let\csname ifincsname\@xa\endcsname\csname iftrue\endcsname
\edef\KVS@temp{\endgroup
% 2019/12/22 removed dependency on etexcmds package
- \noexpand\KVS@ProcessorDefault{#1}{\unexpanded{#2}}%
+ \noexpand\KVS@ProcessorDefault{#1}{\unexpanded\expandafter{#2}}%
}%
\KVS@temp
}% A slightly simplified example. \documentclass{article}
\usepackage{thmtools}
\usepackage{hyperref}
\makeatletter
% thm-kv.sty/dtx
\def\kv@processor@default#1#2{%
\begingroup
\csname @safe@activestrue\endcsname
\@xa\let\csname ifincsname\@xa\endcsname\csname iftrue\endcsname
\edef\KVS@temp{\endgroup
% 2019/12/22 removed dependency on etexcmds package
\noexpand\KVS@ProcessorDefault{#1}{\unexpanded\expandafter{#2}}%
}%
\KVS@temp
}%
\makeatother
\hypersetup{
pdfinfo={
% any key unknown to pdfinfo
xxx={Copyright 2023}
},
}
\begin{document}
Hello.
\end{document} Need more time to check if that's the right fix. |
No it may break things. |
With vanilla But \documentclass{article}
\usepackage{keyval, kvsetkeys}
\usepackage{thmtools}
\makeatletter
\define@key{fam}{mykey}{value is \texttt{>>\detokenize{#1}<<}}
\makeatother
\begin{document}
\kvsetkeys{fam}{mykey=myval} % both: "value is >>myval<<"
\def\x{mykey}
\kvsetkeys{fam}{\x=myval} % with thmtools:
% Package kvsetkeys Error: Undefined key `\x '.
% without: "value is >>myval<<"
\def\y{myval}
\kvsetkeys{fam}{mykey=\y} % both: "value is >>\y <<"
\end{document} Unfortunately, in handling unknown keys passed to \kv@parse@normalized{%
\HyInfo@Key={#2}%
}{%
\kv@processor@default{pdfinfo}%
}% Here The patch on Since the author of |
see latex3/hyperref#275. Meanwhile I'll try to provide a workaround, either short- or long-term from |
Thank you for looking into it! I found that as a workaround I can enable pdfmanagement-testphase (and disable
Hm, changing the semantics of commands of a different package like this sounds like asking for compatibility issues. |
Not finally decided yet, but I plan to disable the patches by default, and provide a new package option to turn them on, if any backward compatibility issues are encountered. |
@muzimuzhi Can this be closed? The OP's example no longer produces an error |
thmtools
seems to clash withhyperxmp
. MWE:errors with
Commenting out
\usepackage{thmtools}
or removing theCopyrightNotice
from\hypersetup
solves the issue.(
\PE@edefbabel
seems to be a command from thepdfescape
package, which is transitively loaded by eitherhyperref
orhyperxmp
.)The text was updated successfully, but these errors were encountered: