summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/doclicense
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-02-07 23:06:57 +0000
committerKarl Berry <karl@freefriends.org>2015-02-07 23:06:57 +0000
commite403fce86352a3e5e4e88a69797f92d56d9092e5 (patch)
tree17ea799aced6e396b6e394f067b659c17a507757 /Master/texmf-dist/tex/latex/doclicense
parent37dec022fdcd75249dbaba944c4e3105b7b31323 (diff)
doclicense (7feb15)
git-svn-id: svn://tug.org/texlive/trunk@36228 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/doclicense')
-rw-r--r--Master/texmf-dist/tex/latex/doclicense/doclicense-english.ldf1
-rw-r--r--Master/texmf-dist/tex/latex/doclicense/doclicense-german.ldf4
-rw-r--r--Master/texmf-dist/tex/latex/doclicense/doclicense.sty38
3 files changed, 31 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense-english.ldf b/Master/texmf-dist/tex/latex/doclicense/doclicense-english.ldf
index d294f4390a4..91f5e21f95a 100644
--- a/Master/texmf-dist/tex/latex/doclicense/doclicense-english.ldf
+++ b/Master/texmf-dist/tex/latex/doclicense/doclicense-english.ldf
@@ -5,6 +5,7 @@
\edef\doclicense@lang@code{en}%
\edef\doclicense@lang@lic@CC@code{}%
+\expandafter\edef\csname doclicense@lang@lic@CC@by@3.0\endcsname{Attribution 3.0 Unported}%
\expandafter\edef\csname doclicense@lang@lic@CC@by-sa@3.0\endcsname{Attribution-ShareAlike 3.0 Unported}%
\expandafter\edef\csname doclicense@lang@lic@CC@by-nd@3.0\endcsname{Attribution-NoDerivs 3.0 Unported}%
\expandafter\edef\csname doclicense@lang@lic@CC@by-nc@3.0\endcsname{Attribution-NonCommercial 3.0 Unported}%
diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense-german.ldf b/Master/texmf-dist/tex/latex/doclicense/doclicense-german.ldf
index 4b15649f0fd..e0a62c0fd34 100644
--- a/Master/texmf-dist/tex/latex/doclicense/doclicense-german.ldf
+++ b/Master/texmf-dist/tex/latex/doclicense/doclicense-german.ldf
@@ -3,8 +3,12 @@
\edef\doclicense@lang@thisDoc{Dieses Werk ist lizenziert unter einer}%
\edef\doclicense@lang@word@license{Lizenz}%
\edef\doclicense@lang@code{de}%
+\ifthenelse{\equal{\doclicense@imagemodifier}{}}{%
+ \edef\doclicense@imagemodifier{-eu}
+}{}
\edef\doclicense@lang@lic@CC@code{deed.de}%
+\expandafter\edef\csname doclicense@lang@lic@CC@by@3.0\endcsname{Namensnennung 3.0 Deutschland}%
\expandafter\edef\csname doclicense@lang@lic@CC@by-sa@3.0\endcsname{Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Deutschland}%
\expandafter\edef\csname doclicense@lang@lic@CC@by-nd@3.0\endcsname{Namensnennung-Keine Bearbeitung 3.0 Deutschland}%
\expandafter\edef\csname doclicense@lang@lic@CC@by-nc@3.0\endcsname{Namensnennung-Nicht kommerziell 3.0 Deutschland}%
diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense.sty b/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
index e63c59e191c..70b4b74eeb9 100644
--- a/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
+++ b/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
@@ -1,7 +1,7 @@
%% See file 'doclicense.dtx' for copyright and license.
\NeedsTeXFormat{LaTeX2e}[1998/12/01]
\ProvidesPackage{doclicense}
- [2015/02/06 v0.8 Set and print the license of a document]
+ [2015/02/07 v0.9 Set and print the license of a document]
%% Dependencies {{{
\RequirePackage{kvoptions}
@@ -23,6 +23,7 @@
\DeclareStringOption[by-sa]{modifier}
\DeclareStringOption{version}
\DeclareStringOption{lang}
+\DeclareStringOption{imagemodifier}
\DeclareStringOption[10em]{imagewidth}
%% }}}
@@ -34,7 +35,8 @@
\newboolean{doclicense@licenseKnown}
\newlength{\doclicense@hsize}
\newcommand{\doclicense@longName}{%
- \csname doclicense@lang@lic@\doclicense@type @\doclicense@modifier @\doclicense@versionUsed\endcsname
+ \csname doclicense@lang@lic@\doclicense@type @\doclicense@modifier%
+ @\doclicense@versionUsed\endcsname
}
\newcommand{\doclicense@icon}{%
\PackageError{doclicense}{Icon not defined}
@@ -47,7 +49,8 @@
\newcommand{\doclicenseLongType}{}
\newcommand{\doclicenseModifier}{\MakeUppercase{\doclicense@modifier}\xspace}
\newcommand{\doclicenseVersion}{\doclicense@versionUsed\xspace}
-\newcommand{\doclicenseName}{\doclicense@type~\doclicense@modifier~\doclicense@versionUsed\xspace}
+\newcommand{\doclicenseName}{%
+ \doclicense@type~\doclicense@modifier~\doclicense@versionUsed\xspace}
\newcommand{\doclicenseNameRef}{\href{\doclicenseURL}{\doclicenseName}\xspace}
\newcommand{\doclicenseLongName}{\doclicenseLongType\space\doclicense@longName\xspace}
\newcommand{\doclicenseLongNameRef}{\href{\doclicenseURL}{\doclicenseLongName}}
@@ -65,11 +68,12 @@
\setkeys{doclicense}{#1}
\href{\doclicenseURL}{%
\includegraphics[width=\doclicense@imagewidth]%
- {doclicense-\doclicense@type-\doclicense@modifier}%
+ {doclicense-\doclicense@type-\doclicense@modifier\doclicense@imagemodifier}%
}
}
-\newcommand{\doclicenseLicense}{
+\newcommand{\doclicenseLicense}{\doclicenseThis} %% legacy support
+\newcommand{\doclicenseThis}{
\setlength{\doclicense@hsize}{\textwidth-\doclicense@imagewidth-2em}
\ifthenelse{\lengthtest{\hsize > \vsize}}{%% landscape
\setlength{\doclicense@hsize}{\doclicense@hsize-10em}
@@ -92,7 +96,9 @@
\IfFileExists{doclicense-\doclicense@lang.ldf}{%
\input{doclicense-\doclicense@lang.ldf}
}{%
- \PackageWarning{doclicense}{No language definition for \doclicense@lang not found. Please add one and submit a patch. Using English as fallback.}
+ \PackageWarning{doclicense}{%
+ No language definition for \doclicense@lang not found.
+ Please add one and submit a patch. Using English as fallback.}
\renewcommand{\doclicense@lang}{english}
\input{doclicense-\doclicense@lang.ldf}
}
@@ -126,18 +132,25 @@
licenses/%
\doclicense@modifier/%
\doclicense@versionUsed\doclicense@UrlLangPart}
- \ifthenelse{\equal{\doclicense@modifier}{by-sa}}
- {\renewcommand{\doclicense@icon}{\ccbysa}}{}
- \ifthenelse{\equal{\doclicense@modifier}{by-nd}}
- {\renewcommand{\doclicense@icon}{\ccbynd}}{}
- \ifthenelse{\equal{\doclicense@modifier}{by-nc}}
- {\renewcommand{\doclicense@icon}{\ccbync}}{}
+ \ifthenelse{\equal{\doclicense@modifier}{by-sa}}{%
+ \renewcommand{\doclicense@icon}{\ccbysa}
+ \renewcommand{\doclicense@imagemodifier}{}
+ }{}
+ \ifthenelse{\equal{\doclicense@modifier}{by-nd}}{%
+ \renewcommand{\doclicense@icon}{\ccbynd}
+ \renewcommand{\doclicense@imagemodifier}{}
+ }{}
+ \ifthenelse{\equal{\doclicense@modifier}{by-nc}}{%
+ \renewcommand{\doclicense@icon}{\ccbync}
+ \renewcommand{\doclicense@imagemodifier}{}
+ }{}
\ifthenelse{\equal{\doclicense@modifier}{by-nc-sa}}
{\renewcommand{\doclicense@icon}{\ccbync}}{}
\ifthenelse{\equal{\doclicense@modifier}{by-nc-nd}}
{\renewcommand{\doclicense@icon}{\ccbync}}{}
\ifthenelse{\equal{\doclicense@modifier}{zero}}{%
\renewcommand{\doclicense@icon}{\cczero}
+ \renewcommand{\doclicense@imagemodifier}{}
\doclicense@setVersion[1.0]
\edef\doclicenseURL{%
\doclicense@baseUrlCC/%
@@ -147,6 +160,7 @@
}{}
\ifthenelse{\equal{\doclicense@modifier}{pd}}{
\renewcommand{\doclicense@icon}{\ccpd}
+ \renewcommand{\doclicense@imagemodifier}{}
\doclicense@setVersion[1.0]
\edef\doclicenseURL{%
\doclicense@baseUrlCC/%