From f62693d673c94c6152cc131e08c3320dbfe99a56 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Wed, 6 Sep 2023 21:10:37 +0200 Subject: [PATCH] fix: put \hypersetup inside of \AtBeginDocument to ensure fully loaded Closes: #104 --- doclicense/doclicense.dtx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doclicense/doclicense.dtx b/doclicense/doclicense.dtx index 490186b..c50cd46 100644 --- a/doclicense/doclicense.dtx +++ b/doclicense/doclicense.dtx @@ -141,7 +141,7 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \printdateTeX{\filed % \changes{3.0.0}{2021/07/11}{Breaking change: Hard require package options "type", "modifier" and "version" now after one year in soft require migration period. Add Croatian translation. Add sections to docs about choosing a license and the REUSE specification. Update Spanish translation to match Creative Commons website. Add note to README that CC license texts and images are licensed themselves under CC0-1.0. Load csquotes after hyperref to avoid hyperref warning. Do not load the hyperxmp package if the silence package is loaded to avoid an endless loop. Improve warning messages generated by the package. Add "Dependency packages and load order" section to docs.} % \changes{3.1.0}{2022/04/27}{Add macro \cmd{\doclicenseLongTextForHyperref} and use it inside \cmd{\hypersetup} to replace the fagile code that was previously used. Add Traditional Chinese (Taiwan), Swedish and Esperanto translations.} % \changes{3.2.0}{2022/05/18}{Add Ukrainian translation.} -% \changes{3.3.0}{2022/10/XX}{Add Austrian, Greek and Swiss German translations. Document available CC modifiers because it was not clear that to select CC0 the "zero" modifier must be used. Fix typo in Brazilian translation.} +% \changes{3.3.0}{2022/10/XX}{Add Austrian, Greek and Swiss German translations. Document available CC modifiers because it was not clear that to select CC0 the "zero" modifier must be used. Fix typo in Brazilian translation. Put \hypersetup inside of \AtBeginDocument to ensure it is fully loaded.} % % % @@ -734,9 +734,11 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \printdateTeX{\filed } \@ifpackageloaded{hyperxmp}{% % The following options are only defined when the hyperxmp package was loaded. - \hypersetup{% - pdfcopyright = {\doclicenseLongTextForHyperref}, - pdflicenseurl = {\doclicenseURL}, + \AtBeginDocument{% + \hypersetup{% + pdfcopyright = {\doclicenseLongTextForHyperref}, + pdflicenseurl = {\doclicenseURL}, + } } }{} }