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

! Undefined control sequence. #66

Closed
jotagah opened this issue Sep 20, 2020 · 7 comments · Fixed by #68
Closed

! Undefined control sequence. #66

jotagah opened this issue Sep 20, 2020 · 7 comments · Fixed by #68
Labels

Comments

@jotagah
Copy link

jotagah commented Sep 20, 2020

Greetings!

Today, after your last update (Sept, 19), I got an error message when compiling the same latex file I compiled with success before (using tufte-handout template):

"! Undefined control sequence. \hyxmp@dc@langs"

that seems is due the new default loaded hyperxmp style: (from VS Code):

{
"resource": "/usr/local/texlive/2020/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty",
"owner": "LaTeX",
"severity": 8,
"message": "Undefined control sequence.\n \hyxmp@detect@langs \n",
"source": "LaTeX",
"startLineNumber": 407,
"startColumn": 1,
"endLineNumber": 407,
"endColumn": 65536
}

In my preamble I have:

\usepackage[brazilian]{babel}
usepackage[
type={CC},
modifier={by-nc-nd},
version={3.0},
]{doclicense}

Best,

J.

@ypid
Copy link
Owner

ypid commented Sep 21, 2020

Hi, thank you for testing and reporting this so quickly after the release! I am able to reproduce this with the latest hyperxmp package version. Old versions still work fine (from TeX Live 2018 from Debian buster) that is why I did not notice it. I probably need a better test matrix, tracked in #67.

The issue seems to be the order in which I load the hyperxmp package related to the \hypersetup call. hyperxmp docs:

To use hyperxmp, merely put a \textbackslash usepackage{hyperxmp} in your document's preamble. That line can appear anywhere before the hyperref pdf options are specified (i.e., with either \textbackslash usepackage[. . . ]{hyperref} or \textbackslash hypersetup{. . . }).

But I don’t have a fully working patch ready. Hopefully within the next days so that you can test it and I can release this as hot fix to CTAN.

@jotagah
Copy link
Author

jotagah commented Sep 24, 2020

Hello ypid,

Unfortunatelly I got the same error:

Undefined control sequence.
\hyxmp@dc@lang

I downloaded your new release (2020/09/18 v2.2.1.dev) and unzipped it to my local texmf directory. An excerpt from \listfiles:

...
doclicense.sty 2020/09/18 v2.2.1.dev Support for putting documents under a license
xspace.sty 2014/10/28 v1.13 Space after command names (DPC,MH)
doclicense-brazilian.ldf
ccicons.sty 2017/10/30 v1.6 LaTeX support for Creative Commons icons
hyperxmp.sty 2020/06/19 v5.4 Store hyperref metadata in XMP format
...

Best,

J.

@ypid
Copy link
Owner

ypid commented Sep 24, 2020

My bad, you probably downloaded the master branch. I also pushed the post-release version bump to this branch. It does not have the fix yet. Try https://github.com/ypid/latex-packages/archive/fix-66.zip

@jotagah
Copy link
Author

jotagah commented Sep 24, 2020

Hello.

Well, last time I downloaded the same version number you sent attached for me.

I unzipped it and compiled with the same error message:

Undefined control sequence.
\hyxmp@dc@lang

With \listfiles I got:

doclicense.sty 2020/09/18 v2.2.1.dev Support for putting documents under a license
xspace.sty 2014/10/28 v1.13 Space after command names (DPC,MH)
doclicense-brazilian.ldf
ccicons.sty 2017/10/30 v1.6 LaTeX support for Creative Commons icons
hyperxmp.sty 2020/06/19 v5.4 Store hyperref metadata in XMP format

After deleted your new release all works again, and, from \listfiles:

doclicense.sty 2020/07/26 v2.1.0 Support for putting documents under a license
xspace.sty 2014/10/28 v1.13 Space after command names (DPC,MH)
doclicense-brazilian.ldf
ccicons.sty 2017/10/30 v1.6 LaTeX support for Creative Commons icons

I also tested loading the hyperxmp package just before your doclicense, and there was no errors. From \listfiles:

hyperxmp.sty 2020/06/19 v5.4 Store hyperref metadata in XMP format
ifdraft.sty 2016/05/16 v1.4 Detect class options draft and final (HO)
doclicense.sty 2020/07/26 v2.1.0 Support for putting documents under a license
xspace.sty 2014/10/28 v1.13 Space after command names (DPC,MH)
doclicense-brazilian.ldf
babel-brazilian.tex
babel-portuguese-brazil.tex
ccicons.sty 2017/10/30 v1.6 LaTeX support for Creative Commons icons

[ ]’s,

J.

ypid added a commit that referenced this issue Sep 24, 2020
Load order must be precise because hyperxmp also installs a hook with \AtEndPreamble same as we do. Now our hook needs to be executed before then one of hyperxmp because hyperxmp checks if hyperref is loaded and if it does not at the point where hyperxmp checks, it will do nothing.
@ypid
Copy link
Owner

ypid commented Sep 24, 2020

Thanks for testing. I dug deeper into it and read one relevant part of the hyperxmp implementation and I think I understand the issue now. I updated #66. You may test the zip file again.

Details:

Load order must be precise because hyperxmp also installs a hook with \AtEndPreamble same as we do. Now our hook needs to be executed before the one of hyperxmp because hyperxmp checks if hyperref is loaded and if it does not at the point where hyperxmp checks, it will do nothing.

Worth noting that hyperref should be loaded as one of the last packages. That is one of the reasons I do this trick with \AtEndPreamble.

ypid added a commit that referenced this issue Sep 24, 2020
Load order must be precise because hyperxmp also installs a hook with \AtEndPreamble same as we do. Now our hook needs to be executed before then one of hyperxmp because hyperxmp checks if hyperref is loaded and if it does not at the point where hyperxmp checks, it will do nothing.
@jotagah
Copy link
Author

jotagah commented Sep 25, 2020

Greetings,

You fixed it. Congratulations

And thanks.

J.

@ypid ypid closed this as completed in b860f7d Sep 25, 2020
@ypid ypid closed this as completed in #68 Sep 25, 2020
@ypid
Copy link
Owner

ypid commented Sep 25, 2020

Thanks to you :) I released it to CTAN just now.

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

Successfully merging a pull request may close this issue.

2 participants