summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/doclicense
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-11 20:25:20 +0000
committerKarl Berry <karl@freefriends.org>2021-07-11 20:25:20 +0000
commit5aac655a15407ac11084a7f01ab9660a00123ba3 (patch)
tree344b77bedf299bce6cf5e4b28af410605c5cacf9 /Master/texmf-dist/tex/latex/doclicense
parentf89b5a8fe8c09cc3ac09a394ef71ef2311ff08e7 (diff)
doclicense (11jul21)
git-svn-id: svn://tug.org/texlive/trunk@59899 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/doclicense')
-rw-r--r--Master/texmf-dist/tex/latex/doclicense/doclicense-croatian.ldf30
-rw-r--r--Master/texmf-dist/tex/latex/doclicense/doclicense-spanish.ldf24
-rw-r--r--Master/texmf-dist/tex/latex/doclicense/doclicense.sty115
3 files changed, 108 insertions, 61 deletions
diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense-croatian.ldf b/Master/texmf-dist/tex/latex/doclicense/doclicense-croatian.ldf
new file mode 100644
index 00000000000..d1c15bb7f12
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/doclicense/doclicense-croatian.ldf
@@ -0,0 +1,30 @@
+% SPDX-FileCopyrightText: 2021 Paula <paulavidas@gmail.com>
+%
+% SPDX-License-Identifier: LPPL-1.3c
+%
+% This work consists of all files listed in manifest.txt.
+% For more details about the licensing, refer to the README.md file.
+
+\ProvidesFile{doclicense-croatian.ldf}
+
+\@namedef{doclicense@lang@thisDoc}{Ovo djelo je dano na korištenje pod licencom}%
+\@namedef{doclicense@lang@word@license}{}%
+
+\@namedef{doclicense@lang@lic@CC@code}{hr}%
+% Using: https://en.wikipedia.org/wiki/ISO_639-1
+
+\@namedef{doclicense@lang@lic@CC@zero@1.0}{CC0 1.0 Univerzalno}%
+
+\@namedef{doclicense@lang@lic@CC@by@3.0}{Imenovanje 3.0 Hrvatska}%
+\@namedef{doclicense@lang@lic@CC@by-sa@3.0}{Imenovanje-Dijeli pod istim uvjetima 3.0 Hrvatska}%
+\@namedef{doclicense@lang@lic@CC@by-nd@3.0}{Imenovanje-Bez prerada 3.0 Hrvatska}%
+\@namedef{doclicense@lang@lic@CC@by-nc@3.0}{Imenovanje-Nekomercijalno 3.0 Hrvatska}%
+\@namedef{doclicense@lang@lic@CC@by-nc-sa@3.0}{Imenovanje-Nekomercijalno-Dijeli pod istim uvjetima 3.0 Hrvatska}%
+\@namedef{doclicense@lang@lic@CC@by-nc-nd@3.0}{Imenovanje-Nekomercijalno-Bez prerada 3.0 Hrvatska}%
+
+\@namedef{doclicense@lang@lic@CC@by@4.0}{Imenovanje 4.0 međunarodna}%
+\@namedef{doclicense@lang@lic@CC@by-sa@4.0}{Imenovanje-Dijeli pod istim uvjetima 4.0 međunarodna}%
+\@namedef{doclicense@lang@lic@CC@by-nd@4.0}{Imenovanje-Bez prerada 4.0 međunarodna}%
+\@namedef{doclicense@lang@lic@CC@by-nc@4.0}{Imenovanje-Nekomercijalno 4.0 međunarodna}%
+\@namedef{doclicense@lang@lic@CC@by-nc-sa@4.0}{Imenovanje-Nekomercijalno-Dijeli pod istim uvjetima 4.0 međunarodna}%
+\@namedef{doclicense@lang@lic@CC@by-nc-nd@4.0}{Imenovanje-Nekomercijalno-Bez prerada 4.0 međunarodna}%
diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense-spanish.ldf b/Master/texmf-dist/tex/latex/doclicense/doclicense-spanish.ldf
index 726defd6729..22b158f4def 100644
--- a/Master/texmf-dist/tex/latex/doclicense/doclicense-spanish.ldf
+++ b/Master/texmf-dist/tex/latex/doclicense/doclicense-spanish.ldf
@@ -15,16 +15,16 @@
\@namedef{doclicense@lang@lic@CC@zero@1.0}{CC0 1.0 Universal}%
-\@namedef{doclicense@lang@lic@CC@by@3.0}{Reconocimiento 3.0 España}%
-\@namedef{doclicense@lang@lic@CC@by-sa@3.0}{Reconocimiento-CompartirIgual 3.0 España}%
-\@namedef{doclicense@lang@lic@CC@by-nd@3.0}{Reconocimiento-SinObraDerivada 3.0 España}%
-\@namedef{doclicense@lang@lic@CC@by-nc@3.0}{Reconocimiento-NoCommercial 3.0 España}%
-\@namedef{doclicense@lang@lic@CC@by-nc-sa@3.0}{Reconocimiento-NoCommercial-CompartirIgual 3.0 España}%
-\@namedef{doclicense@lang@lic@CC@by-nc-nd@3.0}{Reconocimiento-NoCommercial-NoDerivs 3.0 España}%
+\@namedef{doclicense@lang@lic@CC@by@3.0}{Atribución 3.0 No portada}%
+\@namedef{doclicense@lang@lic@CC@by-sa@3.0}{Atribución-CompartirIgual 3.0 No portada}%
+\@namedef{doclicense@lang@lic@CC@by-nd@3.0}{Atribución-SinDerivadas 3.0 No portada}%
+\@namedef{doclicense@lang@lic@CC@by-nc@3.0}{Atribución-NoComercial 3.0 No portada}%
+\@namedef{doclicense@lang@lic@CC@by-nc-sa@3.0}{Atribución-NoComercial-CompartirIgual 3.0 No portada}%
+\@namedef{doclicense@lang@lic@CC@by-nc-nd@3.0}{Atribución-NoComercial-SinDerivadas 3.0 No portada}%
-\@namedef{doclicense@lang@lic@CC@by@4.0}{Reconocimiento 4.0 Internacional}%
-\@namedef{doclicense@lang@lic@CC@by-sa@4.0}{Reconocimiento-CompartirIgual 4.0 Internacional}%
-\@namedef{doclicense@lang@lic@CC@by-nd@4.0}{Reconocimiento-SinObraDerivada 4.0 Internacional}%
-\@namedef{doclicense@lang@lic@CC@by-nc@4.0}{Reconocimiento-NoCommercial 4.0 Internacional}%
-\@namedef{doclicense@lang@lic@CC@by-nc-sa@4.0}{Reconocimiento-NoCommercial-CompartirIgual 4.0 Internacional}%
-\@namedef{doclicense@lang@lic@CC@by-nc-nd@4.0}{Reconocimiento-NoCommercial-SinObraDerivada 4.0 Internacional}%
+\@namedef{doclicense@lang@lic@CC@by@4.0}{Atribución 4.0 Internacional}%
+\@namedef{doclicense@lang@lic@CC@by-sa@4.0}{Atribución-CompartirIgual 4.0 Internacional}%
+\@namedef{doclicense@lang@lic@CC@by-nd@4.0}{Atribución-SinDerivadas 4.0 Internacional}%
+\@namedef{doclicense@lang@lic@CC@by-nc@4.0}{Atribución-NoComercial 4.0 Internacional}%
+\@namedef{doclicense@lang@lic@CC@by-nc-sa@4.0}{Atribución-NoComercial-CompartirIgual 4.0 Internacional}%
+\@namedef{doclicense@lang@lic@CC@by-nc-nd@4.0}{Atribución-NoComercial-SinDerivadas 4.0 Internacional}%
diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense.sty b/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
index 1a34bc17db7..45393bd99f1 100644
--- a/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
+++ b/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
@@ -8,8 +8,7 @@
\NeedsTeXFormat{LaTeX2e}[1998/12/01]
\ProvidesPackage{doclicense}
- [2021/03/13 v2.3.0 Support for putting documents under a license]
-
+ [2021/07/11 v3.0.0 Support for putting documents under a license]
\RequirePackage{kvoptions}
\DeclareStringOption{type}
@@ -39,7 +38,7 @@
\renewcommand{\labelenumiv}{(\roman{enumiv})}%
}{\end{enumerate}}
-\ifthenelse{
+\ifthenelse{%
\equal{\doclicense@hyphenation}{}
}{}{%
\RequirePackage{ragged2e}
@@ -50,35 +49,35 @@
}
}
\AtEndPreamble{%
- \@ifpackageloaded{csquotes}{
+ \@ifpackageloaded{ccicons}{}{\RequirePackage{ccicons}}
+ % For \doclicenseIcon
+ \@ifpackageloaded{graphicx}{}{\RequirePackage{graphicx}}
+ % For \doclicenseImage
+ \@ifpackageloaded{hyperref}{}{\RequirePackage{hyperref}}
+ \@ifpackageloaded{csquotes}{%
% csquotes has already been loaded so we are fine.
- }{
- \ifcsdef{enquote}{
+ }{%
+ \ifcsdef{enquote}{%
% \enquote is defined but not by csquotes.
- \@ifpackageloaded{biblatex}{
+ \@ifpackageloaded{biblatex}{%
\PackageError{doclicense}{The enquote macro is defined by biblatex}
{This package assumes that the enquote macro is defined by the
csquotes package. Please load csquotes before you load biblatex so
that biblatex does not define enquote instead.}%
- }{
- \PackageError{doclicense}{The enquote macro is defined by unknown package}
+ }{%
+ \PackageError{doclicense}{The enquote macro is defined by an unknown package}
{This package assumes that the enquote macro is defined by the
csquotes package. Please check why enquote is defined without
csquotes being loaded. Maybe try loading csquotes early so that it
can define the enquote macro instead.}%
}
- }{
+ }{%
\RequirePackage{csquotes}
}
}
- \@ifpackageloaded{ccicons}{}{\RequirePackage{ccicons}}
- % For \doclicenseIcon
- \@ifpackageloaded{graphicx}{}{\RequirePackage{graphicx}}
- % For \doclicenseImage
- \@ifpackageloaded{hyperref}{}{\RequirePackage{hyperref}}
- \@ifpackageloaded{hyperxmp}{
+ \@ifpackageloaded{hyperxmp}{%
% The following options are only defined when the hyperxmp package was loaded.
- \hypersetup{
+ \hypersetup{%
pdfcopyright = {\doclicenseLongText},
pdflicenseurl = {\doclicenseURL},
}
@@ -87,51 +86,62 @@
\ifdoclicense@hyperxmp
\@ifpackageloaded{pdfx}{%
\PackageWarning{doclicense}{%
- The pdfx package was detected. Therefore the mechanism to add license
- metadata won't work. Ensure to setup \string\Copyright\space and
- corresponding settings to your xmpdata-file.
- }
- }{
- \IfFileExists{hyperxmp.sty}{
- \@ifpackageloaded{hyperxmp}{}{\RequirePackage{hyperxmp}}
- }{
+ The pdfx package was detected. Therefore the mechanism to add license
+ metadata won't work. Ensure to setup \string\Copyright\space%
+ and corresponding settings to your xmpdata-file.
+ }
+ }{%
+ \@ifpackageloaded{silence}{%
\PackageWarning{doclicense}{%
- The hyperxmp package is missing so no license metadata can be embedded
- into the PDF. Consider installing hyperxmp.% chktex 13
+ The silence package was detected. hyperxmp and silence are not% chktex 12
+ compatible with each other so doclicense will not load hyperxmp as long
+ as you load silence. Therefore the mechanism to add license metadata
+ won't work. Consider to compile the final version of your document
+ without silence so that you can benefit from hyperxmp while still being
+ able to filter log messages for your draft versions.
+ }
+ \@ifpackageloaded{hyperxmp}{%
+ \PackageError{doclicense}{silence and hyperxmp were manually loaded together}{%
+ Error out because those packages together result in an endless loop.
+ }%
+ }{}
+ }{%
+ \IfFileExists{hyperxmp.sty}{%
+ \@ifpackageloaded{hyperxmp}{}{\RequirePackage{hyperxmp}}
+ }{%
+ \PackageWarning{doclicense}{%
+ The hyperxmp package is missing so no license metadata can be embedded
+ into the PDF. Consider installing hyperxmp.% chktex 13
+ }
}
}
}
\fi
-\ifthenelse{
+\ifthenelse{%
\equal{\doclicense@type}{}
-}{
- \PackageWarning{doclicense}{%
- "type" package option missing. % chktex 18
+}{%
+ \PackageError{doclicense}{"type" package option missing}{% chktex 18
This option is now required and the fallback to "CC" is deprecated. % chktex 18
In an upcoming major version of doclicense, this will be a package error.
Please explicitly pick a license of your choosing.
}
- \renewcommand{\doclicense@type}{CC}
}{}
-\ifthenelse{
+\ifthenelse{%
\equal{\doclicense@modifier}{}
-}{
- \PackageWarning{doclicense}{%
- "modifier" package option missing. % chktex 18
+}{%
+ \PackageError{doclicense}{"modifier" package option missing}{% chktex 18
This option is now required and the fallback to "by-sa" is deprecated. % chktex 18
In an upcoming major version of doclicense, this will be a package error.
Please explicitly pick a license of your choosing.
}
- \renewcommand{\doclicense@modifier}{by-sa}
}{}
-\ifthenelse{
+\ifthenelse{%
\equal{\doclicense@version}{}
-}{
- \PackageWarning{doclicense}{%
- "version" package option missing. % chktex 18
+}{%
+ \PackageError{doclicense}{"version" package option missing}{% chktex 18
This option is now required and the fallback is deprecated. % chktex 18
In an upcoming major version of doclicense, this will be a package error.
Please explicitly pick a license of your choosing.
@@ -247,9 +257,16 @@
\IfFileExists{doclicense-\doclicense@lang.ldf}{%
\input{doclicense-\doclicense@lang.ldf}% chktex 27
}{%
- \PackageWarning{doclicense}{%
- No language definition for \doclicense@lang found.
- Please add one and submit a patch. Using English as fallback.
+ \ifthenelse{\equal{\doclicense@lang}{nil}}{%
+ \PackageWarning{doclicense}{%
+ The language of your document is not defined. Please refer to the babel or polyglossia
+ package to see how to define it. Using English as fallback.
+ }
+ }{%
+ \PackageWarning{doclicense}{%
+ No language definition for \doclicense@lang\space
+ found. Consider adding one and submit it to doclicense. Using English as fallback.
+ }
}
\renewcommand{\doclicense@lang}{english}
\input{doclicense-\doclicense@lang.ldf}% chktex 27
@@ -312,7 +329,7 @@
\renewcommand{\doclicense@imagemodifier}{-88x31}% chktex 29
}{}
}{}
- \ifthenelse{\equal{\doclicense@modifier}{by-nc-sa}}{
+ \ifthenelse{\equal{\doclicense@modifier}{by-nc-sa}}{%
\renewcommand{\doclicense@icon}{\ccbyncsa}
\IfBeginWith{\doclicense@imagemodifier}{-eu}{%
\renewcommand{\doclicense@icon}{\ccbyncsaeu}
@@ -322,7 +339,7 @@
\renewcommand{\doclicense@imagemodifier}{-88x31}% chktex 29
}{}
}{}
- \ifthenelse{\equal{\doclicense@modifier}{by-nc-nd}}{
+ \ifthenelse{\equal{\doclicense@modifier}{by-nc-nd}}{%
\renewcommand{\doclicense@icon}{\ccbyncnd}
\IfBeginWith{\doclicense@imagemodifier}{-jp}{%
\renewcommand{\doclicense@icon}{\ccbyncndjp}
@@ -338,13 +355,13 @@
\doclicense@modifier/%
\doclicense@versionUsed\doclicense@UrlLangPart}
}{}
- \ifthenelse{\equal{\doclicense@modifier}{pd}}{
- \PackageError{doclicense}{CC PD license removed as of version 2.0.0}{
+ \ifthenelse{\equal{\doclicense@modifier}{pd}}{%
+ \PackageError{doclicense}{CC PD license removed as of version 2.0.0}{%
Creative Commons PD has been replaced by CC-zero.
Please update your license choice.
}%
}{}
- \IfSubStr{\doclicense@modifier}{nc}{}{
+ \IfSubStr{\doclicense@modifier}{nc}{}{%
% eu (Euro) does only exist for nc (non commercial) so if not nc then reset -eu.
\IfBeginWith{\doclicense@imagemodifier}{-eu}{%
\renewcommand{\doclicense@imagemodifier}{-88x31}% chktex 29