ypid / latex-packages

My LaTeX Packages.
https://ctan.org/author/schneider-r
25 stars 22 forks source link

doclicense: option to disable xmp to be compatible with pdfx #69

Closed TeXhackse closed 3 years ago

TeXhackse commented 3 years ago

We are currently facing an incompatibility between pdfx and hyperxmp which is no surprise because both add xmp-metadata. (@zhtaihao reported via https://github.com/tudace/tuda_latex_templates/issues/294)

I was wondering if it would be ok if there would be an option to disable the automatically adding of xmpdata maybe even the hyperref settings (most likely both independently of each other).

This would make the usage more flexible and the package usable for templates to create specific PDF standards.

I don't think it's a good idea to blame pdfx/hyperxmp with this because both should not be used in combination. But if doclicense could provide an option one could disable the loading of hyperxmp and the stick to the own metadata configuration.

I could provide a pull request but wanted to first know about your opinion. Currently one can avoid this by disabling \hyxmp@at@end or the similar mechanism of pdfx.

ypid commented 3 years ago

I am fine with adding options to disable loading/interacting of both of these packages with two separate options. doclicense could also check if pdfx is loaded at the end of the preamble and if yes, doclicense backs off and does not attempt to load hyperxmp. What do you think about adding this kind of auto detection? Want to give it a try in a pull request?

Ref: #63 (that you already referenced https://github.com/tudace/tuda_latex_templates/issues/294). It got me into trouble after all, but nothing that cannot be solved :)

TeXhackse commented 3 years ago

auto detection can of course be used to change the mechanism to pdfx if that one is loaded.

Thing is hyperref will also ignore the data by doclicense if the field already set and throw a warning, this might confuse users. Therefore I suggest to add both. It's not a big change anyway. I'll prepare a PR tomorrow. Then you can have a look.

TeXhackse commented 3 years ago

Release is done and available via CTAN.