summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/doclicense/doclicense.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/doclicense/doclicense.dtx')
-rw-r--r--macros/latex/contrib/doclicense/doclicense.dtx34
1 files changed, 24 insertions, 10 deletions
diff --git a/macros/latex/contrib/doclicense/doclicense.dtx b/macros/latex/contrib/doclicense/doclicense.dtx
index e6520b4d80..f858db9c8d 100644
--- a/macros/latex/contrib/doclicense/doclicense.dtx
+++ b/macros/latex/contrib/doclicense/doclicense.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% SPDX-FileCopyrightText: 2015-2021 Robin Schneider <ypid@riseup.net>
+% SPDX-FileCopyrightText: 2015-2022 Robin Schneider <ypid@riseup.net>
%
% SPDX-License-Identifier: LPPL-1.3c
%
@@ -13,7 +13,7 @@
%<*driver>
\ProvidesFile{doclicense.dtx}
%</driver>
-%<package>% SPDX-FileCopyrightText: 2015-2021 Robin Schneider <ypid@riseup.net>
+%<package>% SPDX-FileCopyrightText: 2015-2022 Robin Schneider <ypid@riseup.net>
%<package>%
%<package>% SPDX-License-Identifier: LPPL-1.3c
%<package>%
@@ -24,7 +24,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1998/12/01]
%<package>\ProvidesPackage{doclicense}
%<*package>
- [2021/07/11 v3.0.0 Support for putting documents under a license]
+ [2022/04/27 v3.1.0 Support for putting documents under a license]
%</package>
%
%<*driver>
@@ -133,10 +133,12 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \printdateTeX{\filed
% \changes{2.0.0}{2020/05/27}{Add 80x15 version of CC images which can be used with the imagemodifier option. Fix slight color offset for all CC images caused by bad image conversion. Thanks to rodrigoalcarazdelaosa for reporting. Fix \cmd{\doclicenseThis} support for twocolumn layouts. Thanks to Nao Pross. Soft require package options "type", "modifier" and "version" now. Defaults are deprecated. This will become a package error in an upcoming major version of the package, with the earliest release in 2021-07 to give people time to migrate. Remove Creative Commons PD which has been replaced by CC-zero as of 2010-10-11. Update example license used for examples in manual to CC-BY-SA-4.0.}
% \changes{2.0.1}{2020/06/26}{Fix backwards compatibility by still accepting imagemodifier={-eu} and imagemodifier={-us}. Thanks to Jürgen Spitzmüller for reporting. Fix ability to modify currency of \cmd{\doclicenseIcon} macro using imagemodifier to Japan currency JP without breaking \cmd{\doclicenseImage}.}
% \changes{2.1.0}{2020/07/26}{Fix regression: Proper language default image variants (Euro variants for example) was broken and the US variant was always used. This bug was introduced in v2.0.0. Documentation fixes. Added Marathi translation.}
-% \changes{2.2.0}{2020/09/18}{Add Japanese and Bulgarian translation. Add hint how to use Chinese to docs. Load hyperxmp by default when it is installed. Before, doclicense just suggested to load it and made use of the package when the user did.}
+% \changes{2.2.0}{2020/09/18}{Add Japanese and Bulgarian translations. Add hint how to use Chinese to docs. Load hyperxmp by default when it is installed. Before, doclicense just suggested to load it and made use of the package when the user did.}
% \changes{2.2.1}{2020/09/25}{Fix compatibility issue with newer versions of hyperxmp (bug confirmed with Tex Live 2020) resulting in an compile error by loading hyperxmp and hyperref in the order the packages expect it.}
% \changes{2.3.0}{2021/03/13}{Add option to disable the use of hyperxmp and add compatibility for pdfx. Use \url{https://reuse.software/} for the doclicense source code itself.}
% \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.}
+%
%
%
% ^^A nag warned about the center environment and it really messes up spacing.
@@ -193,10 +195,10 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \printdateTeX{\filed
% installed, it will be loaded and the options \PrintOptionF{pdflicenseurl}
% and \PrintOptionF{pdfcopyright} will be set by \PackageName{} to the
% corresponding values (\enquote{\url{\doclicenseURL}} and
-% \enquote{\doclicenseLongText{}}). This embeds license metadata into the PDF
-% which proper PDF readers can show. For example Evince shows it in the
-% \enquote{Document License} tab under \enquote{Properties}. You may check
-% this manual for how your PDF reader handles such metadata.
+% \enquote{\doclicenseLongTextForHyperref{}}). This embeds license metadata
+% into the PDF which proper PDF readers can show. For example Evince shows it
+% in the \enquote{Document License} tab under \enquote{Properties}. You may
+% check this manual for how your PDF reader handles such metadata.
%
% In case you are using other packages to manipulate the metadata which is
% incompatible to the use of hyperxmp, e.\,g. \PrintPackage{pdfx} you can use
@@ -271,9 +273,10 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \printdateTeX{\filed
% \item Brazilian
% \item Bulgarian
% \item Catalan
-% \item Chinese: Note that you might need to pass \verb+lang={chinese-utf8}+ or \verb+chinese-gbk+.
+% \item Chinese: Note that you might need to pass \verb+lang={chinese-utf8}+ \verb+lang={chinese-tw}+, or \verb+chinese-gbk+.
% \item Croatian
% \item English
+% \item Esperanto
% \item French
% \item Galician
% \item German
@@ -284,6 +287,7 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \printdateTeX{\filed
% \item Portuguese
% \item Russian
% \item Spanish
+% \item Swedish
% \end{itemize}
%
% Image position for \cmd{\doclicenseThis}: right (default) or left.
@@ -421,6 +425,11 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \printdateTeX{\filed
% Same as \cmd{\doclicenseText} except that it uses the long name of the license.
% Example: \enquote{\doclicenseLongText{}}
%
+% \DescribeMacro{\doclicenseLongTextForHyperref}
+% \hspace{2.5em}Same as \cmd{\doclicenseLongText} except that it does not contain \cmd{\href}
+% and other complex macros. The purpose of this macro is to be used as value inside of \cmd{\hypersetup}.
+% Example: \enquote{\doclicenseLongTextForHyperref{}}
+%
% \DescribeMacro{\doclicensePlainFullText}
% Verbatim prints the full license text.
%
@@ -708,7 +717,7 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \printdateTeX{\filed
\@ifpackageloaded{hyperxmp}{%
% The following options are only defined when the hyperxmp package was loaded.
\hypersetup{%
- pdfcopyright = {\doclicenseLongText},
+ pdfcopyright = {\doclicenseLongTextForHyperref},
pdflicenseurl = {\doclicenseURL},
}
}{}
@@ -835,6 +844,11 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \printdateTeX{\filed
\href{\doclicenseURL}{\doclicenseLongType\space\enquote{\doclicense@longName}}%
\doclicense@lang@word@license.\xspace%
}
+\newcommand{\doclicenseLongTextForHyperref}{%
+ \doclicense@lang@thisDoc\space
+ \doclicenseLongType\space"\doclicense@longName"% chktex 18
+ \doclicense@lang@word@license.%
+}
\newcommand{\doclicenseIcon}{\doclicense@icon\xspace}
\newcommand{\doclicenseTypeIcon}{\doclicenseType}
% \newcommand{\doclicenseModifierIcon}{} % Not directly provided by ccicons.