summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/doclicense/doclicense.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/doclicense/doclicense.dtx')
-rw-r--r--Master/texmf-dist/source/latex/doclicense/doclicense.dtx71
1 files changed, 49 insertions, 22 deletions
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 <ypid@riseup.net>
+% Copyright (C) 2015-2017 by Robin Schneider <ypid@riseup.net>
%
% 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 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1998/12/01]
%<package>\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]
%</package>
%
%<*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}
% }
+ }
}
%% )))