summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/doclicense
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-05 20:13:51 +0000
committerKarl Berry <karl@freefriends.org>2015-08-05 20:13:51 +0000
commita4b78f0fc9446d2cfae36e0d82ef6a80d3e5f039 (patch)
tree9d463d2c7b4a5ad120a33882a9a8f50825948666 /Master/texmf-dist/source/latex/doclicense
parent75407eb95e7f8d1a86497cb63ac3c30e8f48904f (diff)
doclicense (5aug15)
git-svn-id: svn://tug.org/texlive/trunk@38049 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/doclicense')
-rw-r--r--Master/texmf-dist/source/latex/doclicense/doclicense.dtx42
1 files changed, 29 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/latex/doclicense/doclicense.dtx b/Master/texmf-dist/source/latex/doclicense/doclicense.dtx
index e75464b7613..6d80ce8cfa1 100644
--- a/Master/texmf-dist/source/latex/doclicense/doclicense.dtx
+++ b/Master/texmf-dist/source/latex/doclicense/doclicense.dtx
@@ -27,7 +27,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1998/12/01]
%<package>\ProvidesPackage{doclicense}
%<*package>
- [2015/05/16 v1.2 Support for putting documents under a license]
+ [2015/08/04 v1.3 Support for putting documents under a license]
%</package>
%
%<*driver>
@@ -115,6 +115,9 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
% \changes{1.0}{2015/03/30}{Removed space before quotes (Example: \enquote{CC } $\rightarrow$ \enquote{CC})}
% \changes{1.1}{2015/04/06}{Added support for Creative Commons 4.0 and added \cmd{\doclicenseImageFileName}}
% \changes{1.2}{2015/04/06}{Allow \cmd{\doclicenseModifier} to be used with hyperref. Fixed \cmd{\doclicenseIcon} macro, added missing image and wrote test framework. Added notes about how to add translations. Added Spanish translation.}
+% \changes{1.3}{2015/08/04}{Added \cmd{\doclicenseTypeIcon} macro. Added French translation. Added note about target images/ subtree.}
+%
+% %% nag warned about the center environment and it really messes up spacing.
%
% \DoNotIndex{\RequirePackage, \DeclareOption, \ProcessOptions}
% \DoNotIndex{\PackageWarning, \MessageBreak}
@@ -134,7 +137,7 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
% \phantomsection
% \addcontentsline{toc}{section}{\abstractname}
% \begin{abstract}
-% Make it easy to set your documents under a certain license. \\
+% Support for putting documents under a license. \\
% Information site on CTAN: \url{\PackageCTANURL} \\
% Example on Stackexchange: \url{https://tex.stackexchange.com/a/226788/32320} \\
% Fork me on GitHub: \url{\PackageURL} \end{abstract}
@@ -203,9 +206,11 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
% \PrintPackage{babel} or \PrintPackage{polyglossia}.
%
% Supported languages:
+% ^^A Sorted alphabetically.
% \begin{eqlist}
% \item[English] Added by \href{https://github.com/ypid}{Robin Schneider}.
-% \item[German] 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[Spanish] Added by \href{https://github.com/elsudano}{Carlos}.
% \end{eqlist}
%
@@ -224,7 +229,7 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
% |]{doclicense}|
% \end{quote}
%
-% Note that if German is set as language then \enquote{-eu} will be used as
+% Note that if French or German is set as language then \enquote{-eu} will be used as
% default for this option.
%
% Currently supported are \enquote{-eu} and \enquote{-us}.
@@ -280,6 +285,11 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
% \enquote{\doclicenseIcon{}}. This macro is based on the
% \PrintPackage{ccicons} package.
%
+% \DescribeMacro{\doclicenseTypeIcon}
+% Expands to a icon of the license type. Example:
+% \enquote{\doclicenseTypeIcon{}}. This macro is based on the
+% \PrintPackage{ccicons} package.
+%
% \DescribeMacro{\doclicenseImage}
% This is kind of similar with \cmd{\doclicenseIcon} but it will typeset an
% bigger pictogram of the license. Example:
@@ -347,10 +357,10 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
% the filename with your language code (same as the language code used by
% \PrintPackage{babel}) and translate the file.
% If there are multiple language
-% codes which should map to same translation then have a look at the file
+% codes which should map to the same translation then have a look at the file
% \path{doclicense-american.ldf}.
%
-% When you are done and tested your translation (modify and run the
+% When you are done and have tested your translation (modify and run the
% \path{run_tests} script) then please send me the translated file(s) either
% via Email or preferably by opening a pull request on GitHub so that I can
% include them in the next release.
@@ -450,6 +460,8 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
\doclicense@lang@word@license.\xspace%
}
\newcommand{\doclicenseIcon}{\doclicense@icon\xspace}
+\newcommand{\doclicenseTypeIcon}{\doclicenseType}
+% \newcommand{\doclicenseModifierIcon}{} %% Not directly provided by ccicons.
\newcommand{\doclicenseImageFileName}{doclicense-\doclicense@type-\doclicense@modifier\doclicense@imagemodifier}
\newcommand{\doclicenseImage}[1][]{%
\setkeys{doclicense}{#1}
@@ -461,13 +473,15 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
}
\newcommand{\doclicenseLicense}{\doclicenseThis} %% legacy support
-\newcommand{\doclicenseThis}{
- \setlength{\doclicense@hsize}{\textwidth-\doclicense@imagewidth-2em}
- \ifthenelse{\isnamedefined{iflandscape}}{
- \iflandscape{
- \setlength{\doclicense@hsize}{\doclicense@hsize-10em}
- }{}
- }{}
+\newcommand{\doclicenseThis}{%
+ \setlength{\doclicense@hsize}{\textwidth-\doclicense@imagewidth-2em}%
+ \ifthenelse{\isnamedefined{iflandscape}}{%
+ \iflandscape{%
+ % \setlength{\doclicense@hsize}{\doclicense@hsize-10em}%
+ }{}%
+ }{}%
+ % {%
+ % \centering%
\begin{center}
\begin{minipage}{\doclicense@hsize}
\doclicenseLongText%
@@ -477,6 +491,7 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
\doclicenseImage%
\end{minipage}
\end{center}
+ % }
}
%% )))
@@ -522,6 +537,7 @@ corresponds to \PackageName~\fileversion, dated \filedate.}}
%% CC (((
\ifthenelse{\equal{\doclicense@type}{CC}}{%
\renewcommand{\doclicenseLongType}{Creative Commons\xspace}
+ \renewcommand{\doclicenseTypeIcon}{\ccLogo\xspace}
\doclicense@setVersion[3.0]