Skip to content

Commit

Permalink
Merge pull request #101 from csware/cc
Browse files Browse the repository at this point in the history
Be more flexible with CC licenses
  • Loading branch information
sieversMartin authored May 6, 2023
2 parents 1b0e498 + f7217d8 commit 30022c8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
1 change: 1 addition & 0 deletions lni-author-template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions lni-paper-example-de.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
27 changes: 22 additions & 5 deletions lni.cls
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,24 @@
\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
\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
Expand Down Expand Up @@ -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}%
Expand Down
9 changes: 9 additions & 0 deletions lni.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 30022c8

Please sign in to comment.