diff --git a/lni-author-template.tex b/lni-author-template.tex index abdbd74..a3deb19 100644 --- a/lni-author-template.tex +++ b/lni-author-template.tex @@ -26,6 +26,7 @@ \booktitle{Name-der-Konferenz} % Name of book title \yearofpublication{2017} %%%\lnidoi{18.18420/provided-by-editor-02} % if known +%%%\setcctype{by-sa} % can be: zero, by, by-sa, by-nc, by-nd, by-nc-sa, by-nc-nd \maketitle \begin{abstract} diff --git a/lni-paper-example-de.tex b/lni-paper-example-de.tex index 40f52c0..b45d1a4 100644 --- a/lni-paper-example-de.tex +++ b/lni-paper-example-de.tex @@ -51,6 +51,7 @@ \booktitle{Name-der-Konferenz} % Name des Tagungsband; optional Kurztitel \yearofpublication{2017} %%%\lnidoi{18.18420/provided-by-editor-02} % Falls bekannt +%%%\setcctype{by-sa} % Möglichkeiten: zero, by, by-sa, by-nc, by-nd, by-nc-sa, by-nc-nd \maketitle \begin{abstract} diff --git a/lni.cls b/lni.cls index 32baa19..c3751b3 100644 --- a/lni.cls +++ b/lni.cls @@ -382,13 +382,26 @@ \par}% \vskip 28pt% Abstand vor dem Abstract \end{center}% - \AddToShipoutPictureBG*{\AtPageLowerLeft{% - \put(\LenToUnit{\the\doihoffset},\LenToUnit{\the\doivoffset}){% - \ifusehyperref - \href{https://creativecommons.org/licenses/by-sa/4.0/}{\ccbysa} - \else - \ccbysa - \fi + \AddToShipoutPictureBG*{\AtPageLowerLeft{% + \put(\LenToUnit{\the\doihoffset},\LenToUnit{\the\doivoffset}){% + \ifdefempty{\@lni@cc@type}{}{ + \IfEq{\@lni@cc@type}{zero}{% + \def\@lni@CC@Url{https://creativecommons.org/publicdomain/zero/1.0/}\def\@lni@CC@Icon{\cczero}}{% + \edef\@lni@CC@Url{https://creativecommons.org/licenses/\@lni@cc@type/\@lni@cc@version/}% + \IfEq{\@lni@cc@type}{by}{\def\@lni@CC@Icon{\ccby}}{% + \IfEq{\@lni@cc@type}{by-sa}{\def\@lni@CC@Icon{\ccbysa}}{% + \IfEq{\@lni@cc@type}{by-nc-sa}{\def\@lni@CC@Icon{\ccbyncsa}}{% + \IfEq{\@lni@cc@type}{by-nc}{\def\@lni@CC@Icon{\ccbync}}{% + \IfEq{\@lni@cc@type}{by-nd}{\def\@lni@CC@Icon{\ccbynd}}{% + \IfEq{\@lni@cc@type}{by-nc-nd}{\def\@lni@CC@Icon{\ccbyncnd}}{% + \message{Invalid value for setcctype} + }}}}}}}}% + \ifusehyperref + \href{\@lni@CC@Url}{\@lni@CC@Icon} + \else + \@lni@CC@Icon + \fi + } \ifdefempty{\@lnidoi}{}{ \footnotesize \ifusehyperref @@ -615,6 +628,10 @@ \newcommand*{\BPMN}{\lni@initialism{bpmn}} \newcommand*{\BPEL}{\lni@initialism{bpel}} \newcommand*{\UML}{\lni@initialism{uml}} +\newcommand\setcctype[2][4.0]{% + \def\@lni@cc@version{#1}% + \def\@lni@cc@type{#2}} +\setcctype{} \renewenvironment{thebibliography}[1] {\iflnienglish\selectlanguage{english}\else\selectlanguage{ngerman}\fi \section*{\refname}% diff --git a/lni.dtx b/lni.dtx index c41f4fc..e955781 100644 --- a/lni.dtx +++ b/lni.dtx @@ -522,6 +522,15 @@ This work consists of the file lni.dtx % \lnidoi{18.18420/se2016_01} % \end{examplecode} % +% \DescribeMacro{\setcctype\space(new in v1.X)}% +% In order to include a information about the CC licentse on the title page, +% the license and the version can be specified using the \cs{setcctype} macro. +% The version is optional and defaults to 4.0. Possible values are: +% zero, by, by-sa, by-nc, by-nd, by-nc-sa, by-nc-nd. +% \begin{examplecode}[label={lst:setcctype}] +% \setcctype[version]{by-sa} +% \end{examplecode} +% % Finally \cs{maketitle} will output the formatted title page. % % \subsection{Abstract and keywords}