summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/doclicense/doclicense.sty')
-rw-r--r--Master/texmf-dist/tex/latex/doclicense/doclicense.sty42
1 files changed, 34 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/doclicense/doclicense.sty b/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
index 2615aae406d..ff3518d3726 100644
--- a/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
+++ b/Master/texmf-dist/tex/latex/doclicense/doclicense.sty
@@ -1,13 +1,15 @@
%% See file 'doclicense.dtx' for copyright and license.
\NeedsTeXFormat{LaTeX2e}[1998/12/01]
\ProvidesPackage{doclicense}
- [2015/08/04 v1.3 Support for putting documents under a license]
+ [2015/12/13 v1.4.0 Support for putting documents under a license]
+%% ^^A nag warned about the center environment and it really messes up spacing.
%% Dependencies (((
\RequirePackage{kvoptions}
\RequirePackage{xifthen}
\RequirePackage{etoolbox} %% \ifcsdef
\RequirePackage{xspace}
+\RequirePackage{verbatim}
\AtEndPreamble{%
\@ifpackageloaded{csquotes}{}{\RequirePackage{csquotes}}
\@ifpackageloaded{ccicons}{}{\RequirePackage{ccicons}}
@@ -49,7 +51,11 @@
\PackageError{doclicense}{Icon not defined}
{Please check the documentation of doclicense to see what you can do about it.}%
}
-\newcommand{\doclicense@modifier@uppercase}{\texorpdfstring{\MakeUppercase{\doclicense@modifier}}{\doclicense@modifier}}
+\newcommand{\doclicense@modifier@uppercase}{\texorpdfstring{%
+ \MakeUppercase{\doclicense@modifier}%
+ }{%
+ \doclicense@modifier}%
+}
%% )))
%% User macros (((
@@ -58,14 +64,17 @@
\newcommand{\doclicenseModifier}{\doclicense@modifier@uppercase\xspace}
\newcommand{\doclicenseVersion}{\doclicense@versionUsed\xspace}
\newcommand{\doclicenseName}{%
- \doclicense@type~\doclicense@modifier@uppercase~\doclicense@versionUsed\xspace%
+ \doclicense@type~\doclicense@modifier@uppercase~%
+ \doclicense@versionUsed\xspace%
}
\newcommand{\doclicenseNameRef}{\href{\doclicenseURL}{\doclicenseName}\xspace}
-\newcommand{\doclicenseLongName}{\doclicenseLongType\space\doclicense@longName\xspace}
+\newcommand{\doclicenseLongName}{\doclicenseLongType\space%
+ \doclicense@longName\xspace}
\newcommand{\doclicenseLongNameRef}{\href{\doclicenseURL}{\doclicenseLongName}}
\newcommand{\doclicenseText}{%
\doclicense@lang@thisDoc\space
- \href{\doclicenseURL}{\enquote{\doclicenseName{}}} \doclicense@lang@word@license.\xspace%
+ \href{\doclicenseURL}{\enquote{\doclicenseName{}}}
+ \doclicense@lang@word@license.\xspace%
}
\newcommand{\doclicenseLongText}{%
\doclicense@lang@thisDoc\space
@@ -74,7 +83,8 @@
}
\newcommand{\doclicenseIcon}{\doclicense@icon\xspace}
\newcommand{\doclicenseTypeIcon}{\doclicenseType}
-\newcommand{\doclicenseImageFileName}{doclicense-\doclicense@type-\doclicense@modifier\doclicense@imagemodifier}
+\newcommand{\doclicenseImageFileName}{%
+ doclicense-\doclicense@type-\doclicense@modifier\doclicense@imagemodifier}
\newcommand{\doclicenseImage}[1][]{%
\setkeys{doclicense}{#1}
\href{\doclicenseURL}{%
@@ -83,6 +93,16 @@
]{\doclicenseImageFileName}%
}
}
+\newcommand{\doclicensePlainFullTextFileName}{%
+ doclicense-\doclicense@type-\doclicense@modifier%
+ -\doclicense@versionUsed-plaintext
+}
+\newcommand{\doclicensePlainFullText}{%
+ \verbatiminput{\doclicensePlainFullTextFileName}
+}
+\newcommand{\doclicenseFullTextFileName}{%
+ doclicense-\doclicense@type-\doclicense@modifier-\doclicense@versionUsed-latex}
+\newcommand{\doclicenseFullText}{\input{\doclicenseFullTextFileName}}
\newcommand{\doclicenseLicense}{\doclicenseThis} %% legacy support
\newcommand{\doclicenseThis}{%
@@ -224,14 +244,20 @@
@\doclicense@modifier @\doclicense@versionUsed}{}{%
\PackageError{doclicense}{License long name not defined}%
- {Please check the documentation of doclicense to see what you can do about it.}%
+ {%
+ Please check the documentation of doclicense
+ to see what you can do about it.%
+ }%
}
\setboolean{doclicense@licenseKnown}{true}
}{}%% )))
\ifthenelse{\not\boolean{doclicense@licenseKnown}}{%
\PackageError{doclicense}{License unknown}%
- {Please check the documentation of doclicense to see what you can do about it.}%
+ {%
+ Please check the documentation of doclicense
+ to see what you can do about it.%
+ }%
}{}%
}
%% )))