From c394414696e3895403a2f2d599cee160e10d38de Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 7 Oct 2017 22:11:56 +0000 Subject: doclicense (7oct17) git-svn-id: svn://tug.org/texlive/trunk@45495 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/doclicense/README | 2 +- .../texmf-dist/doc/latex/doclicense/doclicense.pdf | Bin 392753 -> 394301 bytes .../source/latex/doclicense/doclicense.dtx | 71 ++++++++++++++------- .../tex/latex/doclicense/doclicense-italian.ldf | 27 ++++++++ .../tex/latex/doclicense/doclicense-russian.ldf | 24 +++++++ .../texmf-dist/tex/latex/doclicense/doclicense.sty | 47 ++++++++++---- 6 files changed, 134 insertions(+), 37 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/doclicense/doclicense-italian.ldf create mode 100644 Master/texmf-dist/tex/latex/doclicense/doclicense-russian.ldf diff --git a/Master/texmf-dist/doc/latex/doclicense/README b/Master/texmf-dist/doc/latex/doclicense/README index e6bbc5a4b32..4ec01252ea4 100644 --- a/Master/texmf-dist/doc/latex/doclicense/README +++ b/Master/texmf-dist/doc/latex/doclicense/README @@ -1,6 +1,6 @@ LaTeX package 'doclicense' ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Copyright (C) 2015 by Robin Schneider +Copyright (C) 2015-2017 by Robin Schneider This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/doc/latex/doclicense/doclicense.pdf b/Master/texmf-dist/doc/latex/doclicense/doclicense.pdf index 5170d8f92df..85dc1ae3160 100644 Binary files a/Master/texmf-dist/doc/latex/doclicense/doclicense.pdf and b/Master/texmf-dist/doc/latex/doclicense/doclicense.pdf differ diff --git a/Master/texmf-dist/source/latex/doclicense/doclicense.dtx b/Master/texmf-dist/source/latex/doclicense/doclicense.dtx index 61d24e5cc4c..88b48180cd4 100644 --- a/Master/texmf-dist/source/latex/doclicense/doclicense.dtx +++ b/Master/texmf-dist/source/latex/doclicense/doclicense.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2015 by Robin Schneider +% Copyright (C) 2015-2017 by Robin Schneider % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -27,7 +27,7 @@ %\NeedsTeXFormat{LaTeX2e}[1998/12/01] %\ProvidesPackage{doclicense} %<*package> - [2016/04/24 v1.5.0 Support for putting documents under a license] + [2017/10/07 v1.6.0 Support for putting documents under a license] % % %<*driver> @@ -122,6 +122,8 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \filedate.}} % \changes{1.4.0}{2015/12/13}{Added \cmd{\doclicensePlainFullText} and \cmd{\doclicenseFullText} macros Thanks to \href{https://github.com/siefkenj}{siefkenj} for the help.} % \changes{1.4.1}{2016/04/10}{Translation fixes for: fr, en-gb. Included missing CC-by-nc-nd icon (US dollar).} % \changes{1.5.0}{2016/04/24}{Allow to change the way text is typeset by \cmd{\doclicenseThis}.} +% \changes{1.6.0}{2017/10/07}{Added Russian and Italian translation. Added `imageposition` and `imagedistance` parameters.} +%% ^^A \changes{1.7.0}{2017/XX/XX}{} % %% ^^A nag warned about the center environment and it really messes up spacing. % @@ -192,13 +194,13 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \filedate.}} % % \section{Package options} % -% The first parameter is \enquote{\PrintOptionF{type}}. \DescribePara{type} -% This sets the license type. Like in this example, the type can be +% Sets the license type. \DescribePara{type} +% Like in the previous example, the type can be % \enquote{CC} to cover all the \doclicenseLongType licenses. % Please make sure that the type is all uppercase. See the \nameref{sec:supported-licenses} section for a complete list. % -% The \DescribePara{modifier} next parameter is \enquote{\PrintOptionF{modifier}} which allows to -% select different subclasses of a license. In this +% Allows to +% select different subclasses of a license. In the % example it is \enquote{by-sa}. % Please make sure that the type is all lowercase. See the \nameref{sec:supported-licenses} section for a complete list. % @@ -217,13 +219,21 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \filedate.}} % \item[English] Added by \href{https://github.com/ypid}{Robin Schneider}. % \item[French] Added by \href{https://github.com/ericguirbal}{\'Eric Guirbal}. % \item[German] Added by \href{https://github.com/ypid}{Robin Schneider}. +% \item[Italian] Added by \href{https://github.com/rig8f}{Filippo Rigotto}. +% \item[Russian] Added by \href{https://github.com/bergentroll}{Anton Karmanov}. % \item[Spanish] Added by \href{https://github.com/elsudano}{Carlos}. % \end{eqlist} % +% Image position for \cmd{\doclicenseThis}: right (default) or left. +% \DescribePara{imageposition} +% % Default image width for the license image. % \DescribePara{imagewidth} % -% This options was added to support variations in the license images. +% Distance between text and image in \cmd{\doclicenseThis}. +% \DescribePara{imagedistance} + +% Select different variations of license images. % \DescribePara{imagemodifier} % For example, Creative Commons provides sometimes more than one image for one version. % See the \href{https://creativecommons.org/about/downloads}{donwload page}. @@ -369,7 +379,7 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \filedate.}} % |\doclicenseImage[imagewidth=2em]| % \end{quote} % -% The images are bundled with the \PackageName package as vector graphics. +% The images are bundled with the \PackageName{} package as vector graphics. % % \DescribeMacro{\doclicenseImageFileName} % This macro expands to the file name of the image which the @@ -461,7 +471,9 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \filedate.}} \DeclareStringOption{version} \DeclareStringOption{lang} \DeclareStringOption{imagemodifier} +\DeclareStringOption[right]{imageposition} \DeclareStringOption[10em]{imagewidth} +\DeclareStringOption[2em]{imagedistance} \DeclareStringOption{hyphenation} %% ))) @@ -532,7 +544,7 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \filedate.}} %% ))) % \end{macrocode} -% \subsection{Macro user macros} +% \subsection{User macros} % \begin{macrocode} %% User macros ((( \newcommand{\doclicenseType}{\doclicense@type\xspace} @@ -583,26 +595,41 @@ corresponds to \PackageName\nobreakspace\fileversion, dated \filedate.}} \newcommand{\doclicenseLicense}{\doclicenseThis} %% legacy support \newcommand{\doclicenseThis}{% - \setlength{\doclicense@hsize}{\textwidth-\doclicense@imagewidth-2em}% + \setlength{\doclicense@hsize}{\textwidth-\doclicense@imagewidth-\doclicense@imagedistance}% + \ifthenelse{\equal{\doclicense@imageposition}{left}}{% + \begin{center} + \begin{minipage}{\doclicense@imagewidth} + \doclicenseImage% + \end{minipage} + \hfill + \begin{minipage}{\doclicense@hsize} + \ifthenelse{\isempty{\doclicense@hyphenation}}{}{% + \@nameuse{\doclicense@hyphenation}% + }% + \doclicenseLongText% + \end{minipage} + \end{center} + }{% % \ifthenelse{\isnamedefined{iflandscape}}{% % \iflandscape{% % \setlength{\doclicense@hsize}{\doclicense@hsize-10em}% % }{}% % }{}% % {% - \begin{center} - \begin{minipage}{\doclicense@hsize} - \ifthenelse{\isempty{\doclicense@hyphenation}}{}{% - \@nameuse{\doclicense@hyphenation}% - }% - \doclicenseLongText% - \end{minipage} - \hfill - \begin{minipage}{\doclicense@imagewidth} - \doclicenseImage% - \end{minipage} - \end{center} + \begin{center} + \begin{minipage}{\doclicense@hsize} + \ifthenelse{\isempty{\doclicense@hyphenation}}{}{% + \@nameuse{\doclicense@hyphenation}% + }% + \doclicenseLongText% + \end{minipage} + \hfill + \begin{minipage}{\doclicense@imagewidth} + \doclicenseImage% + \end{minipage} + \end{center} % } + } } %% ))) diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense-italian.ldf b/Master/texmf-dist/tex/latex/doclicense/doclicense-italian.ldf new file mode 100644 index 00000000000..b1ea45f46c1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/doclicense/doclicense-italian.ldf @@ -0,0 +1,27 @@ +\ProvidesFile{doclicense-italian.ldf} + +\@namedef{doclicense@lang@thisDoc}{Quest'opera è distribuita con Licenza}% +\@namedef{doclicense@lang@word@license}{}% +\ifthenelse{\equal{\doclicense@imagemodifier}{}}{% + \@namedef{doclicense@imagemodifier}{-eu} +}{} + +\@namedef{doclicense@lang@lic@CC@code}{it}% +%% Using: https://en.wikipedia.org/wiki/ISO_639-1 + +\@namedef{doclicense@lang@lic@CC@zero@1.0}{CC0 1.0 Universale}% +\@namedef{doclicense@lang@lic@CC@pd@1.0}{Copyright-Only Dedication}% Based on US right. Use Zero in no-US countries. + +\@namedef{doclicense@lang@lic@CC@by@3.0}{Attribuzione 3.0 Italia}% +\@namedef{doclicense@lang@lic@CC@by-sa@3.0}{Attribuzione -- Condividi allo stesso modo 3.0 Italia}% +\@namedef{doclicense@lang@lic@CC@by-nd@3.0}{Attribuzione -- Non opere derivate 3.0 Italia}% +\@namedef{doclicense@lang@lic@CC@by-nc@3.0}{Attribuzione -- Non commerciale 3.0 Italia}% +\@namedef{doclicense@lang@lic@CC@by-nc-sa@3.0}{Attribuzione -- Non commerciale -- Condividi allo stesso modo 3.0 Italia}% +\@namedef{doclicense@lang@lic@CC@by-nc-nd@3.0}{Attribuzione -- Non commerciale -- Non opere derivate 3.0 Italia}% + +\@namedef{doclicense@lang@lic@CC@by@4.0}{Attribuzione 4.0 Internazionale}% +\@namedef{doclicense@lang@lic@CC@by-sa@4.0}{Attribuzione -- Condividi allo stesso modo 4.0 Internazionale}% +\@namedef{doclicense@lang@lic@CC@by-nd@4.0}{Attribuzione -- Non opere derivate 4.0 Internazionale}% +\@namedef{doclicense@lang@lic@CC@by-nc@4.0}{Attribuzione -- Non commerciale 4.0 Internazionale}% +\@namedef{doclicense@lang@lic@CC@by-nc-sa@4.0}{Attribuzione -- Non commerciale -- Condividi allo stesso modo 4.0 Internazionale}% +\@namedef{doclicense@lang@lic@CC@by-nc-nd@4.0}{Attribuzione -- Non commerciale -- Non opere derivate 4.0 Internazionale}% diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense-russian.ldf b/Master/texmf-dist/tex/latex/doclicense/doclicense-russian.ldf new file mode 100644 index 00000000000..c59a583f25d --- /dev/null +++ b/Master/texmf-dist/tex/latex/doclicense/doclicense-russian.ldf @@ -0,0 +1,24 @@ +\ProvidesFile{doclicense-russian.ldf} + +\@namedef{doclicense@lang@thisDoc}{Это произведение доступно по лицензии}% +\@namedef{doclicense@lang@word@license}{}% + +\@namedef{doclicense@lang@lic@CC@code}{ru}% +%% Using: https://en.wikipedia.org/wiki/ISO_639-1 + +\@namedef{doclicense@lang@lic@CC@zero@1.0}{CC0 1.0 Универсальная}% +\@namedef{doclicense@lang@lic@CC@pd@1.0}{Отказ от своих прав в пользу общества с сохранением лишь неотъемлемых авторских прав (основано на законодательстве США)}% Инструмент списан, следует использовать CC0. + +\@namedef{doclicense@lang@lic@CC@by@3.0}{<> (<<Атрибуция>>) 3.0 Непортированная}% +\@namedef{doclicense@lang@lic@CC@by-sa@3.0}{<> (<<Атрибуция — На тех же условиях>>) 3.0 Непортированная}% +\@namedef{doclicense@lang@lic@CC@by-nd@3.0}{<> (<<Атрибуция — Без производных произведений>>) 3.0 Непортированная}% +\@namedef{doclicense@lang@lic@CC@by-nc@3.0}{<> (<<Атрибуция — Некоммерческое использование>>) 3.0 Непортированная}% +\@namedef{doclicense@lang@lic@CC@by-nc-sa@3.0}{<> (<<Атрибуция — Некоммерческое использование — На тех же условиях>>) 3.0 Непортированная}% +\@namedef{doclicense@lang@lic@CC@by-nc-nd@3.0}{<> (<<Атрибуция — Некоммерческое использование — Без производных произведений>>) 3.0 Непортированная}% + +\@namedef{doclicense@lang@lic@CC@by@4.0}{Attribution 4.0 International}% +\@namedef{doclicense@lang@lic@CC@by-sa@4.0}{<> (<<Атрибуция — На тех же условиях>>) 4.0 Всемирная}% +\@namedef{doclicense@lang@lic@CC@by-nd@4.0}{<> (<<Атрибуция — Без производных произведений>>) 4.0 Всемирная}% +\@namedef{doclicense@lang@lic@CC@by-nc@4.0}{<> (<<Атрибуция — Некоммерческое использование>>) 4.0 Всемирная}% +\@namedef{doclicense@lang@lic@CC@by-nc-sa@4.0}{<> (<<Атрибуция — Некоммерческое использование — На тех же условиях>>) 4.0 Всемирная}% +\@namedef{doclicense@lang@lic@CC@by-nc-nd@4.0}{<> (<<Атрибуция — Некоммерческое использование — Без производных произведений>>) 4.0 Всемирная}% diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense.sty b/Master/texmf-dist/tex/latex/doclicense/doclicense.sty index 380fd9c36a0..f45f4fdc3ed 100644 --- a/Master/texmf-dist/tex/latex/doclicense/doclicense.sty +++ b/Master/texmf-dist/tex/latex/doclicense/doclicense.sty @@ -1,8 +1,10 @@ %% See file 'doclicense.dtx' for copyright and license. \NeedsTeXFormat{LaTeX2e}[1998/12/01] \ProvidesPackage{doclicense} - [2016/04/24 v1.5.0 Support for putting documents under a license] + [2017/10/07 v1.6.0 Support for putting documents under a license] +%% ^^A \changes{1.7.0}{2017/XX/XX}{} %% ^^A nag warned about the center environment and it really messes up spacing. + %% Parameters ((( \RequirePackage{kvoptions} \DeclareStringOption[CC]{type} @@ -10,7 +12,9 @@ \DeclareStringOption{version} \DeclareStringOption{lang} \DeclareStringOption{imagemodifier} +\DeclareStringOption[right]{imageposition} \DeclareStringOption[10em]{imagewidth} +\DeclareStringOption[2em]{imagedistance} \DeclareStringOption{hyphenation} %% ))) @@ -117,26 +121,41 @@ \newcommand{\doclicenseLicense}{\doclicenseThis} %% legacy support \newcommand{\doclicenseThis}{% - \setlength{\doclicense@hsize}{\textwidth-\doclicense@imagewidth-2em}% + \setlength{\doclicense@hsize}{\textwidth-\doclicense@imagewidth-\doclicense@imagedistance}% + \ifthenelse{\equal{\doclicense@imageposition}{left}}{% + \begin{center} + \begin{minipage}{\doclicense@imagewidth} + \doclicenseImage% + \end{minipage} + \hfill + \begin{minipage}{\doclicense@hsize} + \ifthenelse{\isempty{\doclicense@hyphenation}}{}{% + \@nameuse{\doclicense@hyphenation}% + }% + \doclicenseLongText% + \end{minipage} + \end{center} + }{% % \ifthenelse{\isnamedefined{iflandscape}}{% % \iflandscape{% % \setlength{\doclicense@hsize}{\doclicense@hsize-10em}% % }{}% % }{}% % {% - \begin{center} - \begin{minipage}{\doclicense@hsize} - \ifthenelse{\isempty{\doclicense@hyphenation}}{}{% - \@nameuse{\doclicense@hyphenation}% - }% - \doclicenseLongText% - \end{minipage} - \hfill - \begin{minipage}{\doclicense@imagewidth} - \doclicenseImage% - \end{minipage} - \end{center} + \begin{center} + \begin{minipage}{\doclicense@hsize} + \ifthenelse{\isempty{\doclicense@hyphenation}}{}{% + \@nameuse{\doclicense@hyphenation}% + }% + \doclicenseLongText% + \end{minipage} + \hfill + \begin{minipage}{\doclicense@imagewidth} + \doclicenseImage% + \end{minipage} + \end{center} % } + } } %% ))) -- cgit v1.2.3