Skip to content

Commit

Permalink
fix: put \hypersetup inside of \AtBeginDocument to ensure fully loaded
Browse files Browse the repository at this point in the history
Closes: #104
  • Loading branch information
ypid committed Oct 1, 2023
1 parent 6c2d9c7 commit 1b97904
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions doclicense/doclicense.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,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.}
% \changes{3.3.0}{2022/10/XX}{Add Austrian, Greek and Swiss German translations. Put \hypersetup inside of \AtBeginDocument to ensure it is fully loaded.}
%
%
%
Expand Down Expand Up @@ -722,9 +722,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},
}
}
}{}
}
Expand Down

0 comments on commit 1b97904

Please sign in to comment.